summaryrefslogtreecommitdiff
path: root/sphinx/texinputs/sphinxhowto.cls
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/texinputs/sphinxhowto.cls')
-rw-r--r--sphinx/texinputs/sphinxhowto.cls11
1 files changed, 11 insertions, 0 deletions
diff --git a/sphinx/texinputs/sphinxhowto.cls b/sphinx/texinputs/sphinxhowto.cls
index 1ebdd434..f4e3d2f4 100644
--- a/sphinx/texinputs/sphinxhowto.cls
+++ b/sphinx/texinputs/sphinxhowto.cls
@@ -79,3 +79,14 @@
\pagenumbering{arabic} % ToC & chapters
\thispagestyle{empty}
+
+% Fix the bibliography environment to add an entry to the Table of
+% Contents.
+% For an article document class this environment is a section,
+% so no page break before it.
+\let\py@OldThebibliography=\thebibliography
+\renewcommand{\thebibliography}[1]{
+ \phantomsection
+ \py@OldThebibliography{1}
+ \addcontentsline{toc}{section}{\bibname}
+}