summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-03 23:05:33 +0000
committerKarl Berry <karl@freefriends.org>2010-04-03 23:05:33 +0000
commit90a0248cdfcfb319a340ecb87aad0d24aae44687 (patch)
treee29c83cfd4269be4dcce559e2b936abe2ba531ce /Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
parent4ca6e289a7da2f6e65dcc4591bab0800af7f6891 (diff)
oberdiek update (2apr10)
git-svn-id: svn://tug.org/texlive/trunk@17668 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.sty138
1 files changed, 120 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty b/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
index fd585bb8775..a65704d9cc3 100644
--- a/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
+++ b/Master/texmf-dist/tex/latex/oberdiek/bookmark.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2007-2009 by
+%% Copyright (C) 2007-2010 by
%% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%%
%% This work may be distributed and/or modified under the
@@ -34,7 +34,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bookmark}%
- [2009/12/17 v1.8 PDF bookmarks (HO)]%
+ [2010/04/03 v1.10 PDF bookmarks (HO)]%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname numexpr\endcsname\relax
\def\BKM@CalcExpr#1#2#3#4{%
@@ -83,6 +83,7 @@
\RequirePackage{kvoptions}[2009/08/13]
\RequirePackage{hycolor}[2008/09/08]
\RequirePackage{bitset}
+\RequirePackage{ltxcmds}[2010/03/01]
\SetupKeyvalOptions{family=BKM,prefix=BKM@}
\DeclareLocalOptions{%
atend,%
@@ -106,15 +107,25 @@
view,%
}
\newcommand*{\bookmarksetup}{\setkeys{BKM}}
+\def\BKM@setup#1{%
+ \bookmarksetup{#1}%
+ \BKM@hook
+ \ifBKM@keeplevel
+ \else
+ \xdef\BKM@currentlevel{\BKM@level}%
+ \fi
+}
\DeclareBoolOption[\ifHy@bookmarksopen true\else false\fi]{open}
+\def\bookmark@open{%
+ \ifBKM@open\ltx@one\else\ltx@zero\fi
+}
\DeclareStringOption[\maxdimen]{openlevel}
\edef\BKM@openlevel{\number\@bookmarksopenlevel}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname Hy@bookmarksdepth\endcsname\relax
+\ltx@IfUndefined{Hy@bookmarksdepth}{%
\def\BKM@depth{\c@tocdepth}%
-\else
+}{%
\let\BKM@depth\Hy@bookmarksdepth
-\fi
+}
\define@key{BKM}{depth}[]{%
\edef\BKM@param{#1}%
\ifx\BKM@param\@empty
@@ -141,6 +152,7 @@
}%
\fi
}
+\def\bookmark@depth{\BKM@depth}
\def\BKM@SetDepth#1{%
\begingroup
\setbox\z@=\hbox{%
@@ -156,6 +168,7 @@
\define@key{BKM}{rellevel}{%
\BKM@CalcExpr\BKM@level{#1}+\BKM@currentlevel
}
+\def\bookmark@level{\BKM@level}
\def\BKM@currentlevel{0}
\DeclareBoolOption[%
\ifHy@bookmarksnumbered true\else false\fi
@@ -172,6 +185,9 @@
\g@addto@macro\Hy@bookmarksnumberedfalse{%
\let\ifBKM@numbered\iffalse
}
+\def\bookmark@numbered{%
+ \ifBKM@numbered\ltx@one\else\ltx@zero\fi
+}
\def\BKM@PatchHyperrefOption#1{%
\expandafter\BKM@@PatchHyperrefOption\csname KV@Hyp@#1\endcsname%
}
@@ -187,33 +203,46 @@
\BKM@PatchHyperrefOption{bookmarksopen}{open}
\BKM@PatchHyperrefOption{bookmarksopenlevel}{openlevel}
\BKM@PatchHyperrefOption{bookmarksdepth}{depth}
-\bitsetReset{BKM@style}%
+\bitsetReset{BKM@FontStyle}%
\define@key{BKM}{italic}[true]{%
\expandafter\ifx\csname if#1\endcsname\iftrue
- \bitsetSet{BKM@style}{0}%
+ \bitsetSet{BKM@FontStyle}{0}%
\else
- \bitsetClear{BKM@style}{0}%
+ \bitsetClear{BKM@FontStyle}{0}%
\fi
}%
\define@key{BKM}{bold}[true]{%
\expandafter\ifx\csname if#1\endcsname\iftrue
- \bitsetSet{BKM@style}{1}%
+ \bitsetSet{BKM@FontStyle}{1}%
\else
- \bitsetClear{BKM@style}{1}%
+ \bitsetClear{BKM@FontStyle}{1}%
\fi
}%
+\def\bookmark@italic{%
+ \ifnum\bitsetGet{BKM@FontStyle}{0}=1 \ltx@one\else\ltx@zero\fi
+}
+\def\bookmark@bold{%
+ \ifnum\bitsetGet{BKM@FontStyle}{1}=1 \ltx@one\else\ltx@zero\fi
+}
\def\BKM@PrintStyle{%
- \bitsetGetDec{BKM@style}%
+ \bitsetGetDec{BKM@FontStyle}%
}%
\define@key{BKM}{color}{%
\HyColor@BookmarkColor{#1}\BKM@color{bookmark}{color}%
}
\let\BKM@color\@empty
-\DeclareStringOption{dest}
-\DeclareStringOption{named}
-\DeclareStringOption{uri}
-\DeclareStringOption{gotor}
-\DeclareStringOption{rawaction}
+\def\bookmark@color{\BKM@color}
+\def\BKM@temp#1{%
+ \DeclareStringOption{#1}%
+ \expandafter\edef\csname BKM@#1\endcsname{%
+ \expandafter\noexpand\csname bookmark@#1\endcsname
+ }%
+}
+\BKM@temp{dest}
+\BKM@temp{named}
+\BKM@temp{uri}
+\BKM@temp{gotor}
+\BKM@temp{rawaction}
\define@key{BKM}{page}{%
\def\BKM@page{#1}%
\ifx\BKM@page\@empty
@@ -227,10 +256,12 @@
\fi
}
\let\BKM@page\@empty
+\def\bookmark@page{\BKM@@page}
\define@key{BKM}{view}{%
\BKM@CheckView{#1}%
}
\let\BKM@view\@empty
+\def\bookmark@view{\BKM@view}
\def\BKM@CheckView#1{%
\BKM@CheckViewType#1 \@nil
}
@@ -258,7 +289,7 @@
\BKM@CheckXYZ{#2}{ }%
}%
\@car{%
- \PackageError{pdfbookmark}{%
+ \PackageError{bookmark}{%
Unknown view type `\BKM@type',\MessageBreak
using `FitH' instead%
}\@ehc
@@ -390,6 +421,76 @@
\def\BKM@DisableOptions{%
\DisableKeyvalOption{BKM}{atend}%
}
+\newcommand*{\bookmarkdefinestyle}[2]{%
+ \@ifundefined{BKM@style@#1}{%
+ }{%
+ \PackageInfo{bookmark}{Redefining style `#1'}%
+ }%
+ \@namedef{BKM@style@#1}{#2}%
+}
+\define@key{BKM}{style}{%
+ \BKM@StyleCall{#1}%
+}
+\newif\ifBKM@ok
+\def\BKM@StyleCall#1{%
+ \@ifundefined{BKM@style@#1}{%
+ \PackageError{bookmark}{%
+ Undefined style `#1'%
+ }\@ehc
+ }{%
+ \BKM@oktrue
+ \edef\BKM@StyleCurrent{#1}%
+ \@onelevel@sanitize\BKM@StyleCurrent
+ \let\BKM@StyleEntry\BKM@StyleEntryCheck
+ \BKM@StyleStack
+ \ifBKM@ok
+ \expandafter\@firstofone
+ \else
+ \PackageError{bookmark}{%
+ Ignoring recursive call of style `\BKM@StyleCurrent'%
+ }\@ehc
+ \expandafter\@gobble
+ \fi
+ {%
+ \let\BKM@StyleEntry\relax
+ \edef\BKM@StyleStack{%
+ \BKM@StyleEntry{\BKM@StyleCurrent}%
+ \BKM@StyleStack
+ }%
+ \expandafter\expandafter\expandafter\bookmarksetup
+ \expandafter\expandafter\expandafter{%
+ \csname BKM@style@\BKM@StyleCurrent\endcsname
+ }%
+ \BKM@StyleStackPop
+ }%
+ }%
+}
+\def\BKM@StyleStackPop{%
+ \let\BKM@StyleEntry\relax
+ \edef\BKM@StyleStack{%
+ \expandafter\@gobbletwo\BKM@StyleStack
+ }%
+}
+\def\BKM@StyleEntryCheck#1{%
+ \def\BKM@temp{#1}%
+ \ifx\BKM@temp\BKM@StyleCurrent
+ \BKM@okfalse
+ \fi
+}
+\def\BKM@StyleStack{}
+\def\BKM@hook{}
+\define@key{BKM}{addtohook}{%
+ \ltx@LocalAppendToMacro\BKM@hook{#1}%
+}
+\newcommand*{\bookmarkget}[1]{%
+ \romannumeral0%
+ \ltx@ifundefined{bookmark@#1}{%
+ \ltx@space
+ }{%
+ \expandafter\expandafter\expandafter\ltx@space
+ \csname bookmark@#1\endcsname
+ }%
+}
\def\BKM@DefineDriverKey#1{%
\define@key{BKM}{#1}[]{%
\def\BKM@driver{#1}%
@@ -417,6 +518,7 @@
\g@addto@macro\BKM@DisableOptions{%
\DisableKeyvalOption{BKM}{dvipdfmx-outline-open}%
}
+\def\bookmark@driver{\BKM@driver}
\InputIfFileExists{bookmark.cfg}{}{}
\providecommand*{\BookmarkDriverDefault}{dvips}
\ifpdf