[Tex/LaTex] How to remove “thebibliography” from the Table of Contents (TOC)

bibliographiessectioningtable of contents

I want to use a manual Bibliography but I need it as a subsection. In order to do this I did:

\documentclass[12pt]{article}

\begin{document}

\section{My Section}

\subsection{References}

\begingroup

\renewcommand{\section}[2]{}%

\begin{thebibliography}{}

\bibitem{notes} John W. Dower {\em Readings compiled for History
  21.479.}  1991.

\end{thebibliography}
\endgroup

\end{document}

By doing this, I am hiding the default "References" section title and replacing it with my manual \subsection{References} title. This works great, but the problem I am having right now is that the default "References" title shows up on my Table of Contents when I use \tableofcontents. How can I remove the default title (the one created by \begin{thebibliography}{}) from my Table of Contents?

Best Answer

Without using any packages, you can just remove the \addcontentsline macro's functionality before calling \subsection{References}:

enter image description here

\documentclass[12pt]{article}

\begin{document}
\tableofcontents
\section{My Section}

\begingroup
\renewcommand{\addcontentsline}[3]{}% Remove functionality of \addcontentsline
\renewcommand{\section}[2]{}% Remove functionality of \section
\subsection{References}

\begin{thebibliography}{}
  \bibitem{notes} John W. Dower {\em Readings compiled for History
    21.479.}  1991.
\end{thebibliography}
\endgroup

\end{document}