diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/nameref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/nameref.sty | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/nameref.sty b/Master/texmf-dist/tex/latex/hyperref/nameref.sty index 3bd60559908..32270fb3f4b 100644 --- a/Master/texmf-dist/tex/latex/hyperref/nameref.sty +++ b/Master/texmf-dist/tex/latex/hyperref/nameref.sty @@ -20,8 +20,9 @@ %% given in the file `manifest.txt'. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{nameref} - [2009/12/02 v2.33 Cross-referencing by name of section]% + [2009/12/08 v2.34 Cross-referencing by name of section]% \RequirePackage{refcount}[2006/02/12] +\RequirePackage{gettitlestring}[2009/12/08] \def\strip@period#1.\relax#2\@@@{#1} \newif\ifNR@showkeys \NR@showkeysfalse @@ -114,23 +115,8 @@ \endgroup } \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 } \let\NR@sect\@sect \newcounter{section@level} @@ -159,10 +145,17 @@ \NR@gettitle{#1}% \NR@schapter{#1}% } -\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}]% + }% + }% } \AtBeginDocument{% \@ifpackageloaded{longtable}{% |