Generalno headers at first page of chapter

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

no headers at first page of chapter

Post by Coen »

Hello all,

My thesis is very near to completion and somehow I just found out that there is a header at the first page of my chapters, I do not want that!

this is the main file that I have created:

\
documentclass[a4paper,11pt,oneside,fleqn]{book}
\usepackage[numbers, square, sort]{natbib}
\usepackage{amsmath}
\usepackage[pdftex]{color, graphicx}
\usepackage{color, graphicx, multirow, longtable, subfigure}
\usepackage{natbib}
\bibpunct{[}{]}{;}{a}{,}{,}
\usepackage{array}
\usepackage{appendix}
\usepackage{alltt}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{wrapfig}
\usepackage{caption}



\pagestyle{fancy}
\lhead{}
\chead{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\lfoot{\includegraphics[width=0.15\textwidth]{plaatjes/logosie.jpg}}
\cfoot{\vspace{0.4cm} \thepage}
\rfoot{\includegraphics[width=0.15\textwidth]{plaatjes/logotu.jpg} }
\textheight 625pt
\textwidth 440pt
\setlength{\oddsidemargin}{10pt}
\setlength{\evensidemargin}{10pt}
\setlength{\footskip}{40pt}
\setlength{\parindent}{0pt} %parapraphs with no indentation
\renewcommand{\headwidth}{\textwidth}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}

\newenvironment{packed_item}{
\begin{itemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{itemize}}

\newenvironment{packed_enum}{
\begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{enumerate}}
does anyone know what command to use to avoid a header on this page (thus not removing the footer)

Thanks!!

Coen

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: 10335
Joined: Mon Mar 10, 2008 9:44 pm

no headers at first page of chapter

Post by Stefan Kottwitz »

Hi Coen,

that code doesn't cause the headers on chapter starting pages. When I completed it to make it compilable those pages did not get headers, they used the plain page style.
We need more information to be able to help you, please post a compilable minimal working example showing the headers.

Stefan
LaTeX.org admin
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

Re: no headers at first page of chapter

Post by Coen »

All right, hopefully now i give enough information: i included the main file and the first chapter/introduction. Hopefully this will be enough. Thanks for the help!

cheers,

Coen
Attachments
in.tex
(14.08 KiB) Downloaded 479 times
Main.tex
(2.87 KiB) Downloaded 601 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

no headers at first page of chapter

Post by Stefan Kottwitz »

Hi Coen,

it's caused by

Code: Select all

\fancypagestyle{plain}
in line 93 of Main.tex, that command was not shown in your first message. Remove it and the header will not be shown at the first page of a chapter. But the footer will also vanish then. To keep the footer but remove the header you could use this code in your preamble instead:

Code: Select all

\fancypagestyle{plain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{\includegraphics[width=0.15\textwidth]{logo}}
\cfoot{\vspace{0.4cm}\thepage}
\rfoot{\includegraphics[width=0.15\textwidth]{logo}}
}
Stefan
LaTeX.org admin
Coen
Posts: 17
Joined: Thu May 15, 2008 11:03 am

Re: no headers at first page of chapter

Post by Coen »

That did the trick! Thanks!

It may sound a bit lazy but do you happen to have a solution to make the page numbering of the appendices start with A1, A2 -- A15, B1, B2 etc etc?

Next friday the job has to be done so I'm sort of running out of time to browse the internet for a solution. :)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

no headers at first page of chapter

Post by Stefan Kottwitz »

Hi Coen,

try this directly after \appendix:

Code: Select all

\let\stdchaptermark\chaptermark
\renewcommand*\chaptermark[1]{\stdchaptermark{#1}\setcounter{page}{1}}
\renewcommand*\thepage{\thechapter\arabic{page}}
I just used \chaptermark to reset the page counter and redefined how it's displayed.

Stefan
LaTeX.org admin
Post Reply