Page Layoutpage headers

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
snif123
Posts: 11
Joined: Sat Apr 16, 2011 7:19 pm

page headers

Post by snif123 »

Hi
I have been trying to use fancyheadings.sty to set headers for a report doc.I just want to set it for all pages so that it shows subsection and page number only.but some of the pages have headers,others have some other strange text in the header??some of the headers are drawn into the text body, others have no headers..etc is there a simple way to do this?thanks
here is the code am using

Code: Select all

\pagestyle{fancy}
\parskip=2mm
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection. #1}}
\lhead[\fancyplain{}{\bfseries\thepage}]%
      {\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]%
      {\fancyplain{}{\bfseries\thepage}}
\cfoot{}

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

Stefan Kottwitz
Site Admin
Posts: 10328
Joined: Mon Mar 10, 2008 9:44 pm

page headers

Post by Stefan Kottwitz »

Hi,

I recommend using fancyhdr instead of fancyheadings. There's a good documentation with examples, which can help you. If not, you could tell us remaining problems.

Stefan
LaTeX.org admin
Post Reply