diff --git a/sphinx/texinputs/sphinxhowto.cls b/sphinx/texinputs/sphinxhowto.cls index 6980f10a1..42c44d29e 100644 --- a/sphinx/texinputs/sphinxhowto.cls +++ b/sphinx/texinputs/sphinxhowto.cls @@ -92,7 +92,7 @@ % so no page break before it. \newenvironment{sphinxthebibliography}[1]{% \begin{thebibliography}{1}% - \addcontentsline{toc}{section}{\bibname}}{\end{thebibliography}} + \addcontentsline{toc}{section}{\ifdefined\refname\refname\else\ifdefined\bibname\bibname\fi\fi}}{\end{thebibliography}} % Same for the indices.