From 01aade3322bbb50b565fbb94ed1bade7a0726478 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 11 Dec 2009 01:05:57 +0000 Subject: hyperref update (10dec09) git-svn-id: svn://tug.org/texlive/trunk@16351 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/hyperref/backref.dtx | 56 +++++++--------- .../texmf-dist/source/latex/hyperref/hyperref.dtx | 77 +++++++++++----------- .../texmf-dist/source/latex/hyperref/nameref.dtx | 63 +++++++++++------- 3 files changed, 103 insertions(+), 93 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/hyperref/backref.dtx b/Master/texmf-dist/source/latex/hyperref/backref.dtx index 8a24e6d27dd..03ab5294d44 100644 --- a/Master/texmf-dist/source/latex/hyperref/backref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/backref.dtx @@ -22,9 +22,9 @@ %\ProvidesFile{backref.drv} % \fi % \ProvidesFile{backref.dtx} - [2009/11/14 v1.29 Bibliographical back referencing]% + [2009/12/09 v1.30 Bibliographical back referencing]% % -% \CheckSum{620} +% \CheckSum{610} % % \iffalse %<*driver> @@ -712,40 +712,34 @@ }% }% \endgroup -\AtBeginDocument{% - \AtEndDocument{% - \clearpage - \if@filesw - \immediate\write\@mainaux{% - \string\csname\space BR@CheckEnd\string\endcsname - }% - \fi - }% % \end{macrocode} % \begin{macro}{\BR@CheckEnd} % \begin{macrocode} - \def\BR@CheckEnd{% - \begingroup - \@ifundefined{tf@brf@open}{}{% - \immediate\closeout\tf@brf +\def\BR@CheckEnd{% + \begingroup + \@ifundefined{tf@brf@open}{}{% + \immediate\closeout\tf@brf + }% + \edef\BR@CheckSumAfter{% + \@ifundefined{pdf@filemdfivesum}{}{% + \pdf@filemdfivesum{\jobname.brf}% }% - \edef\BR@CheckSumAfter{% - \@ifundefined{pdf@filemdfivesum}{}{% - \pdf@filemdfivesum{\jobname.brf}% - }% - :% - \@ifundefined{pdf@filesize}{}{% - \pdf@filesize{\jobname.brf}% - }% + :% + \@ifundefined{pdf@filesize}{}{% + \pdf@filesize{\jobname.brf}% }% - \ifx\BR@CheckSumBefore\BR@CheckSumAfter - \else - \PackageWarningNoLine{backref}{% - Rerun to get bibliographical references right% - }% - \fi - \endgroup - }% + }% + \ifx\BR@CheckSumBefore\BR@CheckSumAfter + \else + \PackageWarningNoLine{backref}{% + Rerun to get bibliographical references right% + }% + \fi + \endgroup +}% +\RequirePackage{atveryend}[2009/12/07] +\AtVeryEndDocument{% + \BR@CheckEnd } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 9b27b632bef..64f3022d432 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -38,7 +38,7 @@ %\ProvidesFile{puenc.def} %\ProvidesFile{puvnenc.def} %\ProvidesFile{puarenc.def} -% [2009/11/27 v6.79k +% [2009/12/09 v6.79m % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -115,7 +115,7 @@ \end{document} % % \fi -% \CheckSum{24997} +% \CheckSum{24988} % % \MakeShortVerb{|} % \StopEventually{} @@ -1177,6 +1177,9 @@ % \begin{macrocode} \let\ignorespaces\HyPsd@ignorespaces % \end{macrocode} +% \begin{macrocode} +\let\Hy@SectionAnchor\@empty +% \end{macrocode} % % \paragraph{Patch for cjk bookmarks.} % \begin{macrocode} @@ -5306,7 +5309,7 @@ % |\ProcessKeyvalOptions|, formerly known as % |\ProcessOptionsWithKV|. % \begin{macrocode} -\RequirePackage{kvoptions}[2006/08/17] +\RequirePackage{kvoptions}[2009/04/10] % \end{macrocode} % % Add option |tex4ht| if package |tex4ht| is loaded. @@ -8012,14 +8015,14 @@ % \end{macrocode} % \end{macro} % -% At the end of the document, \cmd{\clearpage} tries -% to make sure, that no further pages will follow. +% Package \textsf{atveryend} is used to get behind the +% final \cs{clearpage} and to avoid a \cs{clearpage} +% in \cs{AtEndDocument}. % Then the PDF catalog entry for |\PageLabels| is set. % \begin{macrocode} - \@ifclassloaded{revtex4}{% - \g@addto@macro\clear@document{\HyPL@SetPageLabels}% - }{% - \AtEndDocument{\clearpage\HyPL@SetPageLabels}% + \RequirePackage{atveryend}[2009/12/07]% + \AtVeryEndDocument{% + \HyPL@SetPageLabels }% % \end{macrocode} % @@ -9054,7 +9057,11 @@ \else \hyper@makecurrent{\@captype}% \fi - \def\@currentlabelname{#2}% + \@ifundefined{NR@gettitle}{% + \def\@currentlabelname{#2}% + }{% + \NR@gettitle{#2}% + }% \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% }% @@ -16476,6 +16483,7 @@ % % \begin{macro}{\Hy@OutlineRerunCheck} % \begin{macrocode} +\RequirePackage{atveryend}[2009/12/07] \def\Hy@OutlineRerunCheck{% \begingroup \xdef\Hy@OutlineCheckSumBefore{% @@ -16488,37 +16496,28 @@ }% }% \endgroup - \AtEndDocument{% - \clearpage - \if@filesw - \immediate\write\@mainaux{% - \string\csname\space Hy@OutlineCheckEnd\string\endcsname - }% - \fi - }% + \AtVeryEndDocument{\Hy@OutlineCheckEnd}% } -\AtBeginDocument{% - \def\Hy@OutlineCheckEnd{% - \begingroup - \immediate\closeout\@outlinefile - \edef\Hy@OutlineCheckSumAfter{% - \@ifundefined{pdf@filemdfivesum}{}{% - \pdf@filemdfivesum{\jobname.out}% - }% - :% - \@ifundefined{pdf@filesize}{}{% - \pdf@filesize{\jobname.out}% - }% +\def\Hy@OutlineCheckEnd{% + \begingroup + \immediate\closeout\@outlinefile + \edef\Hy@OutlineCheckSumAfter{% + \@ifundefined{pdf@filemdfivesum}{}{% + \pdf@filemdfivesum{\jobname.out}% }% - \ifx\Hy@OutlineCheckSumBefore\Hy@OutlineCheckSumAfter - \else - \Hy@WarningNoLine{% - Rerun to get outlines right\MessageBreak - or use package `bookmark'% - }% - \fi - \endgroup - }% + :% + \@ifundefined{pdf@filesize}{}{% + \pdf@filesize{\jobname.out}% + }% + }% + \ifx\Hy@OutlineCheckSumBefore\Hy@OutlineCheckSumAfter + \else + \Hy@WarningNoLine{% + Rerun to get outlines right\MessageBreak + or use package `bookmark'% + }% + \fi + \endgroup } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/hyperref/nameref.dtx b/Master/texmf-dist/source/latex/hyperref/nameref.dtx index c17b0a301cb..674080c1ea1 100644 --- a/Master/texmf-dist/source/latex/hyperref/nameref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/nameref.dtx @@ -24,9 +24,9 @@ %\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2009/12/02 v2.33 Cross-referencing by name of section]% + [2009/12/08 v2.34 Cross-referencing by name of section]% % -% \CheckSum{610} +% \CheckSum{580} % % \iffalse %<*driver> @@ -76,6 +76,30 @@ % September 28th changes by David Carlisle.\\ % More recent changes are recorded in ChangeLog. % +% The versions before 2009/11/27 v2.32 did not expand the +% title strings (of \cs{section}, \cs{caption}, \dots). +% Then the behaviour switched to expanding, because this +% allows to remove unwanted macros (\cs{label}, \dots). +% Despite this method is used in package \textsf{titleref} +% and class \textsf{memoir}, the first feedbacks let me conclude +% that this is not robust enough. Therefore I wrote package +% \textsf{gettitlestring} that uses the non-expanding +% method as default. It also allows me to use this package +% in package \textsf{zref-titleref}. +% See the package documentation of package \textsf{gettitlestring} +% how to change the method. It also provides a hook to remove +% additional unwanted macros, not supported by the package. +% Example: +%\begin{quote} +%\begin{verbatim} +%\usepackage{gettitlestring} +%\GetTitleStringDisableCommands{% +% \let\mylabel\@gobble +% \renewcommand\myindex[2]{}% +%} +%\end{verbatim} +%\end{quote} +% % \section{Implementation} % \begin{macrocode} %<*package> @@ -83,6 +107,7 @@ % % \begin{macrocode} \RequirePackage{refcount}[2006/02/12] +\RequirePackage{gettitlestring}[2009/12/08] % \end{macrocode} % % We redefine |\label| so that it also writes the name of the @@ -213,23 +238,8 @@ % % \begin{macrocode} \def\NR@gettitle#1{% - \def\@currentlabelname{#1}% - \begingroup - \let\label\@gobble - \let\index\@gobble - \let\glossary\@gobble - \let\markboth\@gobbletwo - \let\@mkboth\@gobbletwo - \let\markright\@gobble - \let\protect\@unexpandable@protect - \let\phantomsection\@empty - \def\addcontentsline{\expandafter\@gobble\@gobbletwo}% - \edef\x{\endgroup - \noexpand\def\noexpand\@currentlabelname{% - \@currentlabelname - }% - }% - \x + \GetTitleString{#1}% + \let\@currentlabelname\GetTitleStringResult } % \end{macrocode} % @@ -276,10 +286,17 @@ % Captions % % \begin{macrocode} -\let\NR@@caption\@caption -\long\def\@caption#1[#2]{% - \NR@gettitle{#2}% - \NR@@caption{#1}[{#2}]% +\AtBeginDocument{% + \@ifpackageloaded{hyperref}{% + \@ifpackagelater{hyperref}{2009/12/05}\@gobble\@firstofone + }\@firstofone + {% + \let\NR@@caption\@caption + \long\def\@caption#1[#2]{% + \NR@gettitle{#2}% + \NR@@caption{#1}[{#2}]% + }% + }% } % \end{macrocode} % -- cgit v1.2.3