[Tex/LaTex] Implementing line-based corporate design in LaTeX

templates

I would like to implement a line-based corporate design in LaTeX. This question is kind of a follow-up question to my earlier question How to write a report template to match corporate design.

I have looked into the proposed complex report template Reports of the US Army Corps of Engineers and found it very useful. However there are some questions remaining.

This is how the page should look like

The logo is on every page, the header section containing, dates, project information, adresses, etc. should only be on the very first page. I thought that maybe this would be something to define a new environment for. The horizontal line following the header section should float with the length of the header.

The footer is different for the first page and can be taller for the first page as well, because there is a lot of information on the first page on it.

I am not sure if one should implement the first page as a title page, because I would like to have the option for lager reports to create a different, more decorative title page with logos, etc.

So my question is: how would one generate these lines so that they are on every page and not interfere with the tex? I saw in question Creating simple frames how frames are done, and that seems similar to my problem. However I do not want to reproduce my line-drawing code on every new page.

Is there any general advice where to start? Should one implement it pure TeX- or LaTeX-based? Is there a good tutorial starting programming TeX or LaTeX? I have been a LaTeX user for years and wrote my PhD thesis with it, but I have only used it, loaded some packages, etc., never wrote more elaborate things like that.

Desired page layout

Best Answer

Material that should go on every page should be placed in the head or foot (\@oddhead typically). One useful trick is to put a \begin{picture}(0,0) environment this will produce a zero sized box but whose contents can spill out over the entire page, and being in the head they will be absolutely positioned. So you can \put the frame (using th epicture mode box commands, or a fancier package) and similarly \put an \includegraphics with the logo at exact coordinates. (Setting \unitlength to 1mm or some other "real world" length unit often helps when measuring this sort of thing unless your design spec is already given in points).

Then for the first page you just want a different style with perhaps a different style box. the "header" section should just be normal body text for LaTeX not set as a part of \@oddhead as it is of unspecified size.

something like this:

\documentclass{article}

\setlength\textwidth{130mm}
\setlength\textheight{190mm}

\makeatletter
\def\@oddhead{%
\setlength\unitlength{1mm}%
\begin{picture}(0,0)%

\put(120,20){\fbox{A LOGO HERE}}%
\put(-10,-200){\framebox(150,200)[tl]{}}%
\end{picture}\hfill}


\makeatother


\begin{document}

\def\x{Stuff goes here. just to fill up the space. }
\def\xx{\x\x\x\x\x\x}
\def\y{%
\xx\par some other text to fill up space. \xx\xx\xx
\xx\par some other text to fill up more space. \xx\xx\xx
\xx\par some other text to fill up space to get more pages. \xx\xx\xx}

\y

2222 \y

333 \y
\end{document}