# Tableofcontents: Remove pagenumbering from TOC (not first page)

I would like to create a \tableofcontents (no modifications) but without page numbering. So here this is very minimal-MWE:

\documentclass[13pt,a4paper,headlines=6,headinclude=true]{scrartcl}
\begin{document}

\tableofcontents

\newpage
\section{Topic A}
\section{Topic B}

\end{document}


• Are you going to use hyperref? – user31729 Jun 14 '15 at 19:50
• I think I can do without hyperref. What solution is there? – Mac Jun 14 '15 at 19:54
• Forget my statement about hyperref. It works too with hyperref, see my solution below – user31729 Jun 14 '15 at 19:59

Unless the KOMA classes do not provide other means, the easiest way is to patch the \thepage in \addcontentsline out.

This is the definition of \addcontentsline in latex.ltx:

\def\addcontentsline#1#2#3{%


By applying a patch to kick the \thepage out, there will be an empty {} pair then, i.e. no page number.

\documentclass[13pt,a4paper,headlines=6,headinclude=true]{scrartcl}

\usepackage{xpatch}

{\thepage}%
}{{}}{\typeout{success}}{}

\begin{document}

\tableofcontents

\clearpage
\section{Topic A}
\section{Topic B}

\end{document}