diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 163 |
1 files changed, 100 insertions, 63 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index f9095185175..3142fccba5e 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -44,7 +44,7 @@ %<puenc>\ProvidesFile{puenc.def} %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} -%<!none> [2010/03/16 v6.80p +%<!none> [2010/03/19 v6.80r %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -126,7 +126,7 @@ \end{document} %</driver> % \fi -% \CheckSum{26760} +% \CheckSum{26810} % % \MakeShortVerb{|} % \StopEventually{} @@ -565,6 +565,7 @@ % setup internal code changed at that point. It'll probably break % with the later releases! % \begin{macrocode} +\RequirePackage{ltxcmds}[2010/03/09] \RequirePackage{keyval}[1997/11/10] \RequirePackage{kvsetkeys}[2007/09/29] \RequirePackage{pdfescape}[2007/11/11] @@ -622,6 +623,7 @@ \newif\ifHy@hypertexnames \newif\ifHy@implicit \newif\ifHy@linktocpage +\newif\ifHy@localanchorname \newif\ifHy@menubar \newif\ifHy@naturalnames \newif\ifHy@nesting @@ -663,6 +665,7 @@ \Hy@hypertexnamestrue \Hy@implicittrue \Hy@linktocpagefalse +\Hy@localanchornamefalse \Hy@menubartrue \Hy@naturalnamesfalse \Hy@nestingfalse @@ -1108,7 +1111,7 @@ % (Email: \Email{Felix.Neubauer@gmx.net}). % \begin{macrocode} \let\textlatin\@firstofone - \@ifundefined{language@group}{}{% + \ltx@IfUndefined{language@group}{}{% \csname HyPsd@babel@\language@group\endcsname }% \HyPsd@GreekPatch @@ -1241,7 +1244,7 @@ % % \paragraph{Package xspace.} % \begin{macrocode} - \@ifundefined{@xspace}{% + \ltx@IfUndefined{@xspace}{% \let\xspace\HyPsd@ITALCORR }{% \let\xspace\HyPsd@XSPACE @@ -1543,7 +1546,7 @@ % the string gets an additional \cs{HyPsd@empty}. % \begin{macrocode} \expandafter\HyPsd@Subst\expandafter{\/}\HyPsd@empty#1% - \@ifundefined{@xspace}{% + \ltx@IfUndefined{@xspace}{% }{% \let\HyPsd@xspace\relax \expandafter\HyPsd@Subst\expandafter @@ -1635,7 +1638,7 @@ % % \begin{macrocode} \ifx\HyPsd@pdfencoding\HyPsd@pdfencoding@auto - \@ifundefined{StringEncodingConvertTest}{% + \ltx@IfUndefined{StringEncodingConvertTest}{% }{% \EdefUnescapeString\HyPsd@temp#1% \ifxetex @@ -1775,9 +1778,9 @@ }% \AtEndOfPackage{% \pdfstringdefDisableCommands{% - \@ifundefined{oldb}{}{\let\b\oldb}% - \@ifundefined{oldc}{}{\let\c\oldc}% - \@ifundefined{oldd}{}{\let\d\oldd}% + \ltx@IfUndefined{oldb}{}{\let\b\oldb}% + \ltx@IfUndefined{oldc}{}{\let\c\oldc}% + \ltx@IfUndefined{oldd}{}{\let\d\oldd}% }% }% }{% @@ -2027,59 +2030,59 @@ % % Nothing to do for english. % \begin{macrocode} -\@ifundefined{danish@sh@"@sel}{}{% +\ltx@IfUndefined{danish@sh@"@sel}{}{% \def\HyPsd@babel@danish{% \declare@shorthand{danish}{"|}{}% \declare@shorthand{danish}{"~}{-}% }% } -\@ifundefined{dutch@sh@"@sel}{}{% +\ltx@IfUndefined{dutch@sh@"@sel}{}{% \def\HyPsd@babel@dutch{% \declare@shorthand{dutch}{"|}{}% \declare@shorthand{dutch}{"~}{-}% }% } -\@ifundefined{finnish@sh@"@sel}{}{% +\ltx@IfUndefined{finnish@sh@"@sel}{}{% \def\HyPsd@babel@finnish{% \declare@shorthand{finnish}{"|}{}% }% } -\@ifundefined{french@sh@:@sel}{}{% +\ltx@IfUndefined{french@sh@:@sel}{}{% \def\HyPsd@babel@frenchb{% \def\guill@spacing{ }% }% } -\@ifundefined{german@sh@"@sel}{}{% +\ltx@IfUndefined{german@sh@"@sel}{}{% \def\HyPsd@babel@german{% \declare@shorthand{german}{"f}{f}% \declare@shorthand{german}{"|}{}% \declare@shorthand{german}{"~}{-}% }% } -\@ifundefined{macedonian@sh@"@sel}{}{% +\ltx@IfUndefined{macedonian@sh@"@sel}{}{% \def\HyPsd@babel@macedonian{% \declare@shorthand{macedonian}{"|}{}% \declare@shorthand{macedonian}{"~}{-}% }% }{} -\@ifundefined{ngerman@sh@"@sel}{}{% +\ltx@IfUndefined{ngerman@sh@"@sel}{}{% \def\HyPsd@babel@ngerman{% \declare@shorthand{ngerman}{"|}{}% \declare@shorthand{ngerman}{"~}{-}% }% } -\@ifundefined{portuges@sh@"@sel}{}{% +\ltx@IfUndefined{portuges@sh@"@sel}{}{% \def\HyPsd@babel@portuges{% \declare@shorthand{portuges}{"|}{}% }% } -\@ifundefined{russian@sh@"@sel}{}{% +\ltx@IfUndefined{russian@sh@"@sel}{}{% \def\HyPsd@babel@russian{% \declare@shorthand{russian}{"|}{}% \declare@shorthand{russian}{"~}{-}% }% } -\@ifundefined{slovene@sh@"@sel}{}{% +\ltx@IfUndefined{slovene@sh@"@sel}{}{% \def\HyPsd@babel@slovene{% \declare@shorthand{slovene}{"|}{}% }% @@ -2087,7 +2090,7 @@ % \end{macrocode} % Nested quoting environments are not supported (|<<|, |>>|). % \begin{macrocode} -\@ifundefined{spanish@sh@>@sel}{}{% +\ltx@IfUndefined{spanish@sh@>@sel}{}{% \def\HyPsd@babel@spanish{% \declare@shorthand{spanish}{<<}{\guillemotleft}% \declare@shorthand{spanish}{>>}{\guillemotright}% @@ -2097,19 +2100,19 @@ \declare@shorthand{spanish}{"?}{\textquestiondown}% }% } -\@ifundefined{swedish@sh@"@sel}{}{% +\ltx@IfUndefined{swedish@sh@"@sel}{}{% \def\HyPsd@babel@swedish{% \declare@shorthand{swedish}{"|}{}% \declare@shorthand{swedish}{"~}{-}% }% } -\@ifundefined{ukrainian@sh@"@sel}{}{% +\ltx@IfUndefined{ukrainian@sh@"@sel}{}{% \def\HyPsd@babel@ukrainian{% \declare@shorthand{ukrainian}{"|}{}% \declare@shorthand{ukrainian}{"~}{-}% }% } -\@ifundefined{usorbian@sh@"@sel}{}{% +\ltx@IfUndefined{usorbian@sh@"@sel}{}{% \def\HyPsd@babel@usorbian{% \declare@shorthand{usorbian}{"f}{f}% \declare@shorthand{usorbian}{"|}{}% @@ -2117,7 +2120,7 @@ } % \end{macrocode} % \begin{macrocode} -\@ifundefined{greek@sh@\string~@sel}{% +\ltx@IfUndefined{greek@sh@\string~@sel}{% \let\HyPsd@GreekPatch\@empty }{% \def\HyPsd@GreekPatch{% @@ -2270,7 +2273,6 @@ % % \begin{macrocode} \RequirePackage{intcalc}[2007/09/27] -\RequirePackage{ltxcmds}[2010/03/09] % \end{macrocode} % % \begin{macro}{\HyPsd@CJKhook} @@ -2818,7 +2820,7 @@ % \subsubsection{Fix for AMS classes} % % \begin{macrocode} -\@ifundefined{tocsection}{% +\ltx@IfUndefined{tocsection}{% \let\HyPsd@AMSclassfix\relax }{% \def\HyPsd@AMSclassfix{% @@ -2990,8 +2992,8 @@ % \begin{macro}{\HyPsd@@autorefname} % \begin{macrocode} \def\HyPsd@@autorefname#1.#2\@nil{% - \@ifundefined{#1autorefname}{% - \@ifundefined{#1name}{% + \ltx@IfUndefined{#1autorefname}{% + \ltx@IfUndefined{#1name}{% }{% \csname#1name\endcsname\space }% @@ -4052,7 +4054,7 @@ % Added fix for version 2.1. Here \cmd{\sub@label} is defined. % \begin{macrocode} \@ifpackageloaded{subfigure}{% - \@ifundefined{sub@label}{% + \ltx@IfUndefined{sub@label}{% \Hy@hypertexnamesfalse }{% \renewcommand*{\sub@label}[1]{% @@ -4092,7 +4094,7 @@ % \verb|xr-hyper|. Therefore we test for the macro itself and not % for the package name: % \begin{macrocode} -\@ifundefined{XR@addURL}{% +\ltx@IfUndefined{XR@addURL}{% }{% % \end{macrocode} % If reading external aux files check whether they have a non zero @@ -4470,6 +4472,11 @@ \let\Hy@setbreaklinks\@gobble } % \end{macrocode} +% \begin{macrocode} +\define@key{Hyp}{localanchorname}[true]{% + \Hy@boolkey{localanchorname}{#1}% +} +% \end{macrocode} % Determines whether an automatic anchor is put on each page % \begin{macrocode} \define@key{Hyp}{pageanchor}[true]{% @@ -6075,9 +6082,9 @@ % in babel manner. % \begin{macrocode} \Hy@nextfalse -\@ifundefined{spanish@sh@"@sel}{}{\Hy@nexttrue} -\@ifundefined{galician@sh@"@sel}{}{\Hy@nexttrue} -\@ifundefined{estonian@sh@"@sel}{}{\Hy@nexttrue} +\ltx@IfUndefined{spanish@sh@"@sel}{}{\Hy@nexttrue} +\ltx@IfUndefined{galician@sh@"@sel}{}{\Hy@nexttrue} +\ltx@IfUndefined{estonian@sh@"@sel}{}{\Hy@nexttrue} \ifHy@next \let\texttilde\~% \fi @@ -6588,8 +6595,30 @@ \ifHy@verbose \begingroup \Hy@safe@activestrue - \Hy@Info{Reference (#1) to `#2'}% + \xdef\Hy@VerboseGlobalTemp{(#1) `#2'}% + \Hy@Info{Reference \Hy@VerboseGlobalTemp}% + \xdef\Hy@VerboseGlobalTemp{% + \Hy@VerboseGlobalTemp, % + line \the\inputlineno + }% \endgroup + \let\Hy@VerboseLinkInfo\Hy@VerboseGlobalTemp + \@onelevel@sanitize\Hy@VerboseLinkInfo + \fi +} +% \end{macrocode} +% \begin{macrocode} +\def\Hy@VerboseLinkInfo{<VerboseLinkInfo>} +\def\Hy@VerboseLinkStop{% + \ifHy@verbose + \begingroup + \edef\x{\endgroup + \write\m@ne{% + Package `hyperref' Info: % + End of reference \Hy@VerboseLinkInfo.% + }% + }% + \x \fi } % \end{macrocode} @@ -6913,7 +6942,7 @@ \long\def\hyper@@anchor#1#2{\@hyper@@anchor#1\relax#2\relax} \long\def\@hyper@@anchor#1\relax#2#3\relax{% \ifx\\#1\\% - #2\Hy@WarningNoLine{empty link? #1: #2#3}% + #2\Hy@Warning{Ignoring empty anchor}% \else \def\anchor@spot{#2#3}% \let\put@me@back\@empty @@ -8279,7 +8308,7 @@ % % \begin{macrocode} \def\Hy@UseMaketitleString#1{% - \@ifundefined{Hy@#1}{}{% + \ltx@IfUndefined{Hy@#1}{}{% \begingroup \let\Hy@saved@hook\pdfstringdefPreHook \pdfstringdefDisableCommands{% @@ -8873,7 +8902,7 @@ \Hy@CounterExists{part}{% \newcommand\theHpart{\arabic{part}}% } -\@ifundefined{thechapter}{% +\ltx@IfUndefined{thechapter}{% \newcommand\theHsection {\arabic{section}}% \newcommand\theHfigure {\arabic{figure}}% \newcommand\theHtable {\arabic{table}}% @@ -9004,7 +9033,7 @@ \def\Hy@chapapp{\Hy@chapterstring} \let\HyOrg@appendix\appendix \def\appendix{% - \@ifundefined{chapter}% + \ltx@IfUndefined{chapter}% {\gdef\theHsection{\Alph{section}}}% {\gdef\theHchapter{\Alph{chapter}}}% \xdef\Hy@chapapp{\Hy@appendixstring}% @@ -9036,9 +9065,9 @@ \fi \ifHy@naturalnames \let\textlatin\@firstofone - \xdef\@currentHlabel{\csname the#1\endcsname}% + \xdef\Hy@GlobalTempHlabel{\csname the#1\endcsname}% \else - \xdef\@currentHlabel{% + \xdef\Hy@GlobalTempHlabel{% \csname the% \expandafter\ifx\csname theH#1\endcsname\relax\else H\fi @@ -9046,14 +9075,21 @@ \endcsname }% \fi - \xdef\@currentHref{% - \Hy@param.\expandafter\strip@prefix\meaning\@currentHlabel + \xdef\Hy@GlobalTempHref{% + \Hy@param.\expandafter\strip@prefix\meaning\Hy@GlobalTempHlabel }% \else \Hy@GlobalStepCount\Hy@linkcounter - \xdef\@currentHref{\Hy@param.\the\Hy@linkcounter}% + \xdef\Hy@GlobalTempHref{\Hy@param.\the\Hy@linkcounter}% \fi \endgroup + \ifHy@localanchorname + \let\@currentHlabel\Hy@GlobalTempHlabel + \let\@currentHref\Hy@GlobalTempHref + \else + \global\let\@currentHlabel\Hy@GlobalTempHlabel + \global\let\@currentHref\Hy@GlobalTempHref + \fi } % \end{macrocode} % \end{macro} @@ -9372,7 +9408,7 @@ % Then again, we have the \emph{subeqnarray} % package. Tanmoy provided some code for this: % \begin{macrocode} -\@ifundefined{subeqnarray}{}{% +\ltx@IfUndefined{subeqnarray}{}{% \let\H@subeqnarray\subeqnarray \let\H@endsubeqnarray\endsubeqnarray \def\subeqnarray{% @@ -9938,7 +9974,7 @@ % not expanded immediately, we use \cs{@extra@b@citeb}, so cites in a % chapter will link to the bibliography in that chapter. % \begin{macrocode} -\@ifundefined{NAT@parse}{% +\ltx@IfUndefined{NAT@parse}{% \providecommand*\@extra@binfo{}% \providecommand*\@extra@b@citeb{}% \def\bibcite#1#2{% @@ -11108,8 +11144,8 @@ \hyperref[{#1}]{\HyRef@autopagerefname\pageref*{#1}}% } \def\HyRef@autopagerefname{% - \@ifundefined{pageautorefname}{% - \@ifundefined{pagename}{% + \ltx@IfUndefined{pageautorefname}{% + \ltx@IfUndefined{pagename}{% \Hy@Warning{No autoref name for `page'}% }{% \pagename\nobreakspace @@ -11153,11 +11189,11 @@ \fi } \def\HyRef@testreftype#1.#2\\{% - \@ifundefined{#1autorefname}{% - \@ifundefined{#1name}{% + \ltx@IfUndefined{#1autorefname}{% + \ltx@IfUndefined{#1name}{% \HyRef@StripStar#1\\*\\\@nil{#1}% - \@ifundefined{\HyRef@name autorefname}{% - \@ifundefined{\HyRef@name name}{% + \ltx@IfUndefined{\HyRef@name autorefname}{% + \ltx@IfUndefined{\HyRef@name name}{% \def\HyRef@currentHtag{}% \Hy@Warning{No autoref name for `#1'}% }{% @@ -11572,6 +11608,7 @@ } \def\close@pdflink{% \Hy@endcolorlink + \Hy@VerboseLinkStop \pdfendlink } \def\hyper@anchor#1{% @@ -11587,7 +11624,7 @@ } \def\hyper@linkstart#1#2{% \Hy@VerboseLinkStart{#1}{#2}% - \@ifundefined{@#1bordercolor}{% + \ltx@IfUndefined{@#1bordercolor}{% \let\CurrentBorderColor\relax }{% \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% @@ -11597,7 +11634,7 @@ \def\hyper@linkend{\close@pdflink} \def\hyper@link#1#2#3{% \Hy@VerboseLinkStart{#1}{#2}% - \@ifundefined{@#1bordercolor}{% + \ltx@IfUndefined{@#1bordercolor}{% \let\CurrentBorderColor\relax }{% \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% @@ -12076,7 +12113,7 @@ \fi \fi }{% - \@ifundefined{stockwidth}{% + \ltx@IfUndefined{stockwidth}{% \ifdim\paperwidth>\z@ \setlength{\pdfpagewidth}{\paperwidth}% \fi @@ -13167,7 +13204,7 @@ \else \ifHy@setpagesize \providecommand*{\VTeXInitMediaSize}{% - \@ifundefined{stockwidth}{% + \ltx@IfUndefined{stockwidth}{% \ifdim\paperheight>0pt % \setlength\mediaheight\paperheight \fi @@ -13227,7 +13264,7 @@ \Hy@VerboseLinkStart{#1}{#2}% \Hy@pstringdef\Hy@pstringURI{#2}% \expandafter\Hy@colorlink\csname @#1color\endcsname - \@ifundefined{@#1bordercolor}{% + \ltx@IfUndefined{@#1bordercolor}{% \let\CurrentBorderColor\relax }{% \edef\CurrentBorderColor{% @@ -13314,7 +13351,7 @@ } \def\hyper@link#1#2#3{% \Hy@VerboseLinkStart{#1}{#2}% - \@ifundefined{@#1bordercolor}{% + \ltx@IfUndefined{@#1bordercolor}{% \let\CurrentBorderColor\relax }{% \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% @@ -13874,7 +13911,7 @@ \endgroup \Hy@RestoreLastskip } -\@ifundefined{hyper@anchorstart}{}{\endinput} +\ltx@IfUndefined{hyper@anchorstart}{}{\endinput} \def\hyper@anchorstart#1{% \Hy@SaveLastskip \Hy@VerboseAnchor{#1}% @@ -13908,7 +13945,7 @@ } \def\hyper@linkend{% \literalps@out{\strip@pt@and@otherjunk\baselineskip\space H.L}% - \@ifundefined{@\hyper@currentlinktype bordercolor}{% + \ltx@IfUndefined{@\hyper@currentlinktype bordercolor}{% \let\Hy@tempcolor\relax }{% \edef\Hy@tempcolor{% @@ -14020,7 +14057,7 @@ \def\Hy@undefinedname{UNDEFINED} \def\hyper@link#1#2#3{% \Hy@VerboseLinkStart{#1}{#2}% - \@ifundefined{@#1bordercolor}{% + \ltx@IfUndefined{@#1bordercolor}{% \let\Hy@tempcolor\relax }{% \edef\Hy@tempcolor{\csname @#1bordercolor\endcsname}% @@ -14208,7 +14245,7 @@ [\the\pdf@toks\space\pdf@type\space pdfmark% }% \else - \@ifundefined{@\pdf@linktype color}{% + \ltx@IfUndefined{@\pdf@linktype color}{% \Hy@colorlink\@linkcolor }{% \expandafter\Hy@colorlink @@ -17700,7 +17737,7 @@ % executed, so there will be no destination for \cmd{addcontentsline}. % So \cmd{\@chapter} is overloaded to avoid this: % \begin{macrocode} -\@ifundefined{@chapter}{}{% +\ltx@IfUndefined{@chapter}{}{% \let\Hy@org@chapter\@chapter \def\@chapter{% \def\Hy@next{% @@ -17711,7 +17748,7 @@ }% }% \ifnum\c@secnumdepth>\m@ne - \@ifundefined{if@mainmatter}% + \ltx@IfUndefined{if@mainmatter}% \iftrue{\csname if@mainmatter\endcsname}% \let\Hy@next\relax \fi |