1

I have a toc with 2 pages. The second page has a page number (II), but the first not. What have I to do? I want a page number one the first toc page (I).

Thanks

\documentclass[deutsch]{llncs}
\pagestyle{headings}
\begin{document}

\pagenumbering{Roman}
\setcounter{page}{1}
\thispagestyle{headings}
\pdfbookmark{\contentsname}{toc}\tableofcontents
\newpage
\phantomsection
\cleardoublepage 

\pagenumbering{arabic}
\setcounter{page}{1}
\maketitle
  • This is the default for many document classes... and your example misses some features: bookmark or hyperref package and \end{document} – user31729 Mar 29 '15 at 17:39
  • In any case, keep in mind, that Springer eventually does not like a numbered first ToC page and will reject a hack – user31729 Mar 29 '15 at 18:02
5

The llncs class defines \chapter to have no page number on the chapter start page. Since \tableofcontents is effectively using \chapter*, the empty page style applies to the toc starter page too.

This code removes the \thispagestyle temporarily for the ToC only.

\documentclass[deutsch]{llncs}
\usepackage{xpatch}

\let\classtableofcontents\tableofcontents%

\renewcommand{\tableofcontents}{%
  \begingroup%
  \xpatchcmd{\chapter}{\thispagestyle{empty}}{}{}{}%
  \classtableofcontents%
  \endgroup%
}

\usepackage{bookmark}



\pagestyle{headings}
\begin{document}


\pagenumbering{Roman}
\setcounter{page}{1}
\thispagestyle{headings}
\pdfbookmark{\contentsname}{toc}
\tableofcontents
\newpage
\phantomsection
\cleardoublepage 

\pagenumbering{arabic}
\setcounter{page}{1}
\maketitle

\end{document}

Alternatively it's possible to use

\let\classtableofcontents\tableofcontents%

\renewcommand{\tableofcontents}{%
  \begingroup%
  \let\origthispagestyle\thispagestyle
  \renewcommand{\thispagestyle}[1]{%
    }
  \classtableofcontents%
  \endgroup%
}

enter image description here

  • 2
    @Michael Remember that the best way to say thanks in this site is to accept answers that solve your issues. See How do you accept an answer? for more info. – karlkoeller Mar 29 '15 at 18:45

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.