diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/nameref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/nameref.sty | 96 |
1 files changed, 91 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/nameref.sty b/Master/texmf-dist/tex/latex/hyperref/nameref.sty index 223af8d259e..39f275e642b 100644 --- a/Master/texmf-dist/tex/latex/hyperref/nameref.sty +++ b/Master/texmf-dist/tex/latex/hyperref/nameref.sty @@ -10,8 +10,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'. %% ------------------------------------------- @@ -26,13 +27,13 @@ %% %% 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'. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{nameref} - [2019/09/12 v2.45 Cross-referencing by name of section]% + [2019/09/16 v2.46 Cross-referencing by name of section]% \RequirePackage{refcount}[2006/02/12] \RequirePackage{gettitlestring}[2009/12/18] \RequirePackage{ltxcmds}[2009/12/12] @@ -395,7 +396,92 @@ \AtBeginDocument{% \ifx\csname @@vpageref\endcsname\relax \else - \let\NR@@vpageref\@@vpageref + \ifdefined\vp@gerefstar + \let\NR@@vpageref\@@vpageref + \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 \def\@@vpageref#1[#2]#3{% \begingroup \csname @safe@activestrue\endcsname |