diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/hyperref.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 222 |
1 files changed, 122 insertions, 100 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 9c7243af0b6..8175a5853e5 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -38,7 +38,7 @@ %<puenc>\ProvidesFile{puenc.def} %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} -%<!none> [2009/04/04 v6.78q +%<!none> [2009/05/01 v6.78r %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -114,7 +114,7 @@ \end{document} %</driver> % \fi -% \CheckSum{24557} +% \CheckSum{24573} % % \MakeShortVerb{|} % \StopEventually{} @@ -1244,8 +1244,9 @@ % approximation. So here a cheaper solution follows % in order to get rid of the error message at least: % \begin{macrocode} - \let\@ifnextchar\HyPsd@ifnextchar - \let\@ifnextchar\HyPsd@new@ifnextchar + \def\@ifnextchar{\HyPsd@ifnextchar\@ifnextchar}% + \def\kernel@ifnextchar{\HyPsd@ifnextchar\kernel@ifnextchar}% + \def\new@ifnextchar{\HyPsd@ifnextchar\new@ifnextchar}% \let\@protected@testopt\HyPsd@protected@testopt % \end{macrocode} % Support for package `xargs': @@ -2622,21 +2623,16 @@ % are canceled. \cs{@ifnextchar} cannot work in a correct % manner, because it uses \cs{futurelet}, but this is a % stomach feature, that doesn't work in an expanding context. +% There are several variants of \cs{@ifnextchar}: +% \begin{itemize} +% \item \cs{@ifnextchar} +% \item \cs{kernel@ifnextchar} +% \item \cs{new@ifnextchar} from package \verb|amsgen.sty| +% (bug report latex/3662). +% \end{itemize} % \begin{macrocode} -\def\HyPsd@ifnextchar{% - \pdfstringdefWarn\@ifnextchar - \expandafter\@gobbletwo\@gobble -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\HyPsd@new@ifnextchar} -% Package \verb|amsgen.sty| redefines \cs{@ifstar} using -% \cs{new@ifnextchar} instead of \cs{@ifnextchar}. See -% bug report latex/3662. -% \begin{macrocode} -\def\HyPsd@new@ifnextchar{% - \pdfstringdefWarn\new@ifnextchar +\def\HyPsd@ifnextchar#1{% + \pdfstringdefWarn#1% \expandafter\@gobbletwo\@gobble } % \end{macrocode} @@ -11656,6 +11652,9 @@ } % \end{macrocode} % \begin{macrocode} +\newcounter{Hy@AnnotLevel} +% \end{macrocode} +% \begin{macrocode} \ifHy@ocgcolorlinks \def\OBJ@OCG@view{@OCG@view}% \@pdfm@mark{% @@ -11768,112 +11767,135 @@ \fi % \end{macrocode} % \begin{macrocode} +\def\Hy@BeginAnnot#1{% + \stepcounter{Hy@AnnotLevel}% + \ifnum\value{Hy@AnnotLevel}=\@ne + #1% + \fi +} +\def\Hy@EndAnnot{% + \ifnum\value{Hy@AnnotLevel}=\@ne + \Hy@endcolorlink + \@pdfm@mark{eann}% + \fi + \addtocounter{Hy@AnnotLevel}\m@ne +} +% \end{macrocode} +% \begin{macrocode} \def\Hy@undefinedname{UNDEFINED} \def\hyper@linkstart#1#2{% - \protected@edef\Hy@testname{#2}% - \ifx\Hy@testname\@empty - \Hy@Warning{% - Empty destination name,\MessageBreak - using `\Hy@undefinedname'% - }% - \let\Hy@testname\Hy@undefinedname - \else - \Hy@pstringdef\Hy@testname{% - \expandafter\HyperDestNameFilter\expandafter{\Hy@testname}% - }% - \fi - \@pdfm@mark{% - bann<<% - /Type/Annot% - /Subtype/Link% - \ifHy@pdfa /F 4\fi - \Hy@setpdfborder - \expandafter\ifx\csname @#1bordercolor\endcsname\relax - \else - /C[\csname @#1bordercolor\endcsname]% - \fi - /A<<% - /S/GoTo% - /D(\Hy@testname)% + \Hy@BeginAnnot{% + \protected@edef\Hy@testname{#2}% + \ifx\Hy@testname\@empty + \Hy@Warning{% + Empty destination name,\MessageBreak + using `\Hy@undefinedname'% + }% + \let\Hy@testname\Hy@undefinedname + \else + \Hy@pstringdef\Hy@testname{% + \expandafter\HyperDestNameFilter\expandafter{\Hy@testname}% + }% + \fi + \@pdfm@mark{% + bann<<% + /Type/Annot% + /Subtype/Link% + \ifHy@pdfa /F 4\fi + \Hy@setpdfborder + \expandafter\ifx\csname @#1bordercolor\endcsname\relax + \else + /C[\csname @#1bordercolor\endcsname]% + \fi + /A<<% + /S/GoTo% + /D(\Hy@testname)% + >>% >>% - >>% + }% + \expandafter\Hy@colorlink\csname @#1color\endcsname }% - \expandafter\Hy@colorlink\csname @#1color\endcsname -} -\def\hyper@linkend{% - \Hy@endcolorlink - \@pdfm@mark{eann}% } +\def\hyper@linkend{\Hy@EndAnnot}% \def\hyper@link#1#2#3{% \hyper@linkstart{#1}{#2}#3\hyper@linkend } \def\hyper@linkfile#1#2#3{% - \Hy@pstringdef\Hy@pstringF{#2}% - \Hy@pstringdef\Hy@pstringD{#3}% \leavevmode - \@pdfm@mark{% - bann<<% - /Type/Annot% - /Subtype/Link% - \ifHy@pdfa /F 4\fi - \Hy@setpdfborder - \ifx\@filebordercolor\relax - \else - /C[\@filebordercolor]% - \fi - /A<<% - /S/GoToR% - /F(\Hy@pstringF)% - /D\ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD)\fi - \Hy@SetNewWindow + \Hy@BeginAnnot{% + \Hy@pstringdef\Hy@pstringF{#2}% + \Hy@pstringdef\Hy@pstringD{#3}% + \@pdfm@mark{% + bann<<% + /Type/Annot% + /Subtype/Link% + \ifHy@pdfa /F 4\fi + \Hy@setpdfborder + \ifx\@filebordercolor\relax + \else + /C[\@filebordercolor]% + \fi + /A<<% + /S/GoToR% + /F(\Hy@pstringF)% + /D\ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD)\fi + \Hy@SetNewWindow + >>% >>% - >>% + }% + \Hy@colorlink\@filecolor }% - \Hy@colorlink\@filecolor#1\Hy@endcolorlink - \@pdfm@mark{eann}% + #1% + \Hy@EndAnnot } \def\hyper@linkurl#1#2{% - \Hy@pstringdef\Hy@pstringURI{#2}% \leavevmode - \@pdfm@mark{% - bann<<% - /Type/Annot% - /Subtype/Link% - \ifHy@pdfa /F 4\fi - \Hy@setpdfborder - \ifx\@urlbordercolor\relax - \else - /C[\@urlbordercolor]% - \fi - /A<<% - /S/URI% - /URI(\Hy@pstringURI)% - >>% - >>% - }% - \Hy@colorlink\@urlcolor#1\Hy@endcolorlink - \@pdfm@mark{eann}% -} -\def\Acrobatmenu#1#2{% - \Hy@Acrobatmenu{#1}{#2}{% + \Hy@BeginAnnot{% + \Hy@pstringdef\Hy@pstringURI{#2}% \@pdfm@mark{% bann<<% /Type/Annot% /Subtype/Link% \ifHy@pdfa /F 4\fi - /A<<% - /S/Named% - /N/#1% - >>% \Hy@setpdfborder - \ifx\@menubordercolor\relax - \relax - /C[\@menubordercolor]% + \ifx\@urlbordercolor\relax + \else + /C[\@urlbordercolor]% \fi + /A<<% + /S/URI% + /URI(\Hy@pstringURI)% + >>% >>% }% - \Hy@colorlink\@menucolor#2\Hy@endcolorlink - \@pdfm@mark{eann}% + \Hy@colorlink\@urlcolor + }% + #1% + \Hy@EndAnnot +} +\def\Acrobatmenu#1#2{% + \Hy@Acrobatmenu{#1}{#2}{% + \Hy@BeginAnnot{% + \@pdfm@mark{% + bann<<% + /Type/Annot% + /Subtype/Link% + \ifHy@pdfa /F 4\fi + /A<<% + /S/Named% + /N/#1% + >>% + \Hy@setpdfborder + \ifx\@menubordercolor\relax + \relax + /C[\@menubordercolor]% + \fi + >>% + }% + \Hy@colorlink\@menucolor + }% + #2% + \Hy@EndAnnot }% } \ifx\@pdfproducer\relax |