diff options
author | Karl Berry <karl@freefriends.org> | 2012-08-03 21:31:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-08-03 21:31:30 +0000 |
commit | bab961693da2dc268bc289e71ae458271993c75c (patch) | |
tree | 15d5a664e709843efa4b7d9b1aba94bebc87246d /Master/texmf-dist/source/latex/hyperref/hyperref.dtx | |
parent | d17e2b92c41d19da876a3ede4bb61ec4f316199d (diff) |
hyperref
git-svn-id: svn://tug.org/texlive/trunk@27298 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/hyperref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 68 |
1 files changed, 62 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index f4a8744d2ab..f20946dfdbe 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -45,7 +45,7 @@ %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} %<psdextra>\ProvidesFile{psdextra.def} -%<!none> [2012/07/30 v6.82w % +%<!none> [2012/08/03 v6.82y % %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -147,7 +147,7 @@ \end{document} %</driver> % \fi -% \CheckSum{37293} +% \CheckSum{37357} % % \MakeShortVerb{|} % \StopEventually{} @@ -2079,7 +2079,12 @@ \DeclareFontFamily{PU}{pdf}{}% \DeclareFontShape{PU}{pdf}{m}{n}{ <-> cmr10 }{}% \DeclareFontSubstitution{PU}{pdf}{m}{n}% - \input{psdextra.def}% + \ifHy@psdextra + \edef\Hy@atrestore{\catcode64=\the\catcode64\relax}% @ + \makeatletter + \input{psdextra.def}% + \Hy@atrestore + \fi \let\HyPsd@LoadUnicode\relax } % \end{macrocode} @@ -10289,9 +10294,7 @@ \let\theHequation\newname }{}% \fi - \@ifundefined{theH#1}{% - \expandafter\def\csname theH#1\endcsname{\arabic{#1}}% - }{}% + \HyCnt@ProvideTheHCounter{#1}% \hyper@makecurrent{#1}% \ifmeasuring@ \else @@ -10302,6 +10305,59 @@ } % \end{macrocode} % \end{macro} +% \begin{macro}{\Hy@ProvideTheHCounter} +% \cs{theH<counter>} is not set for counters that +% are defined before `hyperref' is loaded. +% In \cs{cl@@ckpt}, the clear counter list of +% the artificial counter |@ckpt|, \LaTeX\ remembers +% the defined counters (needed for \cs{include}). We check +% the clear counter lists, whether our counter is present. +% If we found it, then we add the parent counter value +% to \cs{theH<counter>}. The \cs{@elt} list is +% used in sanitized form for the comparison, because the list +% might contain other stuff than \cs{@elt}s. Also it simplifies +% the implementation, because \LaTeX', substring search +% \cs{in@} can be used. +% \begin{macrocode} +\def\HyCnt@ProvideTheHCounter#1{% + \@ifundefined{theH#1}{% + \expandafter\def\csname theH#1\endcsname{}% + \def\Hy@temp{\@elt{#1}}% + \ltx@onelevel@sanitize\Hy@temp + \edef\@elt{% + \noexpand\HyCnt@LookForParentCounter + \expandafter\noexpand\csname theH#1\endcsname + }% + \cl@@ckpt + \expandafter + \ltx@LocalAppendToMacro\csname theH#1\expandafter\endcsname + \expandafter{% + \expandafter\@arabic\csname c@#1\endcsname + }% + }{}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Hy@LookForParentCounter} +% \begin{macrocode} +\def\HyCnt@LookForParentCounter#1#2{% + \expandafter\let\expandafter\Hy@temp@A\csname cl@#2\endcsname + \ltx@ifundefined{cl@#2}{% + }{% + \ltx@onelevel@sanitize\Hy@temp@A + \edef\Hy@temp@A{% + \noexpand\in@{\Hy@temp}{\Hy@temp@A}% + }\Hy@temp@A + \ifin@ + \expandafter\ltx@LocalAppendToMacro\expandafter#1% + \expandafter{% + \expandafter\@arabic\csname c@#2\endcsname.% + }% + \fi + }% +} +% \end{macrocode} +% \end{macro} % % After \cmd{\appendix} ``chapter'' (or ``section'' for classes % without chapter) should be replaced |