# How to remove the chapter number of the appendix and the literature chapter in toc?

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:

What I want is this:

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.

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

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}}

• Thank you very much!
– Max
Nov 8 '21 at 19:09