4

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?

3

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

You can use the tocvsec2 package to change the tocdepth to 1 just before the subsection (you can restore the value after the bibliography, if needed). I also used the etoolbox package to patch \thebibliography and suppress the default title:

\documentclass{article}
\usepackage{tocvsec2}
\usepackage{etoolbox}

\patchcmd{\thebibliography}{\section*{\refname}}{}{}{}

\begin{document}

\tableofcontents

\section{My Section}

\settocdepth{section}
\subsection{References}
\begin{thebibliography}{}
\bibitem{notes} John W. Dower {\em Readings compiled for History
  21.479.}  1991.
\end{thebibliography}
%\settocdepth{subsection}% in case you need this

\end{document}

enter image description here

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.