Page LayoutHeader on all odd pages (incl. first), footer on all.

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Header on all odd pages (incl. first), footer on all.

Post by Singularity »

I'm trying to get my header to appear on only the odd pages, including the first one, and my footer to appear on all pages. But no luck. Here's an MWE with the header and footer I have so far. I tried putting an [0] in the lhead and rhead, based on a look at fancyhdr (which seems to be included in this MWE), and I could not understand any of the hacks I saw about getting the header on the first page.

Code: Select all

\documentclass[addpoints,fleqn
%,answers
]{exam}

\pagestyle{headandfoot}
\lhead[O]{\makebox[.5\textwidth][l]{Name:\enspace\hrulefill}}
\rhead[O]{\makebox[.25\textwidth]{Date:\enspace\hrulefill}}
\footrule
\lfoot{Test 1: Ch 1.5 through 3.4}
\cfoot{}
\rfoot{Page \thepage\ of \numpages}

\title{Fall '13 Algebra 2, Section 11, Test 2}
\date{}\author{}

\begin{document}
\maketitle

First page of questions
\newpage

Second page of questions
\newpage

Third page of questions
\newpage

Many more pages of questions
\end{document}
How do I do this? Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Header on all odd pages (incl. first), footer on all.

Post by localghost »

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX which has already got an answer. Please read what our administrator thinks about that.
Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.
Such kind of x-posting without notification represents a direct violation of our rules and has to be prevented absolutely in future questions.
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Re: Header on all odd pages (incl. first), footer on all.

Post by Singularity »

Sorry about that. I still could not find an answer and needed one.
Post Reply