remove unneeded `\phantomsection` from LaTeX style files

This commit is contained in:
jfbu
2017-02-25 12:34:41 +01:00
parent fc9a02af3c
commit f3e071aba9
3 changed files with 5 additions and 9 deletions

View File

@@ -1142,7 +1142,7 @@
{\end{theindex}}
\renewenvironment{sphinxthebibliography}[1]
{\cleardoublepage\phantomsection
{\cleardoublepage% \phantomsection % not needed here since TeXLive 2010's hyperref
\begin{thebibliography}{1}}
{\end{thebibliography}}
\fi

View File

@@ -85,10 +85,8 @@
% For an article document class this environment is a section,
% so no page break before it.
%
% Note: \phantomsection is required for TeXLive 2009
% http://tex.stackexchange.com/questions/44088/when-do-i-need-to-invoke-phantomsection#comment166081_44091
\newenvironment{sphinxthebibliography}[1]{%
\phantomsection
% \phantomsection % not needed here since TeXLive 2010's hyperref
\begin{thebibliography}{1}%
\addcontentsline{toc}{section}{\ifdefined\refname\refname\else\ifdefined\bibname\bibname\fi\fi}}{\end{thebibliography}}
@@ -99,6 +97,6 @@
\@ifclassloaded{memoir}
{\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}
{\newenvironment{sphinxtheindex}{%
\phantomsection
\phantomsection % needed because no chapter, section, ... is created by theindex
\begin{theindex}%
\addcontentsline{toc}{section}{\indexname}}{\end{theindex}}}

View File

@@ -104,11 +104,9 @@
% Contents.
% For a report document class this environment is a chapter.
%
% Note: \phantomsection is required for TeXLive 2009
% http://tex.stackexchange.com/questions/44088/when-do-i-need-to-invoke-phantomsection#comment166081_44091
\newenvironment{sphinxthebibliography}[1]{%
\if@openright\cleardoublepage\else\clearpage\fi
\phantomsection
% \phantomsection % not needed here since TeXLive 2010's hyperref
\begin{thebibliography}{1}%
\addcontentsline{toc}{chapter}{\bibname}}{\end{thebibliography}}
@@ -119,6 +117,6 @@
{\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}
{\newenvironment{sphinxtheindex}{%
\if@openright\cleardoublepage\else\clearpage\fi
\phantomsection
\phantomsection % needed as no chapter, section, ... created
\begin{theindex}%
\addcontentsline{toc}{chapter}{\indexname}}{\end{theindex}}}