Code: Select all
\documentclass[11pt,letterpaper,twoside]{article}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
% For the ToC :
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} % Add . . . for sections.
% For headers :
\usepackage[pagestyles,medium]{titlesec}
\titleformat*{\subsubsection}{\bfseries\sffamily}
% Header :
\newpagestyle{principal}{
\sethead[\thepage][][\slshape\footnotesize\MakeUppercase{Name on right}]{\slshape{\footnotesize{Name on left}}}{}{\thepage}
\headrule
}
\begin{document}
\pagestyle{principal}
\tableofcontents
\newpage
\section{Title 1}
\newpage
\section{Title 2}
\newpage
\section{Title 3}
\end{document}
What is wrong with this code ?
EDIT : Hmm, changing the order of
\pagestyle{principal}
and \tableofcontents
appears to solve the issue, but I don't understand what is happening here.