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 | |
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')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 68 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/nameref.dtx | 38 |
2 files changed, 87 insertions, 19 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 diff --git a/Master/texmf-dist/source/latex/hyperref/nameref.dtx b/Master/texmf-dist/source/latex/hyperref/nameref.dtx index 7aa3251e3c5..fff510b9bf6 100644 --- a/Master/texmf-dist/source/latex/hyperref/nameref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/nameref.dtx @@ -30,17 +30,19 @@ %<driver>\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2012/07/28 v2.41 Cross-referencing by name of section]% + [2012/07/31 v2.42 Cross-referencing by name of section]% % -% \CheckSum{696} +% \CheckSum{700} % % \iffalse %<*driver> \documentclass{ltxdoc} \usepackage[numbered]{hypdoc} \usepackage{bmhydoc} +\usepackage{hologo} \EnableCrossrefs \CodelineIndex +\newcommand*{\xpackage}[1]{\textsf{#1}} \begin{document} \GetFileInfo{nameref.sty}% \title{% @@ -119,7 +121,7 @@ % % We redefine |\label| so that it also writes the name of the % current section to the .aux file; if the name ends in a dot, -% we zap it. To allow for the hyperref package, also write +% we zap it. To allow for the \xpackage{hyperref} package, also write % fourth and fifth fields (empty by default; % used for cross-ref name, and file). % \begin{macro}{\NR@strip@period} @@ -128,6 +130,15 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\strip@period} +% Macro \cs{strip@period} was removed in \xpackage{nameref} +% 2012/07/28 v2.41 and reinserted in 2012/07/31 v2.42 for compatibilty +% reasons with package \xpackage{subfig}. +% \begin{macrocode} +\def\strip@period#1.\relax#2\@@@{#1} +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} \def\NR@sanitize@labelname{% \@onelevel@sanitize\@currentlabelname @@ -140,8 +151,8 @@ % % \subsection{\cs{label} stuff} % -% Here is tested, whether package showkeys is loaded. -% But if option final is used, the macros of showkeys +% Here is tested, whether package \xpackage{showkeys} is loaded. +% But if option final is used, the macros of \xpackage{showkeys} % are not defined, so we have to check an additional % test. % \begin{macro}{\ifNR@showkeys} @@ -241,7 +252,7 @@ } % \end{macrocode} % \end{macro} -% Overload an AMS \LaTeX\ command, which uses |\newlabel|. Sigh! +% Overload an AMS \hologo{LaTeX} command, which uses |\newlabel|. Sigh! % \begin{macro}{\@writetocindents@} % \begin{macrocode} \def\@writetocindents@{% @@ -529,7 +540,7 @@ % We have to redefine |\ref| and |\pageref| to know about extra % reference elements. Make them robust, and compatible with Babel. % The Babel switch is mimicked if not already defined. -% Some support for package |showkeys| is implemented. If +% Some support for package \xpackage{showkeys} is implemented. If % option |notref| of that package is set, |\SK@ref| has the % meaning of |\@empty|. % \begin{macro}{\@safe@activestrue} @@ -606,11 +617,12 @@ \fi \fi % \end{macrocode} -% Package |hyperref| uses its own definitions of |\ref| and +% Package \xpackage{hyperref} uses its own definitions of |\ref| and % |\pageref| because it extends the syntax by the star form. -% |\DeclareRobustCommand| is used by hyperref. -% Package |nameref| can be loaded before, after hyperref or after -% hyperref's definitions in |\AtBeginDocument|. +% |\DeclareRobustCommand| is used by \xpackage{hyperref}. +% Package |nameref| can be loaded before, after +% \xpackage{hyperref} or after +% \xpackage{hyperref}'s definitions in |\AtBeginDocument|. % \begin{macrocode} \@ifpackageloaded{hyperref}{% }{% @@ -719,7 +731,7 @@ % \subsection{Compatibility with varioref} % % [This section was derived by Corey Minyard \texttt{minyard@acm.org} -% from the varioref package] +% from the \xpackage{varioref} package] % \begin{macrocode} \AtBeginDocument{% \ifx\csname @@vpageref\endcsname\relax @@ -846,7 +858,7 @@ }% % \end{macrocode} % -% \subsection{Support for listings} +% \subsection{Support for package \xpackage{listings}} % % \begin{macrocode} \AtBeginDocument{% |