Page Layout ⇒ Different Header/footer on first page
Different Header/footer on first page
Question 1: How can I have a different header and footer on the first page?
Question 2: Why are the margins I set up in the preamble not being carried over to the second+ pages?
\setlength\topmargin{-0.5in}
\setlength\headheight{14.5pt}
\setlength\headsep{.75in}
\setlength\textheight{8.5in}
\setlength\textwidth{6.5in}
\setlength\oddsidemargin{-.125in}
\setlength\evensidemargin{0in}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\chead{\includegraphics...}
\cfoot{...}
\begin{document}
This is example text for the first page of my document.
\newpage
\thispagestyle{fancy}{
\fancyfoot[c]{RANOR, INC.}
\fancyhead{}}
This is second page text.\\
I would like the rest of the document to look like this page.
\end{document}
- Attachments
-
- Test document.pdf
- (36.62 KiB) Downloaded 1537 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Different Header/footer on first page
It seems that you have forgotten to attach the code.cirasj wrote:[...] Attached is the code. [...]
Take a look at the titlesec package. It allows to define many different page styles with an easy to use interface.cirasj wrote:[...] How can I have a different header and footer on the first page?
Page dimensions should be set with the geometry package. Prepare a minimal working example (MWE) of your recent efforts.cirasj wrote:[...] Why are the margins I set up in the preamble not being carried over to the second+ pages?
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Different Header/footer on first page
...
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\chead{\includegraphics[width=0.35\textwidth]{file.name}}
\cfoot{RANOR, INC. \\ 1 Bella Drive, Westminster MA 01473 \\ www.ranor.com}
...
Then I use this to create my second page. Is there a way of reversing the layout?
\thispagestyle{fancy}{
\fancyfoot[c]{RANOR, INC.}
\fancyhead{}}
Re: Different Header/footer on first page
Can I use the /newpagestyle command to add a first page footer and then let my global format take over? Will the /newpagestyle be used only for the page it is on or does it make new global attributes? It was not clear to me in the documentation.