summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-02-25 23:34:35 +0000
committerKarl Berry <karl@freefriends.org>2007-02-25 23:34:35 +0000
commit4a0068129d6635fb71e1d030ac322a3ab55c45e1 (patch)
treedb1111fa73bc46d164667d86a57e7f4bdde16a5b /Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
parent31589ad96e2e5acc5f1d7e6bdaa92e4d56365497 (diff)
oberdiek
git-svn-id: svn://tug.org/texlive/trunk@3989 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/bookmark.sty')
-rw-r--r--Master/texmf-dist/tex/latex/oberdiek/bookmark.sty69
1 files changed, 38 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty b/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
index 758cb6a6134..cbf01370757 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
@@ -30,25 +30,29 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bookmark}%
- [2007/02/20 v0.2 PDF bookmarks (HO)]
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdfescapehex\endcsname\relax
- \PackageWarningNoLine{bookmark}{%
- Some features of pdfTeX 1.30 are missing that\MessageBreak
- protect some arguments. Replacements for these\MessageBreak
- features are not implemented. Thus the pdf file\MessageBreak
- can become invalid or the .aux file breaks%
- }%
- \let\BKM@escapename\@firstofone
- \let\BKM@escapestring\@firstofone
- \let\BKM@escapehex\@firstofone
- \let\BKM@unescapehex\@firstofone
-\else
- \let\BKM@escapename\pdfescapename
- \let\BKM@escapestring\pdfescapestring
- \let\BKM@escapehex\pdfescapehex
- \let\BKM@unescapehex\pdfunescapehex
-\fi
+ [2007/02/22 v0.4 PDF bookmarks (HO)]
+\RequirePackage{pdfescape}%
+\def\BKM@EscapeName#1{%
+ \ifx#1\@empty
+ \else
+ \EdefEscapeName#1#1%
+ \fi
+}%
+\def\BKM@EscapeString#1{%
+ \ifx#1\@empty
+ \else
+ \EdefEscapeString#1#1%
+ \fi
+}%
+\def\BKM@EscapeHex#1{%
+ \ifx#1\@empty
+ \else
+ \EdefEscapeHex#1#1%
+ \fi
+}%
+\def\BKM@UnescapeHex#1{%
+ \EdefUnescapeHex#1#1%
+}%
\RequirePackage{ifpdf}
\RequirePackage{ifxetex}
\RequirePackage{hyperref}
@@ -368,18 +372,21 @@
\renewcommand*{\Hy@writebookmark}[5]{%
\ifnum#4>\Hy@bookmarksdepth\relax
\else
- \begingroup
- \ifHy@bookmarksnumbered
- \let\numberline\Hy@numberline
- \let\partnumberline\Hy@numberline
- \let\chapternumberline\Hy@numberline
- \else
- \let\numberline\@gobble
- \let\partnumberline\@gobble
- \let\chapternumberline\@gobble
- \fi
- \bookmark[level=#4,dest={#3}]{#2}%
- \endgroup
+ \def\BKM@type{#5}%
+ \ifx\BKM@type\Hy@bookmarkstype
+ \begingroup
+ \ifHy@bookmarksnumbered
+ \let\numberline\Hy@numberline
+ \let\partnumberline\Hy@numberline
+ \let\chapternumberline\Hy@numberline
+ \else
+ \let\numberline\@gobble
+ \let\partnumberline\@gobble
+ \let\chapternumberline\@gobble
+ \fi
+ \bookmark[level=#4,dest={#3}]{#2}%
+ \endgroup
+ \fi
\fi
}
\let\ReadBookmarks\relax