Is it possible just to generate a table of contents based on sections in asterisk mode, i.e., \section*? I basically just want the table of contents without section numbers. Like a list of headings and their associated pages.
The following doesn't generate a ToC:
\documentclass[12pt,a4paper]{article}
\begin{document}
\tableofcontents
\subsection*{Section 1}
\subsection*{Section 2}
\end{document}


\setcounter{secnumdepth}{-2}will remove the numbering also for parts (and all levels below). – egreg Oct 02 '11 at 12:41\setcounter{secnumdepth}{0}in a special place? – Frank Ejby Poulsen Jan 22 '14 at 18:26\begin{document}– egreg Jan 22 '14 at 20:56