# How to change the headers of the ToC when using fancyhdr/extramarks?

WIth fancyhdr, one must use the package extramarks to get the headers of the subsections right; but for the old hack:

\markboth{WEWFE}{ONWOOQ}


no longer works. For the section headers I use \firstleftmark and the last version.

My setting is:

\documentclass[a4paper, 11pt]{article}
\usepackage{lipsum}
\usepackage{fancyhdr}
\usepackage{extramarks}
\pagestyle{fancy}
%
\fancyhf{}
\fancyfoot{}
\renewcommand{\sectionmark}[1]{\markboth{\thesection\ {#1}}{}}
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ {#1}}}
%
\begin{document}
\tableofcontents
%
\section{first section}
%
\lipsum[1]
%
\subsection{first subsection}
%
\lipsum[1]
%
\end{document}


The problem is that table of content is printed as a subsection [so in the middle of the header] not as a section [it should be on the left of the header]

I want precisely the converse, because the ToC is considered as actually a section, not a subsection!

-
Your code is not complete and does not compile. –  karlkoeller Sep 11 '13 at 4:52
@paul Added the lines of code necessary to compile, but from the PDF I see that the contents is printed on the left and not in the middle. –  Andrea L. Sep 11 '13 at 6:23