My question

I am trying to have a precise control on the size and on the content of the header and footer of the pages, with different configurations:

  • if the page the first page
  • on odd pages
  • on even pages

What are the best ways to handle this question?

A picture

Approximately, the document I want to create will look like this

enter image description here

What I've tried

So far, I've tried to do




      \newgeometry{top=0.5cm, bottom=3cm}
      \newgeometry{top=3cm, bottom=0.5cm}

Test \newpage
Test 2 \newpage
Test 3

but as said there, in the comments, this approach is doomed to fail.

Post scriptum

In case it can help, here are some pieces of code I use for my document . This is not part of my question, only if it can help!

Dimensions of the pages and of the footer

I don't really understand the following code but have tested it and it's ok for me. Any comment is welcomed!

% Layout %
            vmargin={\myVMargin,\dimexpr(\myVMargin - \myFootskipMargin/2)},

The style of footer

% Footer

\lfoot{{\footnotesize EXAMPLE}}
\rfoot{{\footnotesize  \mbox{}\hfill \thepage /\pageref{LastPage}}}%
  • 2
    your question isn't very clear, why can't you just use the O an dE options in fancydr ? – David Carlisle Sep 8 '18 at 14:51
  • 1
    As @DavidCarlisle said, with one caveat: It looks like you want an empty footer on even pages and an empty header on odd pages, but the fancyhdr package doesn't have any immediate way to set the values of \headrulewidth and \footrulewidth depending on whether the page number is even or odd. Section 13 (p. 15) in the documentation gives a hint, though: It seems okay to use a conditional inside the definition of these macros … So hang on, let me experiment a little … – Harald Hanche-Olsen Sep 8 '18 at 15:15
  • You could/should use the flowfram package for this. The header/footer can be implemented as a dynamic frame. – John Kormylo Sep 8 '18 at 15:27

Here is some proof-of-concept example. I did not try to duplicate your exact style, but I trust you may adapt these ideas to your document:

\renewcommand\headrulewidth{\ifodd\count0 6pt \else 0pt \fi}
\renewcommand\footrulewidth{\ifodd\count0 0pt \else 6pt \fi}
\fancyhf[ELF]{Even page}
\fancyhf[OLH]{Odd page}
\fancyhf[ERF,ORH]{Page \thepage}
  \ifodd\count0 \global\voffset=0mm \else \global\voffset=25mm \fi


This solution uses the flowfram package.

It should be noted that static frames center the contents vertically, while dynamic frames align the tops.

Note: this is about the largest font you can use without \scalebox.

\usepackage{lipsum}% MWE only

\setlength{\colwidth}{\dimexpr \textwidth-2\columnsep}
\divide\colwidth by 3

\newstaticframe[1]{\textwidth}{2cm}{0pt}{\dimexpr \textheight-4.5cm}[title]
\centering\Huge This is the title

\newflowframe[1]{\colwidth}{\dimexpr \textheight-5cm}{0pt}{0pt}
\newflowframe[1]{\colwidth}{\dimexpr \textheight-5cm}{\dimexpr \colwidth+\columnsep}{0pt}
\newflowframe[1]{\colwidth}{\dimexpr \textheight-5cm}{\dimexpr 2\colwidth+2\columnsep}{0pt}

\newdynamicframe[even]{\textwidth}{2cm}{0pt}{\dimexpr \textheight-2cm}[header]
\vfill\hrule height1pt

\newflowframe[even]{\colwidth}{\dimexpr \textheight-2.5cm}{0pt}{0pt}
\newflowframe[even]{\colwidth}{\dimexpr \textheight-2.5cm}{\dimexpr \colwidth+\columnsep}{0pt}
\newflowframe[even]{\colwidth}{\dimexpr \textheight-2.5cm}{\dimexpr 2\colwidth+2\columnsep}{0pt}

\def\oddlist{3,5,7,9,11,13,15,17,19}% odd pages >1

\hrule height1pt\vfill

\newflowframe[\oddlist]{\colwidth}{\dimexpr \textheight-2.5cm}{0pt}{2.5cm}
\newflowframe[\oddlist]{\colwidth}{\dimexpr \textheight-2.5cm}{\dimexpr \colwidth+\columnsep}{2.5cm}
\newflowframe[\oddlist]{\colwidth}{\dimexpr \textheight-2.5cm}{\dimexpr 2\colwidth+2\columnsep}{2.5cm}

\sloppy% SOP for narrow columns

four pages

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.