1

I'm wanting to create a latex class called projeto.cls that should create this report cover image below, which has the following headers and footer for all reports generated. The fields defined entrie tags should be variable (define) \title {}, \subtitle{}, \description{},\revision{} (xx), \date{}, \description2{}, \author{} produced by the file .tex. The table appears only on 1st page.

I already have the following source code: .cls and .tex

File: projeto.cls

%File: Projeto.cls
\ProvidesClass{proposta_projeto}[2014/06/03 v0.1 Proposta de Projeto class]

\LoadClass[11pt,a4paper]{article} % Font size and paper type

%\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} % Document margins
\usepackage[margin=2cm,headheight=5\baselineskip,headsep=1\baselineskip,includehead]{geometry}

\usepackage[brazilian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{lastpage}
\usepackage[iso, english]{isodate}




%----------------------------------------------------------------------------------------
%   HEADINGS COMMANDS: Commands for printing name and address
%----------------------------------------------------------------------------------------

\def\projeto#1{\def\@projeto{#1}} % Defines the \projeto command to set name
%\def\@projeto {} % Sets \@projeto to empty by default

\newcommand{\printprojeto}{\@projeto}

%----------------------------------------------------------------------------------------
%   PRINT THE HEADING LINES
%----------------------------------------------------------------------------------------



%% set up and width for the tabularx environment to expand and fit to.
\newlength{\headerwidth}
\setlength{\headerwidth}{\textwidth}
\newsavebox{\myheader}
\begin{lrbox}{\myheader}%
    \begin{minipage}[b]{\headerwidth}
    \renewcommand{\arraystretch}{1.29}%
    \begin{tabularx}{\headerwidth}{|@{}c@{}|X|c|c|}\hline
        \multirow{2}{*}{\includegraphics[scale=0.75]{image1.png}} & \centering\normalsize{Método de Instrução} & \small{DOC Nº} & \small{MI.02} \\ \cline{2-4}
& \centering\large{PROPOSTA DE PROJETO} & \small{Versão:} & \small{06} \\ \hline

\multirow{2}{*}{\includegraphics[scale=0.75]{image2.png}} & \multicolumn{1}{c|}{\multirow{2}{*}{\textbf{\LARGE{ >  }}}} & \multicolumn{2}{c|}{\small{Data: 08/10/13}} \\ \cline{3-4}
& & \multicolumn{2}{c|}{\small{Página: \thepage\ de \pageref{LastPage} }} \\ \hline
    \end{tabularx}

    \end{minipage}
\end{lrbox}
%% Setting up the header
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{}
\chead{\usebox{\myheader}}
\rhead{}
\lfoot{\small{RG-481}}
\cfoot{\small{Revisão: 01}}
\rfoot{\small{Data: \shortromandate\today}}

And the file 'projeto.tex'

\documentclass{projeto} % Use the custom projeto.cls style
\title{>}
\subtitle{>}
\description{>}
\revision{>}
\description2{>}
\date{>}
\author{>}
\begin{document}
\section{Section 1}
\section{Section 2}
\end{document}

How could I create this document?

Template

  • 1
    Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". It's good that you have a minimal working example (MWE), but your question is still of the 'do-this-complicated-thing-for-me' type. – Adam Liter Jun 03 '14 at 19:04
  • 2
    That is, can you make your question more focused? What exactly about the MWE that you posted is not working for you? What can you not figure out on your own? – Adam Liter Jun 03 '14 at 19:04
  • I was thinking of answering this question, but it is basically putting boxes on a page. The rest can be found under the link i gave above. From my point of view, it is a bit unclear what should be put where. The cls file contradicts the pic and the tex in some places. – Johannes_B Feb 08 '15 at 11:23

0 Answers0