From 69d3480ef768715d1313da569c388abe7805c327 Mon Sep 17 00:00:00 2001 From: jfbu Date: Tue, 25 Oct 2016 22:30:40 +0200 Subject: [PATCH] Fix again hyperref duplicate destination warnings The method at 4e88bfe worked only for page 1. This moves to ``\maketitle`` the whole control. --- sphinx/texinputs/sphinxmanual.cls | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sphinx/texinputs/sphinxmanual.cls b/sphinx/texinputs/sphinxmanual.cls index 3a200a060..a56a2bf20 100644 --- a/sphinx/texinputs/sphinxmanual.cls +++ b/sphinx/texinputs/sphinxmanual.cls @@ -40,8 +40,10 @@ % ``Bjarne'' style a bit better. % \renewcommand{\maketitle}{% + \let\spx@tempa\relax + \ifHy@pageanchor\def\spx@tempa{\Hy@pageanchortrue}\fi + \hypersetup{pageanchor=false}% avoid duplicate destination warnings \begin{titlepage}% - \hypersetup{pageanchor=false}% avoid duplicate destination page.1 warning \let\footnotesize\small \let\footnoterule\relax \noindent\rule{\textwidth}{1pt}\ifsphinxpdfoutput\newline\null\fi\par @@ -81,11 +83,11 @@ \setcounter{footnote}{0}% \let\thanks\relax\let\maketitle\relax %\gdef\@thanks{}\gdef\@author{}\gdef\@title{} + \if@openright\cleardoublepage\else\clearpage\fi + \spx@tempa } \newcommand{\sphinxtableofcontents}{% - % before resetting page counter, let's do the right thing. - \if@openright\cleardoublepage\else\clearpage\fi \pagenumbering{roman}% \pagestyle{plain}% \begingroup