diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 189 |
1 files changed, 124 insertions, 65 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index abbd9b2287c..76bffa69333 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/08/18 v6.83b % +%<!none> [2012/08/21 v6.83c % %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -147,7 +147,7 @@ \end{document} %</driver> % \fi -% \CheckSum{39205} +% \CheckSum{39268} % % \MakeShortVerb{|} % \StopEventually{} @@ -3688,69 +3688,71 @@ % And active characters need to be checked, if they have been defined % using \cs{protected}. % \begin{macrocode} -\catcode`\Q=\active -\let Q\ltx@empty -\def\HyPsd@CheckCatcodes#1#2\HyPsd@End{% - \global\let\HyPsd@Rest\relax - \ifcat\relax\noexpand#1\relax - \ifx#1\protect - \else - \ifx#1\penalty - \setbox\z@=\hbox{% - \afterassignment\HyPsd@AfterCountRemove - \count@=#2\HyPsd@End - }% +\begingroup + \catcode`\Q=\active + \let Q\ltx@empty + \gdef\HyPsd@CheckCatcodes#1#2\HyPsd@End{% + \global\let\HyPsd@Rest\relax + \ifcat\relax\noexpand#1\relax + \ifx#1\protect \else - \ifx#1\kern + \ifx#1\penalty \setbox\z@=\hbox{% - \afterassignment\HyPsd@AfterDimenRemove - \dimen@=#2\HyPsd@End + \afterassignment\HyPsd@AfterCountRemove + \count@=#2\HyPsd@End }% \else - \ifx#1\hskip + \ifx#1\kern \setbox\z@=\hbox{% - \afterassignment\HyPsd@AfterSkipRemove - \skip@=#2\HyPsd@End + \afterassignment\HyPsd@AfterDimenRemove + \dimen@=#2\HyPsd@End }% \else - \HyPsd@CatcodeWarning{#1}% + \ifx#1\hskip + \setbox\z@=\hbox{% + \afterassignment\HyPsd@AfterSkipRemove + \skip@=#2\HyPsd@End + }% + \else + \HyPsd@CatcodeWarning{#1}% + \fi \fi \fi \fi - \fi - \else - \ifcat\noexpand#1\noexpandQ% active character - \expandafter\expandafter\expandafter\def - \expandafter\expandafter\expandafter\HyPsd@String - \expandafter\expandafter\expandafter{% - \expandafter\HyPsd@String\string#1% - }% \else - \ifcat#1A% letter - \expandafter\def\expandafter\HyPsd@String\expandafter{% - \HyPsd@String#1% + \ifcat\noexpand#1\noexpandQ% active character + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\HyPsd@String + \expandafter\expandafter\expandafter{% + \expandafter\HyPsd@String\string#1% }% \else - \ifcat#1 % SPACE + \ifcat#1A% letter \expandafter\def\expandafter\HyPsd@String\expandafter{% - \HyPsd@String\HyPsd@SPACEOPTI + \HyPsd@String#1% }% \else - \ifcat$#1% - \HyPsd@CatcodeWarning{math shift}% + \ifcat#1 % SPACE + \expandafter\def\expandafter\HyPsd@String\expandafter{% + \HyPsd@String\HyPsd@SPACEOPTI + }% \else - \ifcat% - \HyPsd@CatcodeWarning{alignment tab}% + \ifcat$#1% + \HyPsd@CatcodeWarning{math shift}% \else - \ifcat^#1% - \HyPsd@CatcodeWarning{superscript}% + \ifcat% + \HyPsd@CatcodeWarning{alignment tab}% \else - \ifcat_#1% - \HyPsd@CatcodeWarning{subscript}% + \ifcat^#1% + \HyPsd@CatcodeWarning{superscript}% \else - \expandafter\def\expandafter\HyPsd@String\expandafter{% - \HyPsd@String#1% - }% + \ifcat_#1% + \HyPsd@CatcodeWarning{subscript}% + \else + \expandafter\def\expandafter\HyPsd@String\expandafter{% + \HyPsd@String#1% + }% + \fi \fi \fi \fi @@ -3758,25 +3760,24 @@ \fi \fi \fi - \fi - \ifx\HyPsd@Rest\relax - \ifx\scrollmode#2\scrollmode - \else - \Hy@ReturnAfterFiFiEnd{% - \HyPsd@CheckCatcodes#2\HyPsd@End - }% - \fi - \else - \ifx\HyPsd@Rest\@empty + \ifx\HyPsd@Rest\relax + \ifx\scrollmode#2\scrollmode + \else + \Hy@ReturnAfterFiFiEnd{% + \HyPsd@CheckCatcodes#2\HyPsd@End + }% + \fi \else - \Hy@ReturnAfterFiFiEnd{% - \expandafter\HyPsd@CheckCatcodes\HyPsd@Rest\HyPsd@End - }% + \ifx\HyPsd@Rest\@empty + \else + \Hy@ReturnAfterFiFiEnd{% + \expandafter\HyPsd@CheckCatcodes\HyPsd@Rest\HyPsd@End + }% + \fi \fi - \fi - \Hy@ReturnEnd -} -\catcode`\Q=11 % + \Hy@ReturnEnd + }% +\endgroup % \end{macrocode} % \end{macro} % @@ -9602,6 +9603,7 @@ \def\@starttoc#1{% \begingroup \makeatletter + \ltx@ifpackageloaded{parskip}{\parskip\z@}{}% \IfFileExists{\jobname.#1}{% \Hy@WarningNoLine{% old #1 file detected, not used; run LaTeX again% @@ -17783,6 +17785,7 @@ \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum \Hy@Message{Sorry, pdfmark drivers do not support FORM gauges}% } +\edef\Fld@pageobjref{/P\string{ThisPage\string}} \def\@TextField[#1]#2{% parameters, label \def\Fld@name{#2}% \let\Fld@default\ltx@empty @@ -18284,6 +18287,36 @@ }{SubmitP}% } \let\@endForm\ltx@empty +% \end{macrocode} +% \begin{macrocode} +\let\HyAnn@AbsPageLabel\ltx@empty +\let\Fld@pageobjref\ltx@empty +\ltx@IfUndefined{pdfpageref}{% +}{% + \ltx@ifpackageloaded{zref-abspage}{% + \newcount\HyAnn@Count + \HyAnn@Count=\ltx@zero + \def\HyAnn@AbsPageLabel{% + \global\advance\HyAnn@Count by\ltx@one + \zref@labelbyprops{HyAnn@\the\HyAnn@Count}{abspage}% + \zref@refused{HyAnn@\the\HyAnn@Count}% + }% + \def\Fld@pageobjref{% + \zref@ifrefundefined{HyAnn@\the\HyAnn@Count}{% + }{% + \zref@ifrefcontainsprop{HyAnn@\the\HyAnn@Count}{abspage}{% + /P \pdfpageref + \zref@extractdefault{HyAnn@\the\HyAnn@Count}{abspage}{1} % + \space 0 R% + }{% + }% + }% + }% + }{% + }% +} +% \end{macrocode} +% \begin{macrocode} \def\@TextField[#1]#2{% parameters, label \def\Fld@name{#2}% \let\Fld@default\ltx@empty @@ -18306,6 +18339,7 @@ \ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi \LayoutTextField{#2}{% \leavevmode + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Text \pdfstartlink user {\PDFForm@Text}\relax \MakeTextField{\Fld@width}{\Fld@height}\pdfendlink @@ -18391,6 +18425,7 @@ \Hy@StepCount\Fld@listcount \@currDisplay\space \leavevmode + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Radio \pdfstartlink user {% \PDFForm@Radio @@ -18418,6 +18453,7 @@ \def\@@Listbox#1{% \HyField@PDFChoices{#1}% \leavevmode + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@List \pdfstartlink user {\PDFForm@List}\relax \MakeChoiceField{\Fld@width}{\Fld@height}% @@ -18444,6 +18480,7 @@ \ifFld@hidden\def\Fld@width{1sp}\fi \LayoutPushButtonField{% \leavevmode + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Push \pdfstartlink user {\PDFForm@Push}\relax \MakeButtonField{#2}% @@ -18464,6 +18501,7 @@ \HyField@FlagsSubmit \ifFld@hidden\def\Fld@width{1sp}\fi \leavevmode + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Submit \pdfstartlink user {% \PDFForm@Submit @@ -18491,6 +18529,7 @@ \else \HyField@FlagsPushButton \ifFld@hidden\def\Fld@width{1sp}\fi + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Reset \pdfstartlink user {\PDFForm@Reset}\relax \MakeButtonField{#2}% @@ -18513,6 +18552,7 @@ \ifFld@hidden\def\Fld@width{1sp}\fi \LayoutCheckField{#2}{% \leavevmode + \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Check \pdfstartlink user {\PDFForm@Check}\relax \MakeCheckField{\Fld@width}{\Fld@height}% @@ -18665,6 +18705,12 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\Fld@pageobjref} +% \begin{macrocode} +\def\Fld@pageobjref{/P @thispage}% +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\@TextField} % \begin{macrocode} \def\@TextField[#1]#2{% parameters, label @@ -19044,10 +19090,16 @@ %<*pdfform> % \end{macrocode} % +% \begin{macro}{\Fld@pageobjref} +% \begin{macrocode} +\providecommand*{\Fld@pageobjref}{} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\Hy@escapestring} % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname pdfescapestring\endcsname\relax +\expandafter\ifx\csname pdf@escapestring\endcsname\relax \let\Hy@escapestring\@firstofone \def\Hy@escapeform#1{% \ifHy@pdfescapeform @@ -19229,6 +19281,7 @@ \def\PDFForm@Check{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Btn% \Fld@flags @@ -19252,7 +19305,7 @@ /DA(/ZaDb \strip@pt\Fld@charsize\space Tf% \ifx\Fld@color\@empty\else\space\Fld@color\fi)% /H/P% - \ifFld@checked /V/Yes\else /V/Off\fi + \ifFld@checked /V/Yes/AS/Yes\else /V/Off/AS/Off\fi \Fld@additionalactions } % \end{macrocode} @@ -19264,6 +19317,7 @@ \def\PDFForm@Push{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Btn% \Fld@flags @@ -19296,6 +19350,7 @@ \def\PDFForm@List{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Ch% \Fld@flags @@ -19333,6 +19388,7 @@ \def\PDFForm@Radio{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Btn% \Fld@flags @@ -19351,7 +19407,7 @@ \else /BG[\Fld@bcolor]% \fi - /CA(\Fld@radiosymbol)% + /CA(\Hy@escapestring{\Fld@radiosymbol})% >>% /DA(/ZaDb \strip@pt\Fld@charsize\space Tf% \ifx\Fld@color\@empty\else\space\Fld@color\fi)% @@ -19371,6 +19427,7 @@ \def\PDFForm@Text{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Tx% \Fld@flags @@ -19410,6 +19467,7 @@ \def\PDFForm@Submit{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Btn% \Fld@flags @@ -19449,6 +19507,7 @@ \def\PDFForm@Reset{% /Subtype/Widget% \Fld@annotflags + \Fld@pageobjref \Fld@annotnames /FT/Btn% \Fld@flags |