Customize head and footlines in LaTeX

The fancyhdr package by Piet van Oostrum offers the user considerably more flexibility on head and footlines.


\lhead{Left head}
\chead{Center head}
\rhead{Right head}
\lfoot{Left foot}
\cfoot{Center foot}
\rfoot{Right foot}

The above defining commands are less general than the commands \fancyhead and \fancyfoot, where
\lhead{Left head} is \fancyhead[L]{Left head}, and
\cfoot{Center foot} is \fancyfoot[C]{Center foot}
and so on, with L C R standing for 'Left', 'Center', 'Right'.

For two-side output with the twoside option, one wants the left and right parts to alternate with the page number. The easiest way to do it is with


\fancyhead[LE,RO]{Text 1}
\fancyhead[LO,RE]{Text 2}

to put the same Text 1 in the left part of even pages, and right part of odd pages, and Text 2 for the other way.

   Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.