diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-20 00:16:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-20 00:16:44 +0000 |
commit | 81e85f9bb5875b6c3cd460112e26e715d8965004 (patch) | |
tree | 080f756dab293c38187e2cc6cde199e717f57433 /Master/texmf-dist/tex/latex/hyperref/hdviwind.def | |
parent | 4cdec44e9893db7879eb9f2f34cfcbe52072abd0 (diff) |
hyperref 6.75a (1aug06)
git-svn-id: svn://tug.org/texlive/trunk@1993 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/hdviwind.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/hdviwind.def | 165 |
1 files changed, 133 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/hdviwind.def b/Master/texmf-dist/tex/latex/hyperref/hdviwind.def index 8114140d14c..547ea49423f 100644 --- a/Master/texmf-dist/tex/latex/hyperref/hdviwind.def +++ b/Master/texmf-dist/tex/latex/hyperref/hdviwind.def @@ -7,7 +7,6 @@ %% hyperref.dtx (with options: `dviwindo,pdfmarkbase') %% %% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz, -%% RCS: $Id: hyperref.dtx 6.71 2000/10/04 rahtz Exp rahtz $ %% %% This file is part of the `Hyperref Bundle'. %% ------------------------------------------- @@ -23,7 +22,7 @@ %% given in the file `manifest.txt'. %% \ProvidesFile{hdviwind.def} - [2003/11/30 v6.74m + [2006/08/16 v6.75c Hyperref driver for dviwindo] \def\Hy@PutCatalog#1{% \pdfmark{pdfmark=/PUT,Raw={\string{Catalog\string} << #1 >>}}% @@ -59,6 +58,55 @@ }% } \fi +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfescapestring\endcsname\relax + \begingroup + \catcode`\|=0 % + \@makeother\\% + |@firstofone{|endgroup + |def|Hy@pstringdef#1#2{% + |edef#1{#2}% + |@onelevel@sanitize#1% + |edef#1{|expandafter|Hy@ExchangeBackslash#1\|@nil}% + |edef#1{|expandafter|Hy@ExchangeLeftParenthesis#1(|@nil}% + |edef#1{|expandafter|Hy@ExchangeRightParenthesis#1)|@nil}% + }% + |def|Hy@ExchangeBackslash#1\#2|@nil{% + #1% + |ifx|\#2|\% + |else + \\% + |Hy@ReturnAfterFi{% + |Hy@ExchangeBackslash#2|@nil + }% + |fi + }% + } + \def\Hy@ExchangeLeftParenthesis#1(#2\@nil{% + #1% + \ifx\\#2\\% + \else + \@backslashchar(% + \Hy@ReturnAfterFi{% + \Hy@ExchangeLeftParenthesis#2\@nil + }% + \fi + } + \def\Hy@ExchangeRightParenthesis#1)#2\@nil{% + #1% + \ifx\\#2\\% + \else + \@backslashchar)% + \Hy@ReturnAfterFi{% + \Hy@ExchangeRightParenthesis#2\@nil + }% + \fi + } +\else + \def\Hy@pstringdef#1#2{% + \edef#1{\pdfescapestring{#2}}% + }% +\fi \providecommand\wwwbrowser{c:\string\netscape\string\netscape} \def\hyper@anchor#1{% \Hy@SaveLastskip @@ -67,7 +115,7 @@ \special{mark: #1}% \endgroup \Hy@activeanchortrue - \Hy@colorlink{\@anchorcolor}\anchor@spot\Hy@endcolorlink + \Hy@colorlink\@anchorcolor\anchor@spot\Hy@endcolorlink \Hy@activeanchorfalse \Hy@RestoreLastskip } @@ -81,7 +129,7 @@ \Hy@RestoreLastskip } \def\hyper@linkstart#1#2{% - \Hy@colorlink{\csname @#1color\endcsname}% + \expandafter\Hy@colorlink\csname @#1color\endcsname \special{button: 10000000 \number\baselineskip\space @@ -102,7 +150,7 @@ \number\ht\@tempboxa\space #2% }% - \Hy@colorlink{\csname @#1color\endcsname}#3% + \expandafter\Hy@colorlink\csname @#1color\endcsname#3% \Hy@endcolorlink }% \@linkdim\ht\@tempboxa @@ -114,7 +162,7 @@ \number\ht\@tempboxa\space #2% }% - \Hy@colorlink{\csname @#1color\endcsname}#3\Hy@endcolorlink + \exandafter\Hy@colorlink\csname @#1color\endcsname#3\Hy@endcolorlink \fi } \def\hyper@linkurl#1#2{% @@ -131,7 +179,7 @@ launch: \wwwbrowser\space #2% }% - \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink + \Hy@colorlink\@urlcolor#1\Hy@endcolorlink }% \@linkdim\ht\@tempboxa \advance\@linkdim by -6.5\p@ @@ -143,7 +191,7 @@ launch: \wwwbrowser\space #2% }% - \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink + \Hy@colorlink\@urlcolor#1\Hy@endcolorlink \fi \endgroup } @@ -161,7 +209,7 @@ #3, file: #2% }% - \Hy@colorlink{\@filecolor}#1\Hy@endcolorlink + \Hy@colorlink\@filecolor#1\Hy@endcolorlink }% \@linkdim\ht\@tempboxa \advance\@linkdim by -6.5\p@ @@ -173,23 +221,38 @@ #3, file: #2 }% - \Hy@colorlink{\@filecolor}#1\Hy@endcolorlink + \Hy@colorlink\@filecolor#1\Hy@endcolorlink \fi \endgroup } -\def\@pdfproducer{dviwindo + Distiller} +\ifx\@pdfproducer\relax + \def\@pdfproducer{dviwindo + Distiller} +\fi \def\PDF@FinishDoc{% \Hy@UseMaketitleInfos \special{PDF: Keywords \@pdfkeywords}% \special{PDF: Title \@pdftitle}% \special{PDF: Creator \@pdfcreator}% + \ifx\@pdfcreationdate\@empty + \else + \special{PDF: CreationDate \@pdfcreationdate}% + \fi + \ifx\@pdfmoddate\@empty + \else + \special{PDF: ModDate \@pdfmoddate}% + \fi \special{PDF: Author \@pdfauthor}% - \special{PDF: Producer \@pdfproducer}% + \ifx\@pdfproducer\relax + \else + \special{PDF: Producer \@pdfproducer}% + \fi \special{PDF: Subject \@pdfsubject}% \Hy@DisableOption{pdfauthor}% \Hy@DisableOption{pdftitle}% \Hy@DisableOption{pdfsubject}% \Hy@DisableOption{pdfcreator}% + \Hy@DisableOption{pdfcreationdate}% + \Hy@disableOption{pdfmoddate}% \Hy@DisableOption{pdfproducer}% \Hy@DisableOption{pdfkeywords}% } @@ -269,12 +332,16 @@ }% \endgroup } +\newif\ifHy@pdfmarkerror \def\pdfmark{\@ifnextchar[{\pdfmark@}{\pdfmark@[]}} \def\pdfmark@[#1]#2{% - \edef\@processme{\noexpand\pdf@toks={\the\pdf@defaulttoks}}% - \@processme - \let\pdf@type\relax - \setkeys{PDF}{#2}% + \Hy@pdfmarkerrorfalse + \edef\@processme{\noexpand\pdf@toks={\the\pdf@defaulttoks}}% + \@processme + \let\pdf@type\relax + \setkeys{PDF}{#2}% + \ifHy@pdfmarkerror + \else \ifx\pdf@type\relax \Hy@WarningNoLine{no pdfmark type specified in #2!!}% \ifx\\#1\\\relax\else\pdf@rect{#1}\fi @@ -282,27 +349,41 @@ \ifx\\#1\\\relax \literalps@out{[\the\pdf@toks\space\pdf@type\space pdfmark}% \else - \Hy@colorlink{\@ifundefined{@\pdf@linktype color}% - {\@linkcolor}% - {\csname @\pdf@linktype color\endcsname}}% + \@ifundefined{@\pdf@linktype color}{% + \Hy@colorlink\@linkcolor + }{% + \expandafter\Hy@colorlink + \csname @\pdf@linktype color\endcsname + }% \pdf@rect{#1}% \literalps@out{[\the\pdf@toks\space\pdf@type\space pdfmark}% \Hy@endcolorlink \fi \fi + \fi } \newsavebox{\pdf@box} +\providecommand{\Hy@setouterhbox}{\sbox} +\providecommand{\Hy@breaklinksunhbox}{\unhbox} \def\pdf@rect#1{% \leavevmode - \sbox\pdf@box{#1}% + \ifHy@breaklinks + \Hy@setouterhbox\pdf@box{#1}% + \else + \sbox\pdf@box{#1}% + \fi \dimen@\ht\pdf@box - \leavevmode \ifdim\dp\pdf@box=\z@ \literalps@out{H.S}% \else \lower\dp\pdf@box\hbox{\literalps@out{H.S}}% \fi - \ifHy@breaklinks\unhbox\else\box\fi\pdf@box + \ifHy@breaklinks + \expandafter\Hy@breaklinksunhbox + \else + \expandafter\box + \fi + \pdf@box \ifdim\dimen@=\z@ \literalps@out{H.R}% \else @@ -329,7 +410,20 @@ \def\pdf@linktype{link} \define@key{PDF}{Raw}{\pdf@addtoksx{#1}} \define@key{PDF}{Action}{\pdf@addtoks{#1}{Action}} -\define@key{PDF}{Border}{\pdf@addtoks{[#1]}{Border}} +\define@key{PDF}{Border}{% + \edef\Hy@temp{#1}% + \ifx\Hy@temp\@empty + \else + \pdf@addtoks{[#1]}{Border}% + \fi +} +\define@key{PDF}{BorderStyle}{% + \edef\Hy@temp{#1}% + \ifx\Hy@temp\@empty + \else + \pdf@addtoks{<<#1>>}{BS}% + \fi +} \define@key{PDF}{Color}{\pdf@addtoks{[#1]}{Color}} \define@key{PDF}{Contents}{\pdf@addtoks{(#1)}{Contents}} \define@key{PDF}{Count}{\pdf@addtoks{#1}{Count}} @@ -337,16 +431,22 @@ \define@key{PDF}{DOSFile}{\pdf@addtoks{(#1)}{DOSFile}} \define@key{PDF}{DataSource}{\pdf@addtoks{(#1)}{DataSource}} \define@key{PDF}{Dest}{% - \begingroup - \edef\x{#1}% - \expandafter\endgroup - \ifx\x\@empty\else\pdf@addtoks{(#1) cvn}{Dest}\fi + \Hy@pstringdef\Hy@pstringDest{#1}% + \ifx\Hy@pstringDest\@empty + \Hy@pdfmarkerrortrue + \Hy@Warning{Destination with empty name ignored}% + \else + \pdf@addtoks{(\Hy@pstringDest) cvn}{Dest}% + \fi } \define@key{PDF}{DestAnchor}{% - \begingroup - \edef\x{#1}% - \expandafter\endgroup - \ifx\x\@empty\else\pdf@addtoks{(#1) cvn}{Dest}\fi + \Hy@pstringdef\Hy@pstringDest{#1}% + \ifx\Hy@pstringDest\@empty + \Hy@pdfmarkerrortrue + \Hy@Warning{Destination with empty name ignored}% + \else + \pdf@addtoks{(\Hy@pstringDest) cvn}{Dest}% + \fi } \define@key{PDF}{Dir}{\pdf@addtoks{(#1)}{Dir}} \define@key{PDF}{File}{\pdf@addtoks{(#1)}{File}} @@ -369,8 +469,9 @@ \define@key{PDF}{View}{\pdf@addtoks{[#1]}{View}} \define@key{PDF}{WinFile}{\pdf@addtoks{(#1)}{WinFile}} \define@key{PDF}{Author}{\pdf@addtoks{(#1)}{Author}} -\define@key{PDF}{CreationDate}{\pdf@addtoks{(#1)}{CreationDate}} \define@key{PDF}{Creator}{\pdf@addtoks{(#1)}{Creator}} +\define@key{PDF}{CreationDate}{\pdf@addtoks{(#1)}{CreationDate}} +\define@key{PDF}{ModDate}{\pdf@addtoks{(#1)}{ModDate}} \define@key{PDF}{Producer}{\pdf@addtoks{(#1)}{Producer}} \define@key{PDF}{Subject}{\pdf@addtoks{(#1)}{Subject}} \define@key{PDF}{Keywords}{\pdf@addtoks{(#1)}{Keywords}} |