LaTeX forum ⇒ Page LayoutDifferent headers on different pages Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
lukaszskowron96
Posts: 26
Joined: Tue Oct 09, 2018 1:01 pm

Different headers on different pages

Postby lukaszskowron96 » Tue Oct 09, 2018 1:08 pm

Hi, I am trying do to the following:

No header on the cover page(I know how to do that)
Header for pages 1-12
Different header for pages 13-19
Different header for pages 20-25

and so on

How to do this? I was reading online but couldn't find a helpful tutorial how to approach it.

Thank you in advance.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9156
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Oct 09, 2018 6:37 pm

Hi,

welcome to the forum!

You use a command for making the header for pages 1-12, right? Then on page 13, within the document, just make again that header command with the new value you would like to appear in the header. And on 20 again, with the new value.

Stefan
Site admin

lukaszskowron96
Posts: 26
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Tue Oct 09, 2018 9:40 pm

Hi Stefan,

No, I don't. I specify the header in the preamble as:

\usepackage{fancyhdr}
\pagestyle{fancy}
\rhead{My name}
\lhead{ }
\thispagestyle{empty} - to make the first page without header

How to create a header with a command within the document?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9156
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Oct 09, 2018 10:49 pm

Well in the middle of the document, you could simply write

\rhead{A different header}

Would you like to try it?

Stefan
Site admin

lukaszskowron96
Posts: 26
Joined: Tue Oct 09, 2018 1:01 pm

Postby lukaszskowron96 » Wed Oct 10, 2018 12:19 am

Thank you Stefan, it works! I hope somebody in the future will find this post helpful! :)


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 3 guests