7

Does anybody know how to eliminate the numbering only in sections D and E, whereby the title itself for the Section D or Section E should start exactly at the beginning of the line? Additionally, the section numbers should not appear within the table of contents and should start exactly at the beginning of the corresponding line. Thanks in advance!

\documentclass[12pt]{article}

\begin{document}
\newpage
\tableofcontents
\section {Section A}
\section {Section B}
\section {Section C}
\section {Section D}
\section {Section E}
\end{document}
2
  • 3
    do you mean \section*{Section D}? – cmhughes Aug 12 '13 at 7:58
  • 1
    @cmhughes exactly, I've tried it, and the chronological number disappears, that's what i wanted to have, but after doing so, both sections are not shown within the table of contents any more, any idea? – ajafarov Aug 12 '13 at 8:13
17

You can also use \setcounter{secnumdepth}{0} to get rid of numbers:

\documentclass[12pt]{article}

\begin{document}
\tableofcontents
\section{Section A}
\section{Section B}
\section{Section C}
\setcounter{secnumdepth}{0} %% no numbering
\section{Section D}
\setcounter{secnumdepth}{1} %% Start numbering again
\section{Section E}

\end{document}
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.