This may be a novice question. I am creating stationary and would like to have a different header and footer on the first page. I can do this in MS Word and am having a difficult time doing it with LaTeX even after reading article for the last 3 days.
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}
Page Layout ⇒ Different Header/footer on first page
Different Header/footer on first page
- Attachments
-
- Test document.pdf
- (36.62 KiB) Downloaded 1518 times
Last edited by cirasj on Wed Mar 18, 2009 3:12 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- 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¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Different Header/footer on first page
Here is the example.
...
\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{}}
...
\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
I am going to change my question. How can I have the footer change automatically. I see in the fancyhdr and tilesec packages the I need to specify sections.
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.
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.