diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-29 00:29:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-29 00:29:08 +0000 |
commit | 488d5ec6dc4b2890e252f2a885acf032fda277b9 (patch) | |
tree | c892418fd486fae06a4441e3f09bbcc7df86a7aa /Master/texmf-dist/tex/latex/hyperref/nameref.sty | |
parent | df28f8be3e367cf694fb500cb02dfbd3780d537c (diff) |
hyperref update (28nov09)
git-svn-id: svn://tug.org/texlive/trunk@16230 c570f23f-e606-0410-a88d-b1316a301751
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, 27 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/nameref.sty b/Master/texmf-dist/tex/latex/hyperref/nameref.sty index 29dcfb9556b..8f9894beef6 100644 --- a/Master/texmf-dist/tex/latex/hyperref/nameref.sty +++ b/Master/texmf-dist/tex/latex/hyperref/nameref.sty @@ -20,7 +20,7 @@ %% given in the file `manifest.txt'. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{nameref} - [2007/05/29 v2.31 Cross-referencing by name of section]% + [2009/11/27 v2.32 Cross-referencing by name of section]% \RequirePackage{refcount}[2006/02/12] \def\strip@period#1.\relax#2\@@@{#1} \newif\ifNR@showkeys @@ -113,36 +113,53 @@ }% \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 + \edef\x{\endgroup + \noexpand\def\noexpand\@currentlabelname{% + \@currentlabelname + }% + }% + \x +} \let\NR@sect\@sect \newcounter{section@level} \def\@sect#1#2#3#4#5#6[#7]#8{% \setcounter{section@level}{#2}% - \def\@currentlabelname{#7}% + \NR@gettitle{#7}% \NR@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{\Sectionformat{#8}{#2}}% } \let\NR@ssect\@ssect \def\@ssect#1#2#3#4#5{% - \def\@currentlabelname{#5}% + \NR@gettitle{#5}% \NR@ssect{#1}{#2}{#3}{#4}{\Sectionformat{#5}{#1}}% } \let\NR@part\@part \def\@part[#1]#2{% - \def\@currentlabelname{#1}% + \NR@gettitle{#1}% \NR@part[{#1}]{#2}% } \let\NR@chapter\@chapter \def\@chapter[#1]#2{% - \def\@currentlabelname{#1}% + \NR@gettitle{#1}% \NR@chapter[{#1}]{#2}% } \let\NR@schapter\@schapter \def\@schapter#1{% - \def\@currentlabelname{#1}% + \NR@gettitle{#1}% \NR@schapter{#1}% } \let\NR@@caption\@caption \long\def\@caption#1[#2]{% - \def\@currentlabelname{#2}% + \NR@gettitle{#2}% \NR@@caption{#1}[{#2}]% } \AtBeginDocument{% @@ -153,7 +170,7 @@ \def\@tempa{#2}% \ifx\@tempa\@empty \else - \def\@currentlabelname{#2}% + \NR@gettitle{#2}% \fi }% }{}% @@ -162,7 +179,7 @@ \@ifpackageloaded{titlesec}{% \let\NRorg@ttl@sect@i\ttl@sect@i \def\ttl@sect@i#1#2[#3]#4{% - \def\@currentlabelname{#4}% + \NR@gettitle{#4}% \NRorg@ttl@sect@i{#1}{#2}[{#3}]{#4}% }% }{}% @@ -175,7 +192,7 @@ \edef\x{\endgroup \long\def\expandafter\noexpand\csname beamer@#1\endcsname [####1]{% hash-ok - \def\noexpand\@currentlabelname{####1}% + \noexpand\NR@gettitle{####1}% \expandafter\noexpand\csname NRorg@beamer@#1\endcsname [{####1}]% }% |