diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/hyperref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 117 |
1 files changed, 80 insertions, 37 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 856cda98c23..5b2e8553914 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -39,7 +39,7 @@ %<puenc>\ProvidesFile{puenc.def} %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} -%<!none> [2007/02/07 v6.75r +%<!none> [2007/02/27 v6.75t %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -116,7 +116,7 @@ \end{document} %</driver> % \fi -% \CheckSum{19864} +% \CheckSum{19909} % % \MakeShortVerb{|} % \StopEventually{} @@ -1109,31 +1109,7 @@ % \begin{macrocode} \let\ref\HyPsd@ref \let\pageref\HyPsd@pageref -% \end{macrocode} -% -% Also we need an expandable form of \cs{autoref}. Babel's shorthands -% are not supported inside the reference label. -% \begin{macrocode} - \def\HyPsd@ar@get##1.##2\@nil{##1}% - \def\HyPsd@ar@tmp##1{% - \expandafter\expandafter\expandafter\HyPsd@ar@get - \expandafter\@fourthoffive##1\@empt\@empty.\@nil - }% - \def\auto@setref##1##2##3{% - \ifx##1\relax - \else - \csname\HyPsd@ar@tmp{##1}% - \expandafter\ifx\csname\HyPsd@ar@tmp{##1}autorefname\endcsname - \relax - \else - autoref% - \fi - name% - \endcsname - \space - \expandafter##2##1\@empty\@empty - \fi - }% + \let\autoref\HyPsd@autoref % \end{macrocode} % % \paragraph{Miscellaneous commands.} @@ -2186,6 +2162,65 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\HyPsd@autoref} +% Macro \cs{HyPsd@autoref} calls the macro \cs{HyPsd@@autoref} for star checking. +% The same methods like in \cs{HyPsd@hspace} is used. +% \begin{macrocode} +\def\HyPsd@autoref#1{\HyPsd@@autoref#1*\END} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@autoref} +% Macro \cs{HyPsd@@autoref} checks if a star is present. +% \begin{macrocode} +\def\HyPsd@@autoref#1*#2\END{% + \ifx\\#2\\% + \HyPsd@@@autoref{#1}% + \else + \expandafter\HyPsd@@@autoref + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@@autoref} +% \cs{HyPsd@@@autoref} does the work and extracts the second argument. +% \begin{macrocode} +\def\HyPsd@@@autoref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax + ??% + \else + \expandafter\expandafter\expandafter\HyPsd@autorefname + \csname r@#1\endcsname{}{}{}{}\@nil + \expandafter\expandafter\expandafter\@car\csname r@#1\endcsname\@nil + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@autorefname} +% At least a basic definition for getting the \cs{autoref} name. +% \begin{macrocode} +\def\HyPsd@autorefname#1#2#3#4#5\@nil{% + \ifx\\#4\\% + \else + \HyPsd@@autorefname#4.\@nil + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@autorefname} +% \begin{macrocode} +\def\HyPsd@@autorefname#1.#2\@nil{% + \@ifundefined{#1autorefname}{% + \@ifundefined{#1name}{% + }{% + \csname#1name\endcsname\space + }% + }{% + \csname#1autorefname\endcsname\space + }% +} +% \end{macrocode} +% \end{macro} +% % \subsubsection{Redefining the defining commands} % \label{defcmd} % Definitions aren't allowed, because they aren't executed in @@ -4956,9 +4991,14 @@ \else \toks0{\expandafter\hyper@readexternallink#2\\{#1}}% \fi - \toks1{{#4}}% + \toks2{#4}% + \edef\Hy@tempa{\the\toks2}% \edef\x{\endgroup - \the\toks0 {\x}\the\toks1 % + \ifx\Hy@tempa\@empty + \noexpand\Hy@Warning{Suppressing empty link}% + \else + \the\toks0 {\x}{\the\toks2}%% + \fi }% \x } @@ -6347,17 +6387,20 @@ \@hyper@itemfalse \@skiphyperreffalse \def\refstepcounter#1{% - \H@refstepcounter{#1}% - \edef\This@name{#1}% - \ifx\This@name\name@of@slide + \ifHy@pdfstring \else - \if@skiphyperref + \H@refstepcounter{#1}% + \edef\This@name{#1}% + \ifx\This@name\name@of@slide \else - \if@hyper@item - \stepcounter{Item}% - \hyper@refstepcounter{Item}% + \if@skiphyperref \else - \hyper@refstepcounter{#1}% + \if@hyper@item + \stepcounter{Item}% + \hyper@refstepcounter{Item}% + \else + \hyper@refstepcounter{#1}% + \fi \fi \fi \fi |