diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/hyperref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/hyperref.sty | 205 |
1 files changed, 109 insertions, 96 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty index 372ff7a1cca..cf0fb3d90cf 100644 --- a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty +++ b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty @@ -30,7 +30,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hyperref} - [2011/03/09 v6.82d % + [2011/04/09 v6.82f % Hypertext links for LaTeX] \begingroup \@makeother\`% @@ -99,7 +99,7 @@ }% \endgroup \Hy@SetCatcodes -\RequirePackage{ltxcmds}[2010/03/09] +\RequirePackage{ltxcmds}[2010/04/26] \@ifpackagelater{ltxcmds}{2010/10/25}{}{% \long\def\ltx@LocalAppendToMacro#1#2{% \global\let\LTXcmds@gtemp#1% @@ -195,7 +195,7 @@ \def#1{#2 #3}% } \ltx@IfUndefined{pdfmatch}{% - \def\Hy@Match#1#2#3#4{}% + \let\Hy@Match\ltx@gobblefour }{% \def\Hy@Match#1#2{% \begingroup @@ -251,8 +251,8 @@ \def\Hy@AtEndOfPackage{% \ltx@LocalAppendToMacro\Hy@AtEndOfPackageHook } -\def\Hy@AtBeginDocumentHook{} -\def\Hy@AtEndOfPackageHook{} +\let\Hy@AtBeginDocumentHook\ltx@empty +\let\Hy@AtEndOfPackageHook\ltx@empty \AtEndOfPackage{% \Hy@AtEndOfPackageHook \let\Hy@AtEndOfPackageHook\@undefined @@ -348,14 +348,12 @@ \def\Hy@StepCount#1{\advance#1 by 1 }% \def\Hy@GlobalStepCount#1{\global\advance#1 by 1 }% \newdimen\@linkdim -\let\Hy@driver\@empty +\let\Hy@driver\ltx@empty \let\MaybeStopEarly\relax \newcount\Hy@linkcounter \newcount\Hy@pagecounter \Hy@linkcounter0 \Hy@pagecounter0 -\long\def\Hy@ReturnAfterElseFi#1\else#2\fi{\fi#1} -\long\def\Hy@ReturnAfterFi#1\fi{\fi#1} \let\Hy@ReturnEnd\@empty \long\def\Hy@ReturnAfterFiFiEnd#1\fi#2\Hy@ReturnEnd{\fi\fi#1} \long\def\Hy@ReturnAfterElseFiFiEnd#1\else#2\Hy@ReturnEnd{\fi\fi#1} @@ -374,7 +372,7 @@ \toks@\expandafter{\the\toks@ #1}% \ifx\\#2\\% \else - \Hy@ReturnAfterFi{% + \ltx@ReturnAfterFi{% \HyCal@do#2\@nil }% \fi @@ -1633,7 +1631,7 @@ } \def\HyPsd@Warning#1{% \begingroup - \def\space{ }% + \let\space\ltx@space \Hy@Warning{#1}% \endgroup } @@ -1888,7 +1886,7 @@ }% \ifx\\#2\\% \else - \Hy@ReturnAfterFi{% + \ltx@ReturnAfterFi{% \HyPsd@GlyphProcessWarning#2\@empty }% \fi @@ -1999,7 +1997,7 @@ |gdef|HyPsd@DoConvert#1{% |ifx#1|@empty |else - |Hy@ReturnAfterFi{% + |ltx@ReturnAfterFi{% |ifx#1\%% \%% |expandafter|HyPsd@DoEscape @@ -2014,7 +2012,7 @@ |ifx#19% |expandafter|HyPsd@GetTwoBytes |else - |Hy@ReturnAfterFi{% + |ltx@ReturnAfterFi{% |ifx#18% 00% |expandafter|HyPsd@GetTwoBytes @@ -3733,7 +3731,7 @@ \x \fi } -\def\HyInfo@AddonList{} +\let\HyInfo@AddonList\ltx@empty \define@key{Hyp}{pdfview}{\calculate@pdfview#1 \\} \define@key{Hyp}{pdflinkmargin}{\setpdflinkmargin{#1}} \let\setpdflinkmargin\@gobble @@ -3757,14 +3755,14 @@ \fi \define@key{Hyp}{pdfstartpage}{% \ifx\\#1\\% - \def\@pdfstartpage{}% + \let\@pdfstartpage\ltx@empty \else \edef\@pdfstartpage{\Hy@number{#1}}% \fi }% \define@key{Hyp}{pdfstartview}{% \ifx\\#1\\% - \def\@pdfstartview{}% + \let\@pdfstartview\ltx@empty \else \hypercalcbpdef\@pdfstartview{/#1}% \fi @@ -3863,21 +3861,21 @@ \def\@runbordercolor{0 .7 .7} \def\@citebordercolor{0 1 0} \def\@pdfhighlight{/I} -\def\@pdftitle{} -\def\@pdfauthor{} +\let\@pdftitle\ltx@empty +\let\@pdfauthor\ltx@empty \let\@pdfproducer\relax \def\@pdfcreator{LaTeX with hyperref package} -\def\@pdfcreationdate{} -\def\@pdfmoddate{} -\def\@pdfsubject{} -\def\@pdfkeywords{} -\def\@pdftrapped{} -\def\@pdfpagescrop{} +\let\@pdfcreationdate\ltx@empty +\let\@pdfmoddate\ltx@empty +\let\@pdfsubject\ltx@empty +\let\@pdfkeywords\ltx@empty +\let\@pdftrapped\ltx@empty +\let\@pdfpagescrop\ltx@empty \def\@pdfstartview{/Fit} \def\@pdfremotestartview{/Fit} \def\@pdfstartpage{1} -\def\@pdfprintpagerange{} -\def\@pdflang{} +\let\@pdfprintpagerange\ltx@empty +\let\@pdflang\ltx@empty \let\PDF@SetupDoc\@empty \let\PDF@FinishDoc\@empty \let\phantomsection\@empty @@ -3919,18 +3917,35 @@ }{} \let\ReadBookmarks\relax \ProcessKeyvalOptions{Hyp} +\def\Hy@xspace@end{} +\ltx@IfUndefined{xspaceaddexceptions}{% + \Hy@AtBeginDocument{% + \ltx@IfUndefined{xspaceaddexceptions}{% + }{% + \def\Hy@xspace@end{% + \ltx@gobble{end for xspace}% + }% + \xspaceaddexceptions{\Hy@xspace@end,\hyper@linkend,\hyper@anchorend}% + }% + }% +}{% + \def\Hy@xspace@end{% + \ltx@gobble{end for xspace}% + }% + \xspaceaddexceptions{\Hy@xspace@end,\hyper@linkend,\hyper@anchorend}% +} \Hy@AtBeginDocument{% \ifHy@draft \let\hyper@@anchor\@gobble - \gdef\hyper@link#1#2#3{#3}% - \let\hyper@anchorstart\@gobble - \let\hyper@anchorend\@empty + \gdef\hyper@link#1#2#3{#3\Hy@xspace@end}% + \def\hyper@anchorstart#1#2{#2\Hy@xspace@end}% + \def\hyper@anchorend{\Hy@xspace@end}% \let\hyper@linkstart\@gobbletwo - \let\hyper@linkend\@empty - \def\hyper@linkurl#1#2{#1}% - \def\hyper@linkfile#1#2#3{#1}% - \def\hyper@link@[#1]#2#3{}% - \def\Acrobatmenu#1#2{\leavevmode#2}% + \def\hyper@linkend{\Hy@xspace@end}% + \def\hyper@linkurl#1#2{#1\Hy@xspace@end}% + \def\hyper@linkfile#1#2#3{#1\Hy@xspace@end}% + \def\hyper@link@[#1]#2#3#4{#4\Hy@xspace@end}% + \def\Acrobatmenu#1#2{\leavevmode#2\Hy@xspace@end}% \let\PDF@SetupDoc\@empty \let\PDF@FinishDoc\@empty \let\@fifthoffive\@secondoftwo @@ -4265,7 +4280,7 @@ \def\@pdfpagemode{UseOutlines}% \fi \else - \def\@bookmarkopenstatus#1{}% + \let\@bookmarkopenstatus\ltx@gobble \Hy@Info{Bookmarks OFF}% \Hy@AtEndOfPackage{% \global\let\ReadBookmarks\relax @@ -4277,7 +4292,7 @@ \fi \Hy@DisableOption{bookmarks} \def\Hy@CatcodeWrapper#1{% - \def\Hy@EndWrap{}% + \let\Hy@EndWrap\ltx@empty \def\TMP@EnsureCode##1##2{% \edef\Hy@EndWrap{% \Hy@EndWrap @@ -4447,11 +4462,11 @@ \gdef\hyper@n@rmalise#1#2{^^A \def\Hy@tempa{#2}^^A \ifx\Hy@tempa\Hy@ActiveCarriageReturn - \Hy@ReturnAfterElseFi{^^A + \ltx@ReturnAfterElseFi{^^A \hyper@@normalise{#1}^^A }^^A \else - \Hy@ReturnAfterFi{^^A + \ltx@ReturnAfterFi{^^A \hyper@@normalise{#1}{#2}^^A }^^A \fi @@ -4467,7 +4482,7 @@ #1^^A \ifx\limits#2\limits \else - \Hy@ReturnAfterFi{^^A + \ltx@ReturnAfterFi{^^A \Hy@RemovePercentCr #2\@nil }^^A \fi @@ -4642,7 +4657,7 @@ \expandafter\tryhyper@link\ref@one\\{#1}% } \def\tryhyper@link#1\\#2{% - \hyper@@link{#2}{#1}% + \hyper@@link{#2}{#1}% } \def\hyperdef{\@ifnextchar[{\label@hyperdef}{\@hyperdef}} \def\@hyperdef#1#2#3{%, category, name, text @@ -4861,7 +4876,7 @@ \fi \let\anchor@spot\@empty } -\def\anchor@spot{} +\let\anchor@spot\ltx@empty \let\htmladdimg\hyperimage \def\htmladdnormallink#1#2{\href{#2}{#1}} \def\htmladdnormallinkfoot#1#2{\href{#2}{#1}\footnote{#2}} @@ -5076,7 +5091,7 @@ \fi \HyField@PrintFlags{Submit}{submit button field}% \bitsetIsEmpty{HyField@Submit}{% - \def\Fld@submitflags{}% + \let\Fld@submitflags\ltx@empty }{% \edef\Fld@submitflags{/Flags \bitsetGetDec{HyField@Submit}}% }% @@ -5094,7 +5109,7 @@ \HyField@UseFlag{F}{LockedContents}% \HyField@PrintFlags{F}{#1}% \bitsetIsEmpty{HyField@F}{% - \def\Fld@annotflags{}% + \let\Fld@annotflags\ltx@empty }{% \edef\Fld@annotflags{/F \bitsetGetDec{HyField@F}}% }% @@ -5108,7 +5123,7 @@ \HyField@SetFlag{Ff}{Pushbutton}% \HyField@PrintFlags{Ff}{push button field}% \bitsetIsEmpty{HyField@Ff}{% - \def\Fld@flags{}% + \let\Fld@flags\ltx@empty }{% \edef\Fld@flags{/Ff \bitsetGetDec{HyField@Ff}}% }% @@ -5121,7 +5136,7 @@ \HyField@UseFlag{Ff}{NoExport}% \HyField@PrintFlags{Ff}{check box field}% \bitsetIsEmpty{HyField@Ff}{% - \def\Fld@flags{}% + \let\Fld@flags\ltx@empty }{% \edef\Fld@flags{/Ff \bitsetGetDec{HyField@Ff}}% }% @@ -5137,7 +5152,7 @@ \HyField@UseFlag{Ff}{RadiosInUnison}% \HyField@PrintFlags{Ff}{radio button field}% \bitsetIsEmpty{HyField@Ff}{% - \def\Fld@flags{}% + \let\Fld@flags\ltx@empty }{% \edef\Fld@flags{/Ff \bitsetGetDec{HyField@Ff}}% }% @@ -5169,7 +5184,7 @@ \HyField@UseFlag{Ff}{RichText}% \HyField@PrintFlags{Ff}{text field}% \bitsetIsEmpty{HyField@Ff}{% - \def\Fld@flags{}% + \let\Fld@flags\ltx@empty }{% \edef\Fld@flags{/Ff \bitsetGetDec{HyField@Ff}}% }% @@ -5194,15 +5209,15 @@ \HyField@UseFlag{Ff}{CommitOnSelChange}% \HyField@PrintFlags{Ff}{choice field}% \bitsetIsEmpty{HyField@Ff}{% - \def\Fld@flags{}% + \let\Fld@flags\ltx@empty }{% \edef\Fld@flags{/Ff \bitsetGetDec{HyField@Ff}}% }% } \def\HyField@PDFChoices#1{% \begingroup - \gdef\Fld@choices{}% - \def\HyTmp@optlist{}% + \global\let\Fld@choices\ltx@empty + \let\HyTmp@optlist\ltx@empty \let\HyTmp@optitem\relax \count@=0 % \kv@parse{#1}{% @@ -5509,7 +5524,7 @@ \Fld@DingDef\Fld@radiosymbol{#1}% } \def\Fld@DingDef#1#2{% - \def\Fld@temp{}% + \let\Fld@temp\ltx@empty \Fld@@DingDef#2\ding{}\@nil \let#1\Fld@temp } @@ -5547,17 +5562,17 @@ \define@key{Field}{color}{% \HyColor@FieldColor{#1}\Fld@color{hyperref}{color}% } -\def\Fld@onclick@code{} -\def\Fld@format@code{} -\def\Fld@validate@code{} -\def\Fld@calculate@code{} -\def\Fld@keystroke@code{} -\def\Fld@onfocus@code{} -\def\Fld@onblur@code{} -\def\Fld@onmousedown@code{} -\def\Fld@onmouseup@code{} -\def\Fld@onenter@code{} -\def\Fld@onexit@code{} +\let\Fld@onclick@code\ltx@empty +\let\Fld@format@code\ltx@empty +\let\Fld@validate@code\ltx@empty +\let\Fld@calculate@code\ltx@empty +\let\Fld@keystroke@code\ltx@empty +\let\Fld@onfocus@code\ltx@empty +\let\Fld@onblur@code\ltx@empty +\let\Fld@onmousedown@code\ltx@empty +\let\Fld@onmouseup@code\ltx@empty +\let\Fld@onenter@code\ltx@empty +\let\Fld@onexit@code\ltx@empty \def\Hy@temp#1{% \expandafter\Hy@@temp\csname Fld@#1@code\endcsname{#1}% } @@ -5775,33 +5790,31 @@ \@ifstar\NoHy@OrgPageRef\NoHy@OrgPageRef } \def\NoHyper{% - \def\hyper@link@[##1]##2##3##4{##4}% - \def\hyper@@anchor##1{}% + \def\hyper@link@[##1]##2##3##4{##4\Hy@xspace@end}% + \def\hyper@@anchor##1##2{##2\Hy@xspace@end}% \global\let\hyper@livelink\hyper@link - \gdef\hyper@link##1##2##3{##3}% - \def\hyper@anchor##1{}% - \def\hyper@anchorstart##1{}% - \let\hyper@anchorend\@empty - \def\hyper@linkstart##1##2{}% - \let\hyper@linkend\@empty - \def\hyper@linkurl##1##2{##1}% - \def\hyper@linkfile##1##2##3{##1}% - \def\hyper@link@[##1]##2##3{}% + \gdef\hyper@link##1##2##3{##3\Hy@xspace@end}% + \let\hyper@anchor\ltx@gobble + \let\hyper@anchorstart\ltx@gobble + \def\hyper@anchorend{\Hy@xspace@end}% + \let\hyper@linkstart\ltx@gobbletwo + \def\hyper@linkend{\Hy@xspace@end}% + \def\hyper@linkurl##1##2{##1\Hy@xspace@end}% + \def\hyper@linkfile##1##2##3{##1\Hy@xspace@end}% \let\Hy@backout\@gobble } \def\stop@hyper{% - \def\hyper@link@[##1]##2##3##4{##4}% + \def\hyper@link@[##1]##2##3##4{##4\Hy@xspace@end}% \let\Hy@backout\@gobble - \def\hyper@@anchor##1{}% - \def\hyper@link##1##2##3{##3}% - \def\hyper@anchor##1{}% - \def\hyper@anchorstart##1{}% - \let\hyper@anchorend\@empty - \def\hyper@linkstart##1##2{}% - \let\hyper@linkend\@empty - \def\hyper@linkurl##1##2{##1}% - \def\hyper@linkfile##1##2##3{##1}% - \def\hyper@link@[##1]##2##3{}% + \let\hyper@@anchor\ltx@gobble + \def\hyper@link##1##2##3{##3\Hy@xspace@end}% + \let\hyper@anchor\ltx@gobble + \let\hyper@anchorstart\ltx@gobble + \def\hyper@anchorend{\Hy@xspace@end}% + \let\hyper@linkstart\ltx@gobbletwo + \def\hyper@linkend{\Hy@xspace@end}% + \def\hyper@linkurl##1##2{##1\Hy@xspace@end}% + \def\hyper@linkfile##1##2##3{##1\Hy@xspace@end}% } \def\endNoHyper{% \global\let\hyper@link\hyper@livelink @@ -5841,7 +5854,7 @@ \string\gdef\string\HyperFirstAtBeginDocument\string#1{\string#1}% }% \fi - \def\HyperFirstAtBeginDocument#1{#1}% + \let\HyperFirstAtBeginDocument\ltx@firstofone \ifx\hyper@last\@undefined \def\@starttoc#1{% \begingroup @@ -5924,12 +5937,12 @@ \Hy@UseMaketitleString{author}% } \RequirePackage{atbegshi}[2007/09/09] -\def\Hy@EveryPageHook{} -\def\Hy@EveryPageBoxHook{} -\def\Hy@FirstPageHook{} +\let\Hy@EveryPageHook\ltx@empty +\let\Hy@EveryPageBoxHook\ltx@empty +\let\Hy@FirstPageHook\ltx@empty \AtBeginShipout{% \Hy@EveryPageHook - \ifx\Hy@EveryPageBoxHook\@empty + \ifx\Hy@EveryPageBoxHook\ltx@empty \else \setbox\AtBeginShipoutBox=\vbox{% \offinterlineskip @@ -5943,7 +5956,7 @@ } \g@addto@macro\Hy@FirstPageHook{% \PDF@FinishDoc - \gdef\PDF@FinishDoc{}% + \global\let\PDF@FinishDoc\ltx@empty } \ifHy@pagelabels \begingroup\expandafter\expandafter\expandafter\endgroup @@ -5960,18 +5973,18 @@ \gdef\HyPL@thisLabel{#1}% }% \global\let\HyPL@thisLabel\relax - \def\HyPL@Labels{}% + \let\HyPL@Labels\ltx@empty \newcount\Hy@abspage \Hy@abspage=0 % \def\HyPL@LastType{init}% \def\HyPL@LastNumber{0}% - \def\HyPL@LastPrefix{}% + \let\HyPL@LastPrefix\ltx@empty \def\HyPL@arabic{D}% \def\HyPL@Roman{R}% \def\HyPL@roman{r}% \def\HyPL@Alph{A}% \def\HyPL@alph{a}% - \def\HyPL@SlidesSetPage{}% + \let\HyPL@SlidesSetPage\ltx@empty \ltx@ifclassloaded{slides}{% \def\HyPL@SlidesSetPage{% \advance\c@page\ltx@one @@ -5980,7 +5993,7 @@ \Hy@SlidesFormatOptionalPage{\thepage}% }% \else - \def\HyPL@SlidesOptionalPage{}% + \let\HyPL@SlidesOptionalPage\ltx@empty \fi \advance\c@page-\ltx@one \def\HyPL@page{% @@ -7573,7 +7586,7 @@ \def\Hy@temp{#3}% \ifx\Hy@temp\@empty \else - \Hy@ReturnAfterFi{% + \ltx@ReturnAfterFi{% \HyInd@hyperpage#3\@nil }% \fi @@ -7609,7 +7622,7 @@ \hyperlink{page.\the\toks@}{\the\toks@}% \fi \else - \Hy@ReturnAfterFi{% + \ltx@ReturnAfterFi{% \HyInd@removespaces#2\@nil }% \fi |