From afed98026fd3beecf3c2604189684da46a4b378a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 25 Apr 2008 16:55:22 +0000 Subject: hyperref update (24apr08) git-svn-id: svn://tug.org/texlive/trunk@7647 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/hyperref/hyperref.dtx | 179 ++++++++++++--------- 1 file changed, 103 insertions(+), 76 deletions(-) (limited to 'Master/texmf-dist/source/latex/hyperref') diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 41e4538f7b2..34f7b252451 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -39,7 +39,7 @@ %\ProvidesFile{puenc.def} %\ProvidesFile{puvnenc.def} %\ProvidesFile{puarenc.def} -% [2008/04/20 v6.77s +% [2008/04/22 v6.77t % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -116,7 +116,7 @@ \end{document} % % \fi -% \CheckSum{22824} +% \CheckSum{22885} % % \MakeShortVerb{|} % \StopEventually{} @@ -1145,6 +1145,7 @@ % \begin{macrocode} \let\ref\HyPsd@ref \let\pageref\HyPsd@pageref + \let\nameref\HyPsd@nameref \let\autoref\HyPsd@autoref % \end{macrocode} % @@ -2346,7 +2347,42 @@ \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter\@car \expandafter\expandafter\expandafter\@gobble - \csname r@#1\endcsname\@nil + \csname r@#1\endcsname{}\@nil + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HyPsd@nameref} +% Macro \cs{HyPsd@nameref} calls the macro \cs{HyPsd@@nameref} for star checking. +% The same methods like in \cs{HyPsd@hspace} is used. +% \begin{macrocode} +\def\HyPsd@nameref#1{\HyPsd@@nameref#1*\END} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@nameref} +% Macro \cs{HyPsd@@nameref} checks if a star is present. +% \begin{macrocode} +\def\HyPsd@@nameref#1*#2\END{% + \ifx\\#2\\% + \HyPsd@@@nameref{#1}% + \else + \expandafter\HyPsd@@@nameref + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@@nameref} +% \cs{HyPsd@@@nameref} does the work and extracts the third argument. +% \begin{macrocode} +\def\HyPsd@@@nameref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax + ??% + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@car + \expandafter\expandafter\expandafter\@gobbletwo + \csname r@#1\endcsname{}{}\@nil \fi } % \end{macrocode} @@ -7626,6 +7662,27 @@ % % \subsubsection{pdfmarkbase, dvipdfm} % +% \begin{macrocode} +%<*pdfmarkbase> +\begingroup + \toks@\expandafter{\Hy@FirstPageHook}% + \xdef\Hy@FirstPageHook{% + \noexpand\headerps@out{% + systemdict /pdfmark known% + {% + userdict /?pdfmark systemdict /exec get put% + }{% + userdict /?pdfmark systemdict /pop get put % + userdict /pdfmark systemdict /cleartomark get put% + }% + ifelse% + }% + \the\toks@ + }% +\endgroup +% +% \end{macrocode} +% % \begin{macro}{\Hy@PutCatalog} % \begin{macrocode} %\def\Hy@PutCatalog#1{\@pdfm@mark{docview << #1 >>}} @@ -13169,7 +13226,7 @@ % \end{macrocode} % % \begin{macrocode} -\AtBeginShipoutFirst{% +\g@addto@macro\Hy@FirstPageHook{% \headerps@out{% % \end{macrocode} % Unless I am going mad, this \emph{appears} to be the relationship @@ -13256,15 +13313,7 @@ % PDF coordinates currentpoint exch pop vsize 72 sub % exch DvipsToPDF sub /pdf@voff exch def% - } def % - systemdict /pdfmark known% - {% - userdict /?pdfmark systemdict /exec get put% - }{% - userdict /?pdfmark systemdict /pop get put % - userdict /pdfmark systemdict /cleartomark get put% - }% - ifelse% + } def% }% } \AfterBeginDocument{% @@ -13291,6 +13340,8 @@ % % \begin{macrocode} %<*vtexpdfmark> +\def\literalps@out#1{\special{pS:#1}}% +\def\headerps@out#1{\immediate\special{pS:#1}}% \input{pdfmark.def}% \ifx\@pdfproducer\relax \ifnum\OpMode=\@ne @@ -13299,8 +13350,6 @@ \def\@pdfproducer{VTeX + Distiller}% \fi \fi -\def\literalps@out#1{\special{pS:#1}}% -\def\headerps@out#1{\immediate\special{pS:#1}}% \providecommand*\@pdfborder{0 0 1} \providecommand*\@pdfborderstyle{} \providecommand*\@pdfview{XYZ} @@ -13308,7 +13357,7 @@ % \end{macrocode} % % \begin{macrocode} -\AtBeginShipoutFirst{% +\g@addto@macro\Hy@FirstPageHook{% \headerps@out{% /vsize {\Hy@pageheight} def% % \end{macrocode} @@ -13369,15 +13418,7 @@ /pdf@urx exch def % currentpoint exch pop vsize 72 sub add% /pdf@voff exch def% - } def % - systemdict /pdfmark known% - {% - userdict /?pdfmark systemdict /exec get put% - }{% - userdict /?pdfmark systemdict /pop get put % - userdict /pdfmark systemdict /cleartomark get put% - }% - ifelse% + } def% }% } % @@ -13451,7 +13492,7 @@ % set afterwards. % % \begin{macrocode} -\AtBeginShipoutFirst{% +\g@addto@macro\Hy@FirstPageHook{% \headerps@out{% /betterpdfmark {% systemdict begin % @@ -13464,14 +13505,7 @@ }ifelse % end% }def\Hy@ps@CR - __pdfmark__ not{/pdfmark /betterpdfmark load def}if % - systemdict /pdfmark known% - {% - userdict /?pdfmark systemdict /load get put% - }{% - userdict /?pdfmark systemdict /pop get put% - }% - ifelse% + __pdfmark__ not{/pdfmark /betterpdfmark load def}if% }% end of \headerps@out }% end of \AtBeginShipoutFirst % @@ -13644,12 +13678,12 @@ %<*dvipsone> \providecommand*\@pdfborder{0 0 1} \providecommand*\@pdfborderstyle{} +\def\literalps@out#1{\special{ps:#1}}% +\def\headerps@out#1{\special{headertext=#1}}% \input{pdfmark.def}% \ifx\@pdfproducer\relax \def\@pdfproducer{dvipsone + Distiller}% \fi -\def\literalps@out#1{\special{ps:#1}}% -\def\headerps@out#1{\special{! #1}}% \def\PDF@FinishDoc{% \Hy@UseMaketitleInfos \special{PDF: Keywords \@pdfkeywords}% @@ -13768,15 +13802,16 @@ % The Rect pair are called at the LL and UR corners of a box % known to \TeX. % \begin{macrocode} -\special{headertext=% +\g@addto@macro\Hy@FirstPageHook{% + \headerps@out{% % \end{macrocode} % dvipsone lives in scaled points; does this mean 65536 or 65781? % \begin{macrocode} - /DvipsToPDF { 65781 div } def% - /PDFToDvips { 65781 mul } def% - /BPToDvips{65781 mul}def% - /HyperBorder { 1 PDFToDvips } def% - /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def% + /DvipsToPDF { 65781 div } def% + /PDFToDvips { 65781 mul } def% + /BPToDvips{65781 mul}def% + /HyperBorder { 1 PDFToDvips } def% + /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def% % \end{macrocode} % The values inside the /Boder array are not taken literally, but % interpreted by ghostscript using the resolution of the dvi driver. @@ -13791,40 +13826,32 @@ % \end{macrocode} % % \begin{macrocode} - /H.S {% - currentpoint % - HyperBorder add /pdf@lly exch def % - dup DvipsToPDF 72 add /pdf@hoff exch def % - HyperBorder sub /pdf@llx exch def% - } def% - /H.L {% - 2 sub % - PDFToDvips /HyperBase exch def % - currentpoint % - HyperBase sub /pdf@ury exch def% - /pdf@urx exch def% - } def% - /H.A {% - H.L % - currentpoint exch pop % - HyperBase sub % baseline skip - DvipsToPDF /pdf@voff exch def% - } def% - /H.R {% - currentpoint % - HyperBorder sub /pdf@ury exch def % - HyperBorder add /pdf@urx exch def % - currentpoint exch pop DvipsToPDF /pdf@voff exch def% - } def % - systemdict% - /pdfmark known% - {% - userdict /?pdfmark /exec load put% - }{% - userdict /?pdfmark /pop load put % - userdict /pdfmark systemdict /cleartomark get put% + /H.S {% + currentpoint % + HyperBorder add /pdf@lly exch def % + dup DvipsToPDF 72 add /pdf@hoff exch def % + HyperBorder sub /pdf@llx exch def% + } def% + /H.L {% + 2 sub % + PDFToDvips /HyperBase exch def % + currentpoint % + HyperBase sub /pdf@ury exch def% + /pdf@urx exch def% + } def% + /H.A {% + H.L % + currentpoint exch pop % + HyperBase sub % baseline skip + DvipsToPDF /pdf@voff exch def% + } def% + /H.R {% + currentpoint % + HyperBorder sub /pdf@ury exch def % + HyperBorder add /pdf@urx exch def % + currentpoint exch pop DvipsToPDF /pdf@voff exch def% + } def% }% - ifelse% } % %<*dvipdf> @@ -13952,7 +13979,7 @@ % \begin{macrocode} %<*pdfmark> \long\def\@Form[#1]{% -\AtBeginShipoutFirst{% +\g@addto@macro\Hy@FirstPageHook{% \headerps@out{% [% /_objdef{pdfDocEncoding}% -- cgit v1.2.3