0

I'm using the article class and I want to include my appendix and my literature chapter without numbering in my toc. My code looks like this:

\documentclass[a4paper]{article}
\usepackage[natbibapa]{apacite}

\begin{document}
    
    \tableofcontents
    
    \clearpage
    
    \section{Introduction}
    \section{Theory}
    \section{Conclusion}
    
    \bibliography{bibliography}
    \bibliographystyle{apacite}
    
    \section{Appendix}
    \subsection{Results}
    \subsection{Code}
    
\end{document}}

Which results in this:

enter image description here

What I want is this:

enter image description here

I still want to have the page numbers in my toc, but not the chapter numbers. Btw I built this minimal version to show my problem. The actual document is quite large and I'm using many packages, so changing the document class would not be really an option for me.

1
  • Welcome to TSE. article is a class, not a package. Nov 8 '21 at 19:00
0

The article class does not have chapters. To stop the numbering of sections use \setcounter{secnumdepth}{0}

 \documentclass[a4paper]{article}
\usepackage[natbibapa]{apacite}

\begin{document}
    
    \tableofcontents
    
    \clearpage
    
    \section{Introduction}
    \section{Theory}
    \section{Conclusion}
    
\setcounter{secnumdepth}{0} % PW added to stop section numbering

    \bibliography{bibliography}
    \bibliographystyle{apacite}
    
    \section{Appendix}
    \subsection{Results}
    \subsection{Code}
    
\end{document}}
1
  • Thank you very much!
    – Max
    Nov 8 '21 at 19:09

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.