I would like to use \leftmark
and \rightmark
, but have "Contents" appear only once (on the left) in the header. Instead, it appears as both the \leftmark
and the \rightmark
.
The following MWE illustrates the problem:
\documentclass[12pt]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{\leftmark}
\rhead{\rightmark}
\begin{document}
\tableofcontents
\end{document}
Best Answer
Change the definition of
\tableofcontents
.