diff options
author | Karl Berry <karl@freefriends.org> | 2007-03-07 18:06:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-03-07 18:06:13 +0000 |
commit | 985a9d981dc301403c0a79353e78499c3365a629 (patch) | |
tree | b220929a73b76bf5c6ab97117985a45bc2ec9d9b /Master/texmf-dist/source/latex/oberdiek | |
parent | 1c15eb0bc227a081215bf372a3756aadc4d19d09 (diff) |
oberdiek update: bookmark0.6, hypbmsec2.3 (5mar07)
git-svn-id: svn://tug.org/texlive/trunk@4010 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek')
4 files changed, 551 insertions, 63 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx index 379880c333a..4ce1a3dbe44 100644 --- a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx @@ -17,7 +17,8 @@ % This work consists of the main source file bookmark.dtx % and the derived files % bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, -% bkm-dvipdfm.def, bkm-dvips.def, bkm-pdftex.def, +% bkm-dvipdfm.def, bkm-dvips.def, bkm-dvipsone.def, +% bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, % bookmark-example.tex. % % Distribution: @@ -54,7 +55,10 @@ % TDS:tex/latex/oberdiek/bookmark.sty % TDS:tex/latex/oberdiek/bkm-dvipdfm.def % TDS:tex/latex/oberdiek/bkm-dvips.def +% TDS:tex/latex/oberdiek/bkm-dvipsone.def +% TDS:tex/latex/oberdiek/bkm-textures.def % TDS:tex/latex/oberdiek/bkm-pdftex.def +% TDS:tex/latex/oberdiek/bkm-vtex.def % TDS:doc/latex/oberdiek/bookmark.pdf % TDS:doc/latex/oberdiek/bookmark-example.tex % TDS:source/latex/oberdiek/bookmark.dtx @@ -72,7 +76,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: bookmark 2007/02/22 v0.4 PDF bookmarks (HO)} +\Msg{* Package: bookmark 2007/03/03 v0.6 PDF bookmarks (HO)} \Msg{************************************************************************} \keepsilent @@ -99,7 +103,8 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file bookmark.dtx and the derived files bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, - bkm-dvipdfm.def, bkm-dvips.def, bkm-pdftex.def, + bkm-dvipdfm.def, bkm-dvips.def, bkm-dvipsone.def, + bkm-textures.def, bkm-pdftex.def, bkm-vtex.def, bookmark-example.tex. \endpreamble @@ -110,8 +115,11 @@ and the derived files \usedir{tex/latex/oberdiek}% \file{bookmark.sty}{\from{bookmark.dtx}{package}}% \file{bkm-dvipdfm.def}{\from{bookmark.dtx}{dvipdfm}}% - \file{bkm-dvips.def}{\from{bookmark.dtx}{dvips}}% + \file{bkm-dvips.def}{\from{bookmark.dtx}{dvips,pdfmark}}% + \file{bkm-dvipsone.def}{\from{bookmark.dtx}{dvipsone,pdfmark}}% + \file{bkm-textures.def}{\from{bookmark.dtx}{textures,pdfmark}}% \file{bkm-pdftex.def}{\from{bookmark.dtx}{pdftex}}% + \file{bkm-vtex.def}{\from{bookmark.dtx}{vtex}}% \usedir{doc/latex/oberdiek}% \file{bookmark-example.tex}{\from{bookmark.dtx}{example}}% } @@ -123,7 +131,8 @@ and the derived files \Msg{* files into a directory searched by TeX:} \Msg{*} \Msg{* bookmark.sty, bkm-dvipdfm.def, bkm-dvips.def,} -\Msg{* bkm-pdftex.def} +\Msg{* bkm-dvipsone.def, bkm-textures.def, bkm-pdftex.def,} +\Msg{* bkm-vtex.def} \Msg{*} \Msg{* To produce the documentation run the file `bookmark.drv'} \Msg{* through LaTeX.} @@ -140,7 +149,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bookmark.drv}% - [2007/02/22 v0.4 PDF bookmarks (HO)] + [2007/03/03 v0.6 PDF bookmarks (HO)] \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -149,7 +158,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1336} +% \CheckSum{1846} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -170,7 +179,7 @@ and the derived files % \GetFileInfo{bookmark.drv} % % \title{The \xpackage{bookmark} package} -% \date{2007/02/22 v0.4} +% \date{2007/03/03 v0.6} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -212,6 +221,10 @@ and the derived files % names are keys (unique). % \end{itemize} % +% Note that this package is intended as experimentation platform +% for bookmark management. Feedback is welcome. Also the interfaces +% may change in future versions. +% % \subsection{Options} % % Options can be given at three places: @@ -228,8 +241,9 @@ and the derived files % \subsubsection{Driver options} % % Supported drivers are \xoption{pdftex}, \xoption{dvips}, -% and \xoption{dvipdfm} (\xoption{xetex}). -% The \TeX\ engines pdf\TeX\ and Xe\TeX\ are automatically detected. +% \xoption{dvipsone}, \xoption{textures}, +% \xoption{dvipdfm} (\xoption{xetex}), and \xoption{vtex}. +% The \TeX\ engines pdf\TeX, Xe\TeX, and V\TeX\ are automatically detected. % The default for the DVI drivers is \xoption{dvips}. This can % be changed in the configuration file \xfile{bookmark.cfg} by % \cs{BookmarkDefaultDriver}, e.g.: @@ -304,7 +318,7 @@ and the derived files % \end{tabular} % \end{quote} % -% \subsection{Level options} +% \subsubsection{Level options} % % The order of the bookmark entries are defined by the % appearance order of \cs{bookmark} commands. The tree structure @@ -377,6 +391,7 @@ and the derived files % \xoption{bookmarksdepth} & \xoption{depth}\\ % \xoption{bookmarksopen} & \xoption{open}\\ % \xoption{bookmarksopenlevel} & \xoption{openlevel}\\ +% \xoption{bookmarksnumbered} & \xoption{numbered}\\ % \end{tabular} % \end{quote} % @@ -391,8 +406,10 @@ and the derived files % \subsection{Limitations/ToDos} % % \begin{itemize} -% \item Support for missing drivers (V\TeX, \dots). +% \item Support for missing driver (vtexpdfmark). % \item Support for missing actions (Launch, \dots). +% \item Better design for \xpackage{hyperref}'s option +% \xoption{bookmarkstype}. % \item Adding bookmarks at the end of the document % is difficult for \xoption{dvipdfm}, because the \cs{special} % must go into a page. The problem can be solved by two runs @@ -431,6 +448,7 @@ and the derived files \end{figure} \subsection{Subsection B} \subsubsection{Subsubsection C} +\subsection{Umlauts: \"A\"O\"U\"a\"o\"u\ss} \newpage \bookmarksetup{ bold, @@ -509,7 +527,7 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bookmark}% - [2007/02/22 v0.4 PDF bookmarks (HO)] + [2007/03/03 v0.6 PDF bookmarks (HO)] % \end{macrocode} % % \subsubsection{Requirements} @@ -544,6 +562,7 @@ and the derived files % \begin{macrocode} \RequirePackage{ifpdf} \RequirePackage{ifxetex} +\RequirePackage{ifvtex} \RequirePackage{hyperref} \RequirePackage{auxhook} \RequirePackage{flags} @@ -555,9 +574,51 @@ and the derived files % \begin{macrocode} \SetupKeyvalOptions{family=BKM,prefix=BKM@} \newcommand*{\bookmarksetup}{\setkeys{BKM}} -\DeclareBoolOption{open} +\DeclareBoolOption[\ifHy@bookmarksopen true\else false\fi]{open} \DeclareStringOption[\maxdimen]{openlevel} -\DeclareStringOption[\c@tocdepth]{depth} +\edef\BKM@openlevel{\number\@bookmarksopenlevel} +%\DeclareStringOption[\c@tocdepth]{depth} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname Hy@bookmarksdepth\endcsname\relax + \def\BKM@depth{\c@tocdepth}% +\else + \let\BKM@depth\Hy@bookmarksdepth +\fi +\define@key{BKM}{depth}[]{% + \edef\BKM@param{#1}% + \ifx\BKM@param\@empty + \def\BKM@depth{\c@tocdepth}% + \else + \@ifundefined{toclevel@\BKM@param}{% + \@onelevel@sanitize\BKM@param + \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% + \ifcase 0\expandafter\ifx\BKM@temp-1\fi + \expandafter\ifnum\expandafter`\BKM@temp>47 % + \expandafter\ifnum\expandafter`\BKM@temp<58 % + 1% + \fi + \fi + \relax + \PackageWarning{bookmark}{% + Unknown document division name (\BKM@param)% + }% + \else + \BKM@SetDepth\BKM@param + \fi + }{% + \BKM@SetDepth{\csname toclevel@\BKM@param\endcsname}% + }% + \fi +} +\def\BKM@SetDepth#1{% + \begingroup + \setbox\z@=\hbox{% + \count@=#1\relax + \expandafter + }% + \expandafter\endgroup + \expandafter\def\expandafter\BKM@depth\expandafter{\the\count@}% +} \DeclareStringOption[\BKM@currentlevel]{level}[\BKM@currentlevel] \DeclareBoolOption{keeplevel} \DeclareBoolOption{startatroot} @@ -566,6 +627,45 @@ and the derived files } \def\BKM@currentlevel{0} % \end{macrocode} +% Make \xpackage{bookmark}'s option \xoption{numbered} an alias +% for \xpackage{hyperref}'s \xoption{bookmarksnumbered}. +% \begin{macrocode} +\DeclareBoolOption[% + \ifHy@bookmarksnumbered true\else false\fi +]{numbered} +\g@addto@macro\BKM@numberedtrue{% + \let\ifHy@bookmarksnumbered\iftrue +} +\g@addto@macro\BKM@numberedfalse{% + \let\ifHy@bookmarksnumbered\iffalse +} +\g@addto@macro\Hy@bookmarksnumberedtrue{% + \let\ifBKM@numbered\iftrue +} +\g@addto@macro\Hy@bookmarksnumberedfalse{% + \let\ifBKM@numbered\iffalse +} +% \end{macrocode} +% +% \paragraph{Redefinitions \xpackage{hyperref}'s options} +% +% \begin{macrocode} +\def\BKM@PatchHyperrefOption#1{% + \expandafter\BKM@@PatchHyperrefOption\csname KV@Hyp@#1\endcsname% +} +\def\BKM@@PatchHyperrefOption#1{% + \expandafter\BKM@@@PatchHyperrefOption#1{##1}\BKM@nil#1% +} +\def\BKM@@@PatchHyperrefOption#1\BKM@nil#2#3{% + \def#2##1{% + #1% + \bookmarksetup{#3={##1}}% + }% +} +\BKM@PatchHyperrefOption{bookmarksopen}{open} +\BKM@PatchHyperrefOption{bookmarksopenlevel}{openlevel} +\BKM@PatchHyperrefOption{bookmarksdepth}{depth} +% \end{macrocode} % % \paragraph{Style options.} % @@ -607,7 +707,9 @@ and the derived files \csname @safe@activestrue\endcsname \XC@bordercolor{}{#1}% \expandafter\endgroup - \expandafter\def\expandafter\BKM@color\expandafter{\@bordercolor}% + \expandafter\def\expandafter\BKM@color\expandafter{% + \@bordercolor + }% }% \fi } @@ -809,21 +911,22 @@ and the derived files % \paragraph{Driver detection.} % % \begin{macrocode} -\define@key{BKM}{pdftex}[]{% - \def\BKM@driver{pdftex}% -} -\define@key{BKM}{dvips}[]{% - \def\BKM@driver{dvips}% -} -\define@key{BKM}{dvipdfm}[]{% - \def\BKM@driver{dvipdfm}% -} -\define@key{BKM}{dvipdfmx}[]{% - \def\BKM@driver{dvipdfm}% -} -\define@key{BKM}{xetex}[]{% - \def\BKM@driver{dvipdfm}% +\def\BKM@DefineDriverKey#1{% + \define@key{BKM}{#1}[]{% + \def\BKM@driver{#1}% + }% + \g@addto@macro\BKM@DisableDriverOptions{% + \DisableKeyvalOption{BKM}{#1}% + }% } +\let\BKM@DisableDriverOptions\@empty +\BKM@DefineDriverKey{pdftex} +\BKM@DefineDriverKey{dvips} +\BKM@DefineDriverKey{dvipsone} +\BKM@DefineDriverKey{textures} +\BKM@DefineDriverKey{dvipdfm} +\BKM@DefineDriverKey{xetex} +\BKM@DefineDriverKey{vtex} \InputIfFileExists{bookmark.cfg}{}{} \providecommand*{\BookmarkDriverDefault}{dvips} \ifpdf @@ -832,7 +935,11 @@ and the derived files \ifxetex \def\BKM@driver{dvipdfm}% \else - \let\BKM@driver\BookmarkDriverDefault + \ifvtex + \def\BKM@driver{vtex}% + \else + \let\BKM@driver\BookmarkDriverDefault + \fi \fi \fi % \end{macrocode} @@ -841,11 +948,7 @@ and the derived files % % \begin{macrocode} \ProcessKeyvalOptions* -\DisableKeyvalOption{BKM}{pdftex} -\DisableKeyvalOption{BKM}{dvips} -\DisableKeyvalOption{BKM}{dvipdfm} -\DisableKeyvalOption{BKM}{dvipdfmx} -\DisableKeyvalOption{BKM}{xetex} +\BKM@DisableDriverOptions % \end{macrocode} % % \paragraph{Driver validation and loading.} @@ -878,6 +981,26 @@ and the derived files }% \let\BKM@driver\BKM@temp \fi + \else + \def\BKM@temp{vtex}% + \ifvtex + \ifx\BKM@temp\BKM@driver + \else + \PackageWarningNoLine{bookmark}{% + Wrong driver `\BKM@driver',\MessageBreak + using `vtex' for VTeX instead% + }% + \let\BKM@driver\BKM@temp + \fi + \else + \ifx\BKM@temp\BKM@driver + \PackageError{bookmark}{% + Wrong driver, VTeX is not running in PDF mode.\MessageBreak + Package loading is aborted% + }\@ehc + \expandafter\expandafter\expandafter\endinput + \fi + \fi \fi \fi \InputIfFileExists{bkm-\BKM@driver.def}{}{% @@ -914,12 +1037,12 @@ and the derived files % section number, text, label, level, file % \begin{macrocode} \renewcommand*{\Hy@writebookmark}[5]{% - \ifnum#4>\Hy@bookmarksdepth\relax + \ifnum#4>\BKM@depth\relax \else \def\BKM@type{#5}% \ifx\BKM@type\Hy@bookmarkstype \begingroup - \ifHy@bookmarksnumbered + \ifBKM@numbered \let\numberline\Hy@numberline \let\partnumberline\Hy@numberline \let\chapternumberline\Hy@numberline @@ -949,7 +1072,7 @@ and the derived files %<*dvipdfm> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvipdfm.def}% - [2007/02/22 v0.4 bookmark driver for dvipdfm (HO)] + [2007/03/03 v0.6 bookmark driver for dvipdfm (HO)] % \end{macrocode} % % \begin{macrocode} @@ -1096,13 +1219,298 @@ and the derived files %</dvipdfm> % \end{macrocode} % +% \subsection{Driver for V\TeX} +% +% \begin{macrocode} +%<*vtex> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-vtex.def}% + [2007/03/03 v0.6 bookmark driver for VTeX (HO)] +% \end{macrocode} +% +% \begin{macrocode} +\ifvtexpdf +\else + \PackageWarningNoLine{bookmark}{% + The VTeX driver only supports PDF mode% + }% +\fi +% \end{macrocode} +% +% \begin{macrocode} +\newcount\BKM@id +\BKM@id=\z@ +% \end{macrocode} +% +% \begin{macrocode} +\def\BKM@0{00} +% \end{macrocode} +% \begin{macrocode} +\newif\ifBKM@sw +% \end{macrocode} +% +% \begin{macrocode} +\newcommand*{\bookmark}[2][]{% + \if@filesw + \begingroup + \bookmarksetup{#1}% + \ifBKM@keeplevel + \else + \xdef\BKM@currentlevel{\BKM@level}% + \fi + \edef\BKM@prev{\the\BKM@id}% + \global\advance\BKM@id\@ne + \BKM@swtrue + \@whilesw\ifBKM@sw\fi{% + \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ + \global\BKM@startatrootfalse + \def\BKM@parent{0}% + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + 0{\BKM@level}% + }% + \BKM@swfalse + \else + \expandafter\expandafter\expandafter\BKM@getx + \csname BKM@\BKM@prev\endcsname + \ifnum\BKM@level>\BKM@x@level\relax + \let\BKM@parent\BKM@prev + \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% + {\BKM@prev}{\BKM@level}% + }% + \BKM@swfalse + \else + \let\BKM@prev\BKM@x@parent + \fi + \fi + }% + \pdfstringdef\BKM@title{#2}% + \BKM@vtex@title + \edef\BKM@FLAGS{\printflags{BKM@style}}% + \let\BKM@action\@empty + \ifx\BKM@gotor\@empty + \ifx\BKM@dest\@empty + \ifx\BKM@named\@empty + \ifx\BKM@rawaction\@empty + \ifx\BKM@uri\@empty + \ifx\BKM@page\@empty + \PackageError{bookmark}{Missing action}\@ehc + \def\BKM@action{!1}% + \else + \edef\BKM@action{!\BKM@page}% + \fi + \else + \BKM@EscapeString\BKM@uri + \edef\BKM@action{% + <u=% + /S/URI% + /URI(\BKM@uri)% + >% + }% + \fi + \else + \edef\BKM@action{<u=\BKM@rawaction>}% + \fi + \else + \BKM@EscapeName\BKM@named + \edef\BKM@action{% + <u=% + /S/Named% + /N/\BKM@named + >% + }% + \fi + \else + \BKM@EscapeString\BKM@dest + \edef\BKM@action{\BKM@dest}% + \fi + \else + \ifx\BKM@dest\@empty + \ifx\BKM@page\@empty + \def\BKM@page{1}% + \fi + \ifx\BKM@view\@empty + \def\BKM@view{Fit}% + \fi + \edef\BKM@action{/D[\BKM@page/\BKM@view]}% + \else + \BKM@EscapeString\BKM@dest + \edef\BKM@action{/D(\BKM@dest)}% + \fi + \BKM@EscapeString\BKM@gotor + \edef\BKM@action{% + <u=% + /S/GoToR% + /F(\BKM@gotor)% + \BKM@action + >>% + }% + \fi + \ifx\BKM@color\@empty + \let\BKM@RGBcolor\@empty + \else + \expandafter\BKM@toRGB\BKM@color\@nil + \fi + \special{% + !outline \BKM@action;% + p=\BKM@parent,% + i=\number\BKM@id,% + s=% + \ifBKM@open + \ifnum\BKM@level<\BKM@openlevel + o% + \else + c% + \fi + \else + c% + \fi,% + \ifx\BKM@RGBcolor\@empty + \else + c=\BKM@RGBcolor,% + \fi + \ifnum\BKM@FLAGS>\z@ + f=\BKM@FLAGS,% + \fi + t=\BKM@title + }% + \endgroup + \fi +} +% \end{macrocode} +% \begin{macrocode} +\def\BKM@getx#1#2{% + \def\BKM@x@parent{#1}% + \def\BKM@x@level{#2}% +} +% \end{macrocode} +% \begin{macrocode} +\def\BKM@toRGB#1 #2 #3\@nil{% + \let\BKM@RGBcolor\@empty + \BKM@toRGBComponent{#1}% + \BKM@toRGBComponent{#2}% + \BKM@toRGBComponent{#3}% +} +\def\BKM@toRGBComponent#1{% + \dimen@=#1pt\relax + \ifdim\dimen@>\z@ + \ifdim\dimen@<\p@ + \dimen@=255\dimen@ + \advance\dimen@ by 32768sp\relax + \divide\dimen@ by 65536\relax + \dimen@ii=\dimen@ + \divide\dimen@ii by 16\relax + \edef\BKM@RGBcolor{% + \BKM@RGBcolor + \BKM@toHexDigit\dimen@ii + }% + \dimen@ii=16\dimen@ii + \advance\dimen@-\dimen@ii + \edef\BKM@RGBcolor{% + \BKM@RGBcolor + \BKM@toHexDigit\dimen@ + }% + \else + \edef\BKM@RGBcolor{\BKM@RGBcolor FF}% + \fi + \else + \edef\BKM@RGBcolor{\BKM@RGBcolor00}% + \fi +} +\def\BKM@toHexDigit#1{% + \expandafter\ifcase\expandafter\@firstofone\expandafter{\number#1} % + 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or + 8\or 9\or A\or B\or C\or D\or E\or F% + \fi +} +% \end{macrocode} +% \begin{macrocode} +\begingroup + \catcode`\|=0 % + \catcode`\\=12 % + |gdef|BKM@vtex@title{% + |@onelevel@sanitize|BKM@title + |edef|BKM@title{|expandafter|BKM@vtex@leftparen|BKM@title\(|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@rightparen|BKM@title\)|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@zero|BKM@title\0|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@one|BKM@title\1|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@two|BKM@title\2|@nil}% + |edef|BKM@title{|expandafter|BKM@vtex@three|BKM@title\3|@nil}% + }% + |gdef|BKM@vtex@leftparen#1\(#2|@nil{% + #1% + |ifx||#2||% + |else + (% + |@ReturnAfterFi{% + |BKM@vtex@leftparen#2|@nil + }% + |fi + }% + |gdef|BKM@vtex@rightparen#1\)#2|@nil{% + #1% + |ifx||#2||% + |else + )% + |@ReturnAfterFi{% + |BKM@vtex@rightparen#2|@nil + }% + |fi + }% + |gdef|BKM@vtex@zero#1\0#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char0% + |@ReturnAfterFi{% + |BKM@vtex@zero#2|@nil + }% + |fi + }% + |gdef|BKM@vtex@one#1\1#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char1% + |@ReturnAfterFi{% + |BKM@vtex@one#2|@nil + }% + |fi + }% + |gdef|BKM@vtex@two#1\2#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char2% + |@ReturnAfterFi{% + |BKM@vtex@two#2|@nil + }% + |fi + }% + |gdef|BKM@vtex@three#1\3#2|@nil{% + #1% + |ifx||#2||% + |else + |noexpand|hv@pdf@char3% + |@ReturnAfterFi{% + |BKM@vtex@three#2|@nil + }% + |fi + }% +|endgroup +\long\def\@ReturnafterFi#1\fi{\fi#1} +% \end{macrocode} +% +% \begin{macrocode} +%</vtex> +% \end{macrocode} +% % \subsection{Driver for \pdfTeX} % % \begin{macrocode} %<*pdftex> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-pdftex.def}% - [2007/02/22 v0.4 bookmark driver for pdftex (HO)] + [2007/03/03 v0.6 bookmark driver for pdftex (HO)] % \end{macrocode} % % \begin{macrocode} @@ -1206,26 +1614,67 @@ and the derived files %</pdftex> % \end{macrocode} % -% \subsection{Driver for dvips} +% \subsection{Drivers with pdfmark specials} +% +% \subsubsection{Driver dvips} % % \begin{macrocode} %<*dvips> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvips.def}% - [2007/02/22 v0.4 bookmark driver for dvips (HO)] + [2007/03/03 v0.6 bookmark driver for dvips (HO)] % \end{macrocode} +% \begin{macrocode} +\def\BKM@PSHeaderFile#1{% + \special{header=#1}% +} +%</dvips> +% \end{macrocode} +% +% \subsubsection{Driver dvipsone} +% +% \begin{macrocode} +%<*dvipsone> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-dvipsone.def}% + [2007/03/03 v0.6 bookmark driver for dvipsone (HO)] +% \end{macrocode} +% \begin{macrocode} +\def\BKM@PSHeaderFile#1{% + \special{header=#1}% +} +%</dvipsone> +% \end{macrocode} +% +% \subsubsection{Driver textures} +% +% \begin{macrocode} +%<*textures> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{bkm-textures.def}% + [2007/03/03 v0.6 bookmark driver for textures (HO)] +% \end{macrocode} +% \begin{macrocode} +\def\BKM@PSHeaderFile#1{% + \special{prePostScriptfile #1}% +} +%</textures> +% \end{macrocode} +% +% \subsubsection{Common part} % % \begin{macrocode} +%<*pdfmark> \def\BKM@filename{\jobname.out.ps} -\special{header=\BKM@filename} +\BKM@PSHeaderFile\BKM@filename % \end{macrocode} % % \begin{macrocode} -\AtEndDocument{\BKM@dvips@out} +\AtEndDocument{\BKM@pdfmark@out} % \end{macrocode} % % \begin{macrocode} -\def\BKM@dvips@out{% +\def\BKM@pdfmark@out{% \newwrite\BKM@file \immediate\openout\BKM@file=\BKM@filename\relax \BKM@write{\@percentchar!}% @@ -1363,13 +1812,13 @@ and the derived files } % \end{macrocode} % \begin{macrocode} -%</dvips> +%</pdfmark> % \end{macrocode} % -% \subsection{Common part for \xoption{pdftex} and \xoption{dvips}} +% \subsection{Common part for \xoption{pdftex} and \xoption{pdfmark}} % % \begin{macrocode} -%<*pdftex|dvips> +%<*pdftex|pdfmark> % \end{macrocode} % % \subsubsection{Write auxiliary file} @@ -1506,7 +1955,7 @@ and the derived files % \end{macrocode} % % \begin{macrocode} -%</pdftex|dvips> +%</pdftex|pdfmark> % \end{macrocode} % % @@ -1535,7 +1984,10 @@ and the derived files % bookmark.sty & tex/latex/oberdiek/bookmark.sty\\ % bkm-dvipdfm.def & tex/latex/oberdiek/bkm-dvipdfm.def\\ % bkm-dvips.def & tex/latex/oberdiek/bkm-dvips.def\\ +% bkm-dvipsone.def & tex/latex/oberdiek/bkm-dvipsone.def\\ +% bkm-textures.def & tex/latex/oberdiek/bkm-textures.def\\ % bkm-pdftex.def & tex/latex/oberdiek/bkm-pdftex.def\\ +% bkm-vtex.def & tex/latex/oberdiek/bkm-vtex.def\\ % bookmark.pdf & doc/latex/oberdiek/bookmark.pdf\\ % bookmark-example.tex & doc/latex/oberdiek/bookmark-example.tex\\ % bookmark.dtx & source/latex/oberdiek/bookmark.dtx\\ @@ -1626,6 +2078,22 @@ and the derived files % \item % \xpackage{hyperref}'s \xoption{bookmarkstype} respected. % \end{Version} +% \begin{Version}{2007/03/02 v0.5} +% \item +% Driver options \xoption{vtex} (PDF mode), \xoption{dvipsone}, +% and \xoption{textures} added. +% \item +% Option \xoption{depth} also accepts division name like \xpackage{hyperref}'s +% option \xoption{bookmarksdepth}. +% \item +% \xpackage{hyperref}'s \xoption{bookmarksopen}, +% \xoption{bookmarksopenlevel}, and \xoption{bookmarksdepth} respected. +% \end{Version} +% \begin{Version}{2007/03/03 v0.6} +% \item +% Option \xoption{numbered} as alias for \xpackage{hyperref}'s +% \xoption{bookmarksnumbered}. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx index 46c7698a182..cd24b09ef30 100644 --- a/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1998-2000, 2006 by +% Copyright (C) 1998-2000, 2006, 2007 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> % % This work may be distributed and/or modified under the @@ -67,7 +67,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: hypbmsec 2006/02/20 v2.2 Bookmarks in sectioning commands (HO)} +\Msg{* Package: hypbmsec 2006/03/05 v2.3 Bookmarks in sectioning commands (HO)} \Msg{************************************************************************} \keepsilent @@ -77,7 +77,7 @@ This is a generated file. -Copyright (C) 1998-2000, 2006 by +Copyright (C) 1998-2000, 2006, 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> This work may be distributed and/or modified under the @@ -128,7 +128,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{hypbmsec.drv}% - [2006/02/20 v2.2 Bookmarks in sectioning commands (HO)] + [2006/03/05 v2.3 Bookmarks in sectioning commands (HO)] \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -137,7 +137,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{161} +% \CheckSum{186} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -158,7 +158,7 @@ and the derived files % \GetFileInfo{hypbmsec.drv} % % \title{The \xpackage{hypbmsec} package} -% \date{2006/02/20 v2.2} +% \date{2006/03/05 v2.3} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -363,7 +363,7 @@ and the derived files % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hypbmsec}% - [2006/02/20 v2.2 Bookmarks in sectioning commands (HO)] + [2006/03/05 v2.3 Bookmarks in sectioning commands (HO)] % \end{macrocode} % % Because of redifining the sectioning commands, it is dangerous @@ -475,13 +475,28 @@ and the derived files \ifx\hbs@bmstring\relax \hbs@seccmd{#1}% \else - \hbs@seccmd{\texorpdfstring{#1}\hbs@bmstring}% + \begingroup + \def\x##1{\endgroup + \hbs@seccmd{\texorpdfstring{#1}{##1}}% + }% + \expandafter\x\expandafter{\hbs@bmstring}% \fi \else \ifx\hbs@bmstring\relax - \hbs@seccmd[\hbs@tocstring]{#1}% + \expandafter\hbs@seccmd\expandafter[% + \expandafter{\hbs@tocstring}% + ]{#1}% \else - \hbs@seccmd[\texorpdfstring\hbs@tocstring\hbs@bmstring]{#1}% + \expandafter\expandafter\expandafter + \hbs@seccmd\expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter + \texorpdfstring + \expandafter\expandafter\expandafter{% + \expandafter\hbs@tocstring\expandafter + }\expandafter{% + \hbs@bmstring + }% + ]{#1}% \fi \fi } @@ -683,6 +698,11 @@ and the derived files % \item % LPPL 1.3 % \end{Version} +% \begin{Version}{2007/03/05 v2.3} +% \item +% Bug fix: Expand \cs{hbs@tocstring} and \cs{hbs@bmstring} before +% calling \cs{hbs@seccmd}. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins index 243421cb946..89b20d5e96f 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins @@ -1,5 +1,5 @@ % oberdiek.ins -% 2007/02/25 +% 2007/03/05 % % Copyright (C) 1999, 2001, 2006 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex index f02495aeaaa..22a5b0bc5a9 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex @@ -6,7 +6,7 @@ \newcommand*{\Subject}{CTAN:\CTANdir} \newcommand*{\Author}{Heiko Oberdiek} \newcommand*{\Email}{oberdiek@uni-freiburg.de} -\newcommand*{\Date}{2007/02/25} +\newcommand*{\Date}{2007/03/05} % Copyright (C) 2006 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> @@ -165,7 +165,7 @@ [\entrysep] \entry{bmpsize}{2007/02/18}{1.1}{Extract size and resolution data from bitmap files}% [\entrysep] -\entry{bookmark}{2007/02/22}{0.4}{PDF bookmarks}% +\entry{bookmark}{2007/03/03}{0.6}{PDF bookmarks}% [\entrysep] \entry{centernot}{2006/12/02}{1.0}{Centers the not symbol horizontally}% [\entrysep] @@ -189,7 +189,7 @@ [\entrysep] \entry{holtxdoc}{2006/06/02}{0.7}{Private additional ltxdoc support}% [\entrysep] -\entry{hypbmsec}{2006/02/20}{2.2}{Bookmarks in sectioning commands}% +\entry{hypbmsec}{2006/03/05}{2.3}{Bookmarks in sectioning commands}% [\entrysep] \entry{hypcap}{2007/02/19}{1.6}{Adjusting anchors of captions}% [\entrysep] |