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

3 Answers 3


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:




\put(120,20){\fbox{A LOGO HERE}}%



\def\x{Stuff goes here. just to fill up the space. }
\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}


2222 \y

333 \y
  • Just for my better understanding: \put is a TeX command, isn't it? Do I really need to dive into TeX or is there something in LaTeX one can use? In addition, where can I find documentation about commands like \@oddhead ? Mar 10, 2012 at 13:56
  • 2
    no \put is a LaTeX command, part of picture mode (no package needed) \@oddhead is an internal command which you can define directly or the fancyhdr package gives a nicer interface to giving it a suitable definition, see Yiannis' answer Mar 10, 2012 at 14:11
  • OK. I have started with the fancyhdr package and the small picture environment in it. However there is a problem if I want to change the margins of the page with the geometry package as then the basis of the coordinate system of the picture environment is shifted on the page. Is there a way to have a coordinate system relative to the page, instead to the margins? Mar 10, 2012 at 14:35
  • 1
    I've added an example, TeX doesn't really have a concept of margin relative to the page, if a package has shifted things then by a specified margin of say 5em then you can put a -ve vspace before the picture environment to shift it back or (equivalently) use its second optional (,) argument o shift its notional origin. Mar 10, 2012 at 15:07

After receiving so much great input from Yannis and David, I would like to summarize how I managed to get this design done.

I used the fancyhdr package to define a picture environment in the left head with a dimension of (0,0) as proposed by David. In this picture environment I drew the upper horizontal and the vertical line. For the footer I did the same: created the small picture environment and drew the horizontal line separating the footer from the page content.

The upper logo went into the \rhead section of the page. I adapted the individual margins using the geometry package.

To include the footer text on the first page only, I wrapped the fancyhdr commands in a fancypagestyle to then activate the page style with \thispagestyle. Doing this on the first page and it automatically took the right page style for the following pages.

In the end I moved all these definitions into a separate style file to avoid duplicating my code over and over again. It certainly looks better than the document written in Word. As usual with LaTeX it is a lot of tweaking to get things started, but once it is done you are much more productive.


Best to rather use a package, in this case fancyhdr. Here is a minimal:

\usepackage{fancyhdr} \pagestyle{fancy}
\lhead{LEFT} \chead{CENTER} \rhead{RIGHT}
\lfoot{a very long left header} \cfoot{}
\rfoot{a very long right header}

You can replace, LEFT, CENTER or RIGHT with any material you want including a graphic (just use the includegraphics command suitably scaled).

To build the rules you can use the picture commands or use TeX primitives like \vrule and \hrule. Changing the \lhead above to:

\lhead{\hrule \vbox to 0pt{\vrule height605pt width1pt} LEFT}

Will give yo this,

enter image description here

  • Thanks for your answer, but that does not help me that much. Getting the logo into place seems not such a big issue, but getting the lines properly, also the vertical ones seems more complicated to me. Mar 10, 2012 at 13:54
  • @GorillaPatch Please see the edit and try:) Mar 10, 2012 at 14:46
  • OK that looks much better. Where can I find documentation about these primitives? I would like to understand what \vbox to 0pt means for example. Mar 10, 2012 at 15:03
  • 1
    @GorillaPatch The definite work is Knuth's TeXbook ctan.mirrorcatalogs.com/help/Catalogue/entries/texbook.html, warning is a tough read. Mar 10, 2012 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.