diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def | 80 |
1 files changed, 39 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def b/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def index 1de078f8033..a10ac2f354d 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def +++ b/Master/texmf-dist/tex/latex/oberdiek/bkm-dvips.def @@ -30,7 +30,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvips.def}% - [2007/02/20 v0.2 bookmark driver for dvips (HO)] + [2007/02/22 v0.4 bookmark driver for dvips (HO)] \def\BKM@filename{\jobname.out.ps} \special{header=\BKM@filename} \AtEndDocument{\BKM@dvips@out} @@ -53,7 +53,8 @@ \def\BKM@DO@entry#1#2{% \begingroup \setkeys{BKM@DO}{#1}% - \edef\BKM@DO@title{\BKM@unescapehex{#2}}% + \def\BKM@DO@title{#2}% + \BKM@UnescapeHex\BKM@DO@title \expandafter\expandafter\expandafter\BKM@getx \csname BKM@\BKM@DO@id\endcsname\@empty\@empty \let\BKM@attr\@empty @@ -89,32 +90,38 @@ }% \fi \else + \BKM@UnescapeHex\BKM@DO@uri + \BKM@EscapeString\BKM@DO@uri \edef\BKM@action{% /Action<<% /Subtype/URI% - /URI(\BKM@escapestring{\BKM@unescapehex{\BKM@DO@uri}})% + /URI(\BKM@DO@uri)% >>% }% \fi \else + \BKM@UnescapeHex\BKM@DO@rawaction \edef\BKM@action{% /Action<<% - \BKM@unescapehex{\BKM@DO@rawaction}% + \BKM@DO@rawaction >>% }% \fi \else + \BKM@EscapeName\BKM@DO@named \edef\BKM@action{% /Action<<% /Subtype/Named% - /N/\BKM@escapename{\BKM@DO@named}% + /N/\BKM@DO@named >>% }% \fi \else + \BKM@UnescapeHex\BKM@DO@dest + \BKM@EscapeString\BKM@DO@dest \edef\BKM@action{% /Action/GoTo% - /Dest(\BKM@escapestring{\BKM@DO@dest})cvn% + /Dest(\BKM@DO@dest)cvn% }% \fi \else @@ -130,13 +137,17 @@ /View[/\BKM@DO@view]% }% \else + \BKM@UnescapeHex\BKM@DO@dest + \BKM@EscapeString\BKM@DO@dest \edef\BKM@action{% - /Dest(\BKM@escapestring{\BKM@DO@dest})cvn% + /Dest(\BKM@DO@dest)cvn% }% \fi + \BKM@UnescapeHex\BKM@DO@gotor + \BKM@EscapeString\BKM@DO@gotor \edef\BKM@action{% /Action/GoToR% - /F(\BKM@escapestring{\BKM@unescapehex{\BKM@DO@gotor}})% + /F(\BKM@DO@gotor)% \BKM@action }% \fi @@ -201,6 +212,11 @@ }% \pdfstringdef\BKM@title{#2}% \edef\BKM@FLAGS{\printflags{BKM@style}}% + \BKM@EscapeHex\BKM@dest + \BKM@EscapeHex\BKM@uri + \BKM@EscapeHex\BKM@gotor + \BKM@EscapeHex\BKM@rawaction + \BKM@EscapeHex\BKM@title \immediate\write\@mainaux{% \string\BKM@entry{% id=\number\BKM@id @@ -209,42 +225,18 @@ ,open% \fi \fi - \ifx\BKM@dest\@empty - \else - ,dest={\BKM@dest}% - \fi - \ifx\BKM@named\@empty - \else - ,named={\BKM@named}% - \fi - \ifx\BKM@uri\@empty - \else - ,uri={\BKM@escapehex{\BKM@uri}}% - \fi - \ifx\BKM@gotor\@empty - \else - ,gotor={\BKM@escapehex{\BKM@gotor}}% - \fi - \ifx\BKM@page\@empty - \else - ,page=\BKM@page - \fi - \ifx\BKM@view\@empty - \else - ,view={\BKM@view}% - \fi - \ifx\BKM@rawaction\@empty - \else - ,rawaction={\BKM@escapehex{\BKM@rawaction}}% - \fi + \BKM@auxentry{dest}% + \BKM@auxentry{named}% + \BKM@auxentry{uri}% + \BKM@auxentry{gotor}% + \BKM@auxentry{page}% + \BKM@auxentry{view}% + \BKM@auxentry{rawaction}% + \BKM@auxentry{color}% \ifnum\BKM@FLAGS>\z@ ,flags=\BKM@FLAGS \fi - \ifx\BKM@color\@empty - \else - ,color={\BKM@color}% - \fi - }{\BKM@escapehex{\BKM@title}}% + }{\BKM@title}% }% \endgroup \fi @@ -254,6 +246,12 @@ \def\BKM@x@level{#2}% \def\BKM@x@childs{#3}% } +\def\BKM@auxentry#1{% + \expandafter\ifx\csname BKM@#1\endcsname\@empty + \else + ,#1={\csname BKM@#1\endcsname}% + \fi +} \SetupKeyvalOptions{family=BKM@DO,prefix=BKM@DO@} \DeclareStringOption[0]{id} \DeclareBoolOption{open} |