diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-05 20:50:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-05 20:50:08 +0000 |
commit | 1891a47167e1e153a4175f7a58e384bf5d700e16 (patch) | |
tree | 0b53c4e711129f56e365201a17b565ba55bc3392 /Master/texmf-dist/source/latex/hyperref/nameref.dtx | |
parent | 14f07ab853431454a65ea9b5893a260a77ace137 (diff) |
hyperref (5oct19)
git-svn-id: svn://tug.org/texlive/trunk@52295 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/nameref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/nameref.dtx | 109 |
1 files changed, 102 insertions, 7 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/nameref.dtx b/Master/texmf-dist/source/latex/hyperref/nameref.dtx index d955ff41ed0..d8801b576b1 100644 --- a/Master/texmf-dist/source/latex/hyperref/nameref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/nameref.dtx @@ -3,8 +3,9 @@ %% Copyright (C) 1995-1999 Sebastian Rahtz %% 2000 Sebastian Rahtz, Heiko Oberdiek %% 2001-2012 Heiko Oberdiek -%% 2016 Oberdiek Package Suport Group -%% https://github.com/ho-tex/hyperref/issues +%% 2016-2019 Oberdiek Package Suport Group +%% 2019- The LaTeX3 Project +%% https://github.com/latex3/hyperref/issues %% %% This file is part of the `Hyperref Bundle'. %% ------------------------------------------- @@ -19,7 +20,7 @@ %% %% This work has the LPPL maintenance status `maintained'. %% -%% The Current Maintainer of this work is Heiko Oberdiek. +%% The Current Maintainer of this work is The LaTeX3 Project. %% %% The list of all files belonging to the `Hyperref Bundle' is %% given in the file `manifest.txt'. @@ -32,7 +33,7 @@ %<driver>\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2019/09/12 v2.45 Cross-referencing by name of section]% + [2019/09/16 v2.46 Cross-referencing by name of section]% % % % \iffalse @@ -54,8 +55,9 @@ }% }% \author{Sebastian Rahtz (deceased)\\% - Heiko Oberdiek (maintainer)\\% - \texttt{https://github.com/ho-tex/hyperref/issues}}% + Heiko Oberdiek (inactive)\\% + The \LaTeX3 Project\\% + \texttt{https://github.com/latex3/hyperref/issues}}% \date{\filedate}% \maketitle \makeatletter @@ -757,7 +759,100 @@ \AtBeginDocument{% \ifx\csname @@vpageref\endcsname\relax \else - \let\NR@@vpageref\@@vpageref +%FMi +% \end{macrocode} +% Test if we are using the new varioref ... +% \begin{macrocode} + \ifdefined\vp@gerefstar + \let\NR@@vpageref\@@vpageref +% \end{macrocode} +% if not then old patching code +% \begin{macrocode} + \else + \def\NR@@vpageref#1[#2]#3{% + \leavevmode\unskip + \global\advance\c@vrcnt\@ne + \@ifundefined{r@\the\c@vrcnt @vr}% + {\@namedef{r@\the\c@vrcnt @vr}{{??}{??}{}{}{}}}{}% + \edef\@tempa{% + \expandafter\expandafter\expandafter + \@secondoffive\csname r@\the\c@vrcnt @vr\endcsname + }% + \@ifundefined{r@\the\c@vrcnt @xvr}% + {\@namedef{r@\the\c@vrcnt @xvr}{{??}{??}{}{}{}}}{}% + \edef\@tempb{% + \expandafter\expandafter\expandafter + \@secondoffive\csname r@\the\c@vrcnt @xvr\endcsname + }% + {% + \let\@currentlabel\@empty + \expandafter\label\expandafter{\the\c@vrcnt @xvr}% + }% + \ifx\@tempa\@tempb + \else + \vref@err{% + \noexpand\vref at page boundary % + \@tempb-\@tempa\space (may loop)% + }% + \fi + \@ifundefined{r@#3}{\@namedef{r@#3}{{??}{??}{}{}{}}}{}% + \edef\thevpagerefnum{% + \expandafter\expandafter\expandafter + \@secondoffive\csname r@#3\endcsname + }% + \ifx\vref@space\@undefined + \space + \else + \vref@space + \fi + \ifx\@tempa\thevpagerefnum + #1% + \else + #2% + \is@pos@number\thevpagerefnum{% + \is@pos@number\@tempa{% + \@tempcnta\@tempa + \advance\@tempcnta\@ne + }{% + \@tempcnta\maxdimen + }% + \ifnum \thevpagerefnum =\@tempcnta + \ifodd\@tempcnta + \if@twoside + \reftextfaceafter + \else + \reftextafter + \fi + \else + \reftextafter + \fi + \else + \advance\@tempcnta-2 % + \ifnum \thevpagerefnum =\@tempcnta + \ifodd\@tempcnta + \reftextbefore + \else + \if@twoside + \reftextfacebefore + \else + \reftextbefore + \fi + \fi + \else + \reftextfaraway{#3}% + \fi + \fi + }{% + \reftextfaraway{#3}% + }% + \fi + {% + \let\@currentlabel\@empty + \expandafter\label\expandafter{\the\c@vrcnt @vr}% + }% + }% + \fi +%FM - end mod \def\@@vpageref#1[#2]#3{% \begingroup \csname @safe@activestrue\endcsname |