2

Using fancyhdr is there a way to restrict the header to just the Chapter names (ignoring any section names?)

Spinning off of my previous question [here]:1 I would like to limit the header information to just include the name of the corresponding Chapter.

I place here the MWE from the selected answer from the previous question.

\documentclass[12pt, a4paper, twoside]{book}
\usepackage{fancyhdr}
\fancypagestyle{headings}{%
\cfoot{\page}
}
\pagestyle{headings}

\begin{document}
\chapter{introduction}
\section{description}
Hello. This is an example
\end{document}

In this way, the Section "Description" will NOT be in the header, only the Chapter "Introduction".

4

Is this what you want?

\documentclass[12pt, a4paper, twoside]{book}
\usepackage{fancyhdr}
\cfoot{\thepage}
\lhead[\leftmark]{}
\rhead[]{\leftmark}

\usepackage{lipsum}
\begin{document}\pagestyle{fancy}

\chapter{introduction}
\section{description}
\lipsum[1-20]
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.