LaTeX pagestyle confusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[twoside]{article} | |
\usepackage{fancyhdr} | |
\usepackage{extramarks} | |
\setlength{\headheight}{14pt} | |
\fancypagestyle{ttlpage}{ | |
\fancyhf{} | |
\fancyhead[L]{First page head} | |
} | |
\fancypagestyle{simple}{ | |
\fancyhf{} | |
\fancyhead[LE, RO]{\thepage} | |
} | |
\fancypagestyle{main}{ | |
\fancyhf{} | |
\fancyhead[LE, RO]{\thepage} | |
\fancyhead[LO]{\firstleftmark} | |
\fancyhead[RE]{\lastrightmark} | |
} | |
\begin{document} | |
\thispagestyle{ttlpage} % Causes problems. | |
%\pagestyle{ttlpage} % Works fine. | |
first page | |
\newpage | |
\pagestyle{empty} % With \thispagestyle above, causes missing \firstleftmark and \lastrightmark | |
%\pagestyle{simple} % With \thispagestyle above, causes "CONTENTS" to be printed instead of "INTRODUCTION", | |
\tableofcontents | |
\newpage | |
\pagestyle{main} | |
\section{Introduction} | |
\subsection{Foo} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment