diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-25 23:32:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-25 23:32:40 +0000 |
commit | 160d4e9edc8db0aa14b4865744b6fca79846d78b (patch) | |
tree | 94bb345edbae57321cbae67cdcdc0e2ab2c1984d /Master/texmf-dist/source/latex/hyperref | |
parent | e82be56a22fd2464132008f7cdd8c41eb906100e (diff) |
hyperref (25nov10)
git-svn-id: svn://tug.org/texlive/trunk@20566 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 335 |
1 files changed, 206 insertions, 129 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 9c9a690c4f8..6ec0881f8da 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/10/30 v6.81t +%<!none> [2010/11/22 v6.81u % %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -139,7 +139,7 @@ \end{document} %</driver> % \fi -% \CheckSum{27991} +% \CheckSum{28073} % % \MakeShortVerb{|} % \StopEventually{} @@ -598,11 +598,31 @@ } % \end{macrocode} % \begin{macrocode} +\RequirePackage{ifpdf}[2006/02/20] +\RequirePackage{pdftexcmds}[2009/04/10] +\@ifpackagelater{pdftexcmds}{2010/11/04}{}{% + \ltx@IfUndefined{pdfdraftmode}{% + \let\pdf@ifdraftmode\ltx@secondoftwo + }{% + \ifpdf + \def\pdf@ifdraftmode{% + \ifnum\pdf@draftmode=\ltx@one + \expandafter\ltx@firstoftwo + \else + \expandafter\ltx@secondoftwo + \fi + }% + \else + \let\pdf@ifdraftmode\ltx@secondoftwo + \fi + }% +} +% \end{macrocode} +% \begin{macrocode} \RequirePackage{infwarerr}[2010/04/08] \RequirePackage{keyval}[1997/11/10] \RequirePackage{kvsetkeys}[2007/09/29] \RequirePackage{pdfescape}[2007/11/11] -\RequirePackage{ifpdf}[2006/02/20] \RequirePackage{ifvtex} \RequirePackage{ifxetex}[2006/08/21] \RequirePackage{hycolor} @@ -2190,7 +2210,6 @@ \let\HyOrg@languageshorthands\languageshorthands \let\languageshorthands\HyPsd@LanguageShorthands } -\RequirePackage{pdftexcmds}[2009/04/10] \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname pdf@strcmp\endcsname\relax \let\HyPsd@langshort@system\@empty @@ -7002,8 +7021,8 @@ \Hy@AtBeginDocument{% \ifHy@texht \else - \Hy@CatcodeWrapper{% - \ReadBookmarks + \pdf@ifdraftmode{}{% + \Hy@CatcodeWrapper\ReadBookmarks }% \fi } @@ -8349,6 +8368,32 @@ \def\Form@method{} \@namedef{Form@method@post}{0} \@namedef{Form@method@get}{1} +% \end{macrocode} +% \begin{macrocode} +\newif\ifHyField@NeedAppearances +\def\HyField@NeedAppearancesfalse{% + \global\let\ifHyField@NeedAppearances\iffalse +} +\def\HyField@NeedAppearancestrue{% + \global\let\ifHyField@NeedAppearances\iftrue +} +\HyField@NeedAppearancestrue +\define@key{Form}{NeedAppearances}[true]{% + \edef\Hy@tempa{#1}% + \ifx\Hy@tempa\Hy@true + \HyField@NeedAppearancestrue + \else + \ifx\Hy@tempa\Hy@false + \HyField@NeedAppearancesfalse + \else + \Hy@Error{% + Unexpected value `\Hy@tempa'\MessageBreak + of option `NeedAppearances' instead of\MessageBreak + `true' or `false'% + }\@ehc + \fi + \fi +} \def\Field@boolkey#1#2{% \csname Fld@#2\ifx\relax#1\relax true\else#1\fi\endcsname } @@ -9351,7 +9396,13 @@ % % \begin{macro}{\Hy@PutCatalog} % \begin{macrocode} -%<pdftex>\let\Hy@PutCatalog\pdfcatalog +%<*pdftex> +\pdf@ifdraftmode{% + \let\Hy@PutCatalog\ltx@gobble +}{% + \let\Hy@PutCatalog\pdfcatalog +} +%</pdftex> % \end{macrocode} % The code for VTeX is more complicate, because it does % not allow the direct access to the /Catalog object. @@ -10435,13 +10486,10 @@ \the\LT@p@ftn \begingroup \noexpand\c@footnote=\the\c@footnote\relax - \noexpand\protected@xdef - \noexpand\@thefnmark{\noexpand\thempfn}% \noexpand\protected@xdef\noexpand\@thefnmark{% \noexpand\thempfn }% - \expandafter\noexpand\expandafter\Hy@LT@footnotetext - \expandafter{% + \noexpand\Hy@LT@footnotetext{% \Hy@footnote@currentHref }% }% @@ -12096,7 +12144,6 @@ % Since version 1.30.0 pdf\TeX\ offers \cs{pdfescapestring}. % \begin{macrocode} %<*pdftex|dvipdfm|xetex|vtex|pdfmarkbase|dviwindo> -\RequirePackage{pdftexcmds}[2009/04/10] \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname pdf@escapestring\endcsname\relax \begingroup @@ -12218,77 +12265,79 @@ % % \begin{macrocode} \ifHy@ocgcolorlinks - \immediate\pdfobj{% - <<% - /Type/OCG% - /Name(View)% - /Usage<<% - /Print<<% - /PrintState/OFF% - >>% - /View<<% - /ViewState/ON% - >>% - >>% - >>% - }% - \edef\OBJ@OCG@view{\the\pdflastobj\space 0 R}% - \immediate\pdfobj{% - <<% - /Type/OCG% - /Name(Print)% - /Usage<<% - /Print<<% - /PrintState/ON% - >>% - /View<<% - /ViewState/OFF% + \pdf@ifdraftmode{}{% + \immediate\pdfobj{% + <<% + /Type/OCG% + /Name(View)% + /Usage<<% + /Print<<% + /PrintState/OFF% + >>% + /View<<% + /ViewState/ON% + >>% >>% >>% - >>% - }% - \edef\OBJ@OCG@print{\the\pdflastobj\space 0 R}% - \immediate\pdfobj{% - [% - \OBJ@OCG@view\space\OBJ@OCG@print - ]% - }% - \edef\OBJ@OCGs{\the\pdflastobj\space 0 R}% - \pdfcatalog{% - /OCProperties<<% - /OCGs \OBJ@OCGs - /D<<% - /OFF[\OBJ@OCG@print]% - /AS[% - <<% - /Event/View% - /OCGs \OBJ@OCGs - /Category[/View]% - >>% - <<% - /Event/Print% - /OCGs \OBJ@OCGs - /Category[/Print]% + }% + \edef\OBJ@OCG@view{\the\pdflastobj\space 0 R}% + \immediate\pdfobj{% + <<% + /Type/OCG% + /Name(Print)% + /Usage<<% + /Print<<% + /PrintState/ON% >>% - <<% - /Event/Export% - /OCGs \OBJ@OCGs - /Category[/Print]% + /View<<% + /ViewState/OFF% >>% - ]% + >>% >>% - >>% - }% - \begingroup - \edef\x{\endgroup - \pdfpageresources{% - /Properties<<% - /OCView \OBJ@OCG@view - /OCPrint \OBJ@OCG@print + }% + \edef\OBJ@OCG@print{\the\pdflastobj\space 0 R}% + \immediate\pdfobj{% + [% + \OBJ@OCG@view\space\OBJ@OCG@print + ]% + }% + \edef\OBJ@OCGs{\the\pdflastobj\space 0 R}% + \pdfcatalog{% + /OCProperties<<% + /OCGs \OBJ@OCGs + /D<<% + /OFF[\OBJ@OCG@print]% + /AS[% + <<% + /Event/View% + /OCGs \OBJ@OCGs + /Category[/View]% + >>% + <<% + /Event/Print% + /OCGs \OBJ@OCGs + /Category[/Print]% + >>% + <<% + /Event/Export% + /OCGs \OBJ@OCGs + /Category[/Print]% + >>% + ]% >>% - }% + >>% }% - \x + \begingroup + \edef\x{\endgroup + \pdfpageresources{% + /Properties<<% + /OCView \OBJ@OCG@view + /OCPrint \OBJ@OCG@print + >>% + }% + }% + \x + }% \Hy@AtBeginDocument{% \def\Hy@colorlink#1{% \begingroup @@ -12706,31 +12755,33 @@ % \begin{macro}{\PDF@FinishDoc} % \begin{macrocode} \def\PDF@FinishDoc{% - \Hy@UseMaketitleInfos - \HyInfo@GenerateAddons - \pdfinfo{% - /Author(\@pdfauthor)% - /Title(\@pdftitle)% - /Subject(\@pdfsubject)% - /Creator(\@pdfcreator)% - \ifx\@pdfcreationdate\@empty - \else - /CreationDate(\@pdfcreationdate)% - \fi - \ifx\@pdfmoddate\@empty - \else - /ModDate(\@pdfmoddate)% - \fi - \ifx\@pdfproducer\relax - \else - /Producer(\@pdfproducer)% - \fi - /Keywords(\@pdfkeywords)% - \ifx\@pdftrapped\@empty - \else - /Trapped/\@pdftrapped - \fi - \HyInfo@Addons + \pdf@ifdraftmode{}{% + \Hy@UseMaketitleInfos + \HyInfo@GenerateAddons + \pdfinfo{% + /Author(\@pdfauthor)% + /Title(\@pdftitle)% + /Subject(\@pdfsubject)% + /Creator(\@pdfcreator)% + \ifx\@pdfcreationdate\@empty + \else + /CreationDate(\@pdfcreationdate)% + \fi + \ifx\@pdfmoddate\@empty + \else + /ModDate(\@pdfmoddate)% + \fi + \ifx\@pdfproducer\relax + \else + /Producer(\@pdfproducer)% + \fi + /Keywords(\@pdfkeywords)% + \ifx\@pdftrapped\@empty + \else + /Trapped/\@pdftrapped + \fi + \HyInfo@Addons + }% }% \Hy@DisableOption{pdfauthor}% \Hy@DisableOption{pdftitle}% @@ -12877,10 +12928,12 @@ % \end{macro} % % \begin{macrocode} -\g@addto@macro\Hy@EveryPageHook{% - \hyper@pagetransition - \hyper@pageduration - \hyper@pagehidden +\pdf@ifdraftmode{}{% + \g@addto@macro\Hy@EveryPageHook{% + \hyper@pagetransition + \hyper@pageduration + \hyper@pagehidden + }% } % \end{macrocode} % @@ -14811,9 +14864,15 @@ \ifHy@breaklinks \else \leavevmode + \ifmmode + \def\Hy@LinkMath{$}% + \else + \def\Hy@LinkMath{}% + \fi \Hy@SaveSpaceFactor \hbox\bgroup \Hy@RestoreSpaceFactor + \Hy@LinkMath \fi \expandafter\Hy@colorlink\csname @#1color\endcsname \literalps@out{H.S}% @@ -14845,6 +14904,7 @@ \Hy@endcolorlink \ifHy@breaklinks \else + \Hy@LinkMath \Hy@SaveSpaceFactor \egroup \Hy@RestoreSpaceFactor @@ -15183,16 +15243,25 @@ \else \leavevmode \Hy@SaveSpaceFactor + \ifmmode + \def\Hy@LinkMath{$}% + \else + \def\Hy@LinkMath{}% + \fi \ifHy@breaklinks \Hy@setouterhbox\pdf@box{% \Hy@RestoreSpaceFactor + \Hy@LinkMath \Hy@AllowHyphens#1% + \Hy@LinkMath \Hy@SaveSpaceFactor }% \else \sbox\pdf@box{% \Hy@RestoreSpaceFactor + \Hy@LinkMath #1% + \Hy@LinkMath \Hy@SaveSpaceFactor }% \fi @@ -16564,7 +16633,9 @@ /CO{corder}% \ifHy@pdfa \else - /NeedAppearances true% + \ifHyField@NeedAppearances + /NeedAppearances true% + \fi \fi >>% /PUT pdfmark% @@ -17027,31 +17098,35 @@ \def\@Form[#1]{% \@ifundefined{textcolor}{\let\textcolor\@gobble}{}% \kvsetkeys{Form}{#1}% - \Hy@FormObjects - \ifnum\pdftexversion>13 % - \pdfrefobj\OBJ@pdfdocencoding - \pdfrefobj\OBJ@ZaDb - \pdfrefobj\OBJ@Helv - \fi - \AtVeryEndDocument{% - \immediate\pdfobj{% - <<% - /Fields[\HyField@afields]% - /DR<<% - /Font<<% - /ZaDb \OBJ@ZaDb\space 0 R% - /Helv \OBJ@Helv\space 0 R% + \pdf@ifdraftmode{}{% + \Hy@FormObjects + \ifnum\pdftexversion>13 % + \pdfrefobj\OBJ@pdfdocencoding + \pdfrefobj\OBJ@ZaDb + \pdfrefobj\OBJ@Helv + \fi + \AtVeryEndDocument{% + \immediate\pdfobj{% + <<% + /Fields[\HyField@afields]% + /DR<<% + /Font<<% + /ZaDb \OBJ@ZaDb\space 0 R% + /Helv \OBJ@Helv\space 0 R% + >>% >>% + /DA(/Helv 10 Tf 0 g)% + \ifHy@pdfa + \else + \ifHyField@NeedAppearances + /NeedAppearances true% + \fi + \fi >>% - /DA(/Helv 10 Tf 0 g)% - \ifHy@pdfa - \else - /NeedAppearances true% - \fi - >>% + }% + \edef\OBJ@acroform{\the\pdflastobj}% + \pdfcatalog{/AcroForm \OBJ@acroform\space 0 R}% }% - \edef\OBJ@acroform{\the\pdflastobj}% - \pdfcatalog{/AcroForm \OBJ@acroform\space 0 R}% }% \MakeFieldObject{% % \end{macrocode} @@ -17404,7 +17479,9 @@ /CO @corder% \ifHy@pdfa \else - /NeedAppearances true% + \ifHyField@NeedAppearances + /NeedAppearances true% + \fi \fi >>% }% |