texlive[53026] Master: bookmark split from oberdiek (4dec19)

commits+karl at tug.org commits+karl at tug.org
Wed Dec 4 23:50:54 CET 2019


Revision: 53026
          http://tug.org/svn/texlive?view=revision&revision=53026
Author:   karl
Date:     2019-12-04 23:50:54 +0100 (Wed, 04 Dec 2019)
Log Message:
-----------
bookmark split from oberdiek (4dec19)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/bookmark/
    trunk/Master/texmf-dist/doc/latex/bookmark/README.md
    trunk/Master/texmf-dist/doc/latex/bookmark/bookmark-example.tex
    trunk/Master/texmf-dist/doc/latex/bookmark/bookmark.pdf
    trunk/Master/texmf-dist/source/latex/bookmark/
    trunk/Master/texmf-dist/source/latex/bookmark/bookmark.dtx
    trunk/Master/texmf-dist/tex/latex/bookmark/
    trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def
    trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvips.def
    trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipsone.def
    trunk/Master/texmf-dist/tex/latex/bookmark/bkm-pdftex.def
    trunk/Master/texmf-dist/tex/latex/bookmark/bkm-textures.def
    trunk/Master/texmf-dist/tex/latex/bookmark/bkm-vtex.def
    trunk/Master/texmf-dist/tex/latex/bookmark/bookmark.sty
    trunk/Master/tlpkg/tlpsrc/bookmark.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/bookmark/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookmark/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bookmark/README.md	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,12 @@
+# bookmarks
+
+bookmarks package for LaTeX
+
+
+This package implements a new bookmark (outline) organization for
+package hyperref. Bookmark properties such
+as style and color can now be set. Other action types
+are available (URI, GoToR, Named). The bookmarks are
+generated in the first compile run.
+
+Package hyperref uses two runs.


Property changes on: trunk/Master/texmf-dist/doc/latex/bookmark/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookmark/bookmark-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookmark/bookmark-example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bookmark/bookmark-example.tex	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,139 @@
+%%
+%% This is file `bookmark-example.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `example')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\documentclass{article}
+\usepackage{xcolor}[2007/01/21]
+\usepackage{hyperref}
+\usepackage[
+  open,
+  openlevel=2,
+  atend
+]{bookmark}[2019/12/03]
+
+\bookmarksetup{color=blue}
+
+\BookmarkAtEnd{%
+  \bookmarksetup{startatroot}%
+  \bookmark[named=LastPage, level=0]{End/Last page}%
+  \bookmark[named=FirstPage, level=1]{First page}%
+}
+
+\begin{document}
+\section{First section}
+\subsection{Subsection A}
+\begin{figure}
+  \hypertarget{fig}{}%
+  A figure.
+\end{figure}
+\bookmark[
+  rellevel=1,
+  keeplevel,
+  dest=fig
+]{A figure}
+\subsection{Subsection B}
+\subsubsection{Subsubsection C}
+\subsection{Umlauts: \"A\"O\"U\"a\"o\"u\ss}
+\newpage
+\bookmarksetup{
+  bold,
+  color=[rgb]{1,0,0}
+}
+\section{Very important section}
+\bookmarksetup{
+  italic,
+  bold=false,
+  color=blue
+}
+\subsection{Italic section}
+\bookmarksetup{
+  italic=false
+}
+\part{Misc}
+\section{Diverse}
+\subsubsection{Subsubsection, omitting subsection}
+\bookmarksetup{
+  startatroot
+}
+\section{Last section outside part}
+\subsection{Subsection}
+\bookmarksetup{
+  color={}
+}
+\begingroup
+  \bookmarksetup{level=0, color=green!80!black}
+  \bookmark[named=FirstPage]{First page}
+  \bookmark[named=LastPage]{Last page}
+  \bookmark[named=PrevPage]{Previous page}
+  \bookmark[named=NextPage]{Next page}
+\endgroup
+\bookmark[
+  page=2,
+  view=FitH 800
+]{Page 2, FitH 800}
+\bookmark[
+  page=2,
+  view=FitBH \calc{\paperheight-\topmargin-1in-\headheight-\headsep}
+]{Page 2, FitBH top of text body}
+\bookmark[
+  uri={http://www.dante.de/},
+  color=magenta
+]{Dante homepage}
+\bookmark[
+  gotor={t.pdf},
+  page=1,
+  view={XYZ 0 1000 null},
+  color=cyan!75!black
+]{File t.pdf}
+\bookmark[named=FirstPage]{First page}
+\bookmark[rellevel=1, named=LastPage]{Last page (rellevel=1)}
+\bookmark[named=PrevPage]{Previous page}
+\bookmark[level=0, named=FirstPage]{First page (level=0)}
+\bookmark[
+  rellevel=1,
+  keeplevel,
+  named=LastPage
+]{Last page (rellevel=1, keeplevel)}
+\bookmark[named=PrevPage]{Previous page}
+\end{document}
+
+\endinput
+%%
+%% End of file `bookmark-example.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/bookmark/bookmark-example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookmark/bookmark.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookmark/bookmark.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookmark/bookmark.pdf	2019-12-04 22:50:21 UTC (rev 53025)
+++ trunk/Master/texmf-dist/doc/latex/bookmark/bookmark.pdf	2019-12-04 22:50:54 UTC (rev 53026)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookmark/bookmark.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/bookmark/bookmark.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bookmark/bookmark.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/bookmark/bookmark.dtx	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,3445 @@
+% \iffalse meta-comment
+%
+% File: bookmark.dtx
+% Version: 2019/12/03 v1.28
+% Info: PDF bookmarks
+%
+% Copyright (C)
+%    2007-2011 Heiko Oberdiek
+%    2016-2019 Oberdiek Package Support Group
+%    https://github.com/ho-tex/bookmark/issues
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. This version of this license is in
+%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+% and the latest version of this license is in
+%    https://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainers of this work are
+% Heiko Oberdiek and the Oberdiek Package Support Group
+% https://github.com/ho-tex/bookmark/issues
+%
+% 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-dvipsone.def,
+%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%    bookmark-example.tex.
+%
+% Distribution:
+%    CTAN:macros/latex/contrib/bookmark/bookmark.dtx
+%    CTAN:macros/latex/contrib/bookmark/bookmark.pdf
+%
+% Unpacking:
+%    (a) If bookmark.ins is present:
+%           tex bookmark.ins
+%    (b) Without bookmark.ins:
+%           tex bookmark.dtx
+%    (c) If you insist on using LaTeX
+%           latex \let\install=y\input{bookmark.dtx}
+%        (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+%    (a) If bookmark.drv is present:
+%           latex bookmark.drv
+%    (b) Without bookmark.drv:
+%           latex bookmark.dtx; ...
+%    The class ltxdoc loads the configuration file ltxdoc.cfg
+%    if available. Here you can specify further options, e.g.
+%    use A4 as paper format:
+%       \PassOptionsToClass{a4paper}{article}
+%
+%    Programm calls to get the documentation (example):
+%       pdflatex bookmark.dtx
+%       makeindex -s gind.ist bookmark.idx
+%       pdflatex bookmark.dtx
+%       makeindex -s gind.ist bookmark.idx
+%       pdflatex bookmark.dtx
+%
+% Installation:
+%    TDS:tex/latex/bookmark/bookmark.sty
+%    TDS:tex/latex/bookmark/bkm-dvipdfm.def
+%    TDS:tex/latex/bookmark/bkm-dvips.def
+%    TDS:tex/latex/bookmark/bkm-dvipsone.def
+%    TDS:tex/latex/bookmark/bkm-textures.def
+%    TDS:tex/latex/bookmark/bkm-pdftex.def
+%    TDS:tex/latex/bookmark/bkm-vtex.def
+%    TDS:doc/latex/bookmark/bookmark.pdf
+%    TDS:doc/latex/bookmark/bookmark-example.tex
+%    TDS:source/latex/bookmark/bookmark.dtx
+%
+%<*ignore>
+\begingroup
+  \catcode123=1 %
+  \catcode125=2 %
+  \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+         \ifx\csname processbatchFile\endcsname\relax\else1\fi
+         \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: bookmark 2019/12/03 v1.28 PDF bookmarks (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Project: bookmark
+Version: 2019/12/03 v1.28
+
+Copyright (C)
+   2007-2011 Heiko Oberdiek
+   2016-2019 Oberdiek Package Support Group
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. This version of this license is in
+   https://www.latex-project.org/lppl/lppl-1-3c.txt
+and the latest version of this license is in
+   https://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+The Current Maintainers of this work are
+Heiko Oberdiek and the Oberdiek Package Support Group
+https://github.com/ho-tex/bookmark/issues
+
+
+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-dvipsone.def,
+   bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+   bookmark-example.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+  \file{bookmark.ins}{\from{bookmark.dtx}{install}}%
+  \file{bookmark.drv}{\from{bookmark.dtx}{driver}}%
+  \usedir{tex/latex/bookmark}%
+  \file{bookmark.sty}{\from{bookmark.dtx}{package}}%
+  \file{bkm-dvipdfm.def}{\from{bookmark.dtx}{dvipdfm}}%
+  \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/bookmark}%
+  \file{bookmark-example.tex}{\from{bookmark.dtx}{example}}%
+}
+
+\catcode32=13\relax% active space
+\let =\space%
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{*     bookmark.sty, bkm-dvipdfm.def, bkm-dvips.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.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bookmark.drv}%
+  [2019/12/03 v1.28 PDF bookmarks (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2011/11/22]
+\begin{document}
+  \DocInput{bookmark.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+%
+%
+% \GetFileInfo{bookmark.drv}
+%
+% \title{The \xpackage{bookmark} package}
+% \date{2019/12/03 v1.28}
+% \author{Heiko Oberdiek\thanks
+% {Please report any issues at \url{https://github.com/ho-tex/bookmark/issues}}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This package implements a new bookmark (outline) organization for
+% package \xpackage{hyperref}. Bookmark properties such
+% as style and color can now be set. Other action types
+% are available (URI, GoToR, Named). The bookmarks are
+% generated in the first compile run. Package \xpackage{hyperref}
+% uses two runs.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% \subsection{Introduction}
+%
+% This package \xpackage{bookmark} tries to provide a more modern
+% management for bookmarks:
+% \begin{itemize}
+% \item The bookmarks are already generated in the first \hologo{TeX} compile run.
+% \item The font style and color of the bookmarks can be changed.
+% \item More actions than simple GoTo actions are possible.
+% \end{itemize}
+%
+% In the same way as \xpackage{hyperref} \cite{hyperref}
+% the bookmarks are generated
+% in the order of the bookmark generating macros (\cs{bookmark}).
+% A level number is used to define the tree structure of the bookmarks.
+% The restrictions are less strict:
+% \begin{itemize}
+% \item The level values may jump and omit values. A \cs{subsubsection}
+%       may follow a \cs{chapter}. This was an error in \xpackage{hyperref},
+%       that prints a warning and tries to fix this.
+% \item Several bookmarks may point to the same destination.
+%       In \xpackage{hyperref} this would mess up the bookmark tree
+%       completely, because the algorithm assumes that the destination
+%       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 four places:
+% \begin{enumerate}
+% \item \cs{usepackage}|[|\meta{options}|]{bookmark}|\\
+%       This is the only place for driver options
+%       and option \xoption{atend}.
+% \item \cs{bookmarksetup}|{|\meta{options}|}|\\
+%       This command is just for setting options.
+% \item \cs{bookmarksetupnext}|{|\meta{options}|}|\\
+%       The options are stored and called after the
+%       options of the next \cs{bookmark} command.
+% \item \cs{bookmark}|[|\meta{options}|]{|\meta{title}|}|\\
+%       This command sets the bookmark. The option settings remain
+%       limited to this bookmark.
+% \end{enumerate}
+% Exception: Driver options, option \xoption{atend} and
+% options \xoption{draft}\slash\xoption{final}
+% cannot be changed after the package is loaded.
+%
+% \subsubsection{Options \xoption{draft} and \xoption{final}}
+%
+% If a \LaTeX\ file is compiled several times, then a little
+% time can be saved, if option \xoption{draft} is used to
+% disable the bookmark stuff of this package. Default is
+% \xoption{final}.
+% Both options are boolean options, without
+% value the value |true| is used. |draft=true| is the same
+% as |final=false|.
+%
+% Options of package \xpackage{bookmark} are local options
+% with the exception of driver options. Therefore \xoption{draft}
+% or \xoption{final} given as class option is not seen by this
+% package. If you want to optimize first \LaTeX\ runs depending
+% on a global \xoption{draft}, then package \xpackage{ifdraft}
+% and \LaTeX's \cs{PassOptionsToPackage}
+% might help in the organization of the preamble, for example:
+%\begin{quote}
+%\begin{verbatim}
+%\documentclass[draft]{article}
+%\usepackage{ifdraft}
+%\ifdraft{%
+%   \PassOptionsToPackage{draft}{bookmark}%
+%}{}
+%\end{verbatim}
+%\end{quote}
+%
+% \subsubsection{Driver options}
+%
+% Supported drivers are \xoption{pdftex}, \xoption{dvips},
+% \xoption{dvipsone}, \xoption{textures},
+% \xoption{dvipdfm} (\xoption{xetex}), and \xoption{vtex}.
+% The \hologo{TeX} engines \hologo{pdfTeX}, \hologo{XeTeX},
+% and \hologo{VTeX} 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{BookmarkDriverDefault}, e.g.:
+% \begin{quote}
+% |\def\BookmarkDriverDefault{dvipdfm}|
+% \end{quote}
+%
+% \paragraph{Open bookmarks with dvipdfmx.} Since 2007-04-25 the
+% cvs version of dvipmdfmx contains a patch that extends the
+% \cs{special} for bookmarks in order to specify the open status of
+% an outline entry. Option \xoption{dvipdfmx-outline-open} notifies
+% the package that the dvi driver program understands this kind
+% of \cs{special}. Alternatively \cs{SpecialDvipdfmxOutlineOpen}
+% can be defined as number one in the configuration file or before
+% the package is loaded, e.g.:
+% \begin{quote}
+% |\chardef\SpecialDvipdfmxOutlineOpen=1\relax|
+% \end{quote}
+%
+% \subsubsection{Layout options}
+%
+% \paragraph{Font options.}
+%
+% \begin{description}
+% \item[\xoption{bold}:] The bookmark is shown with a bold font
+%   if the PDF viewer supports this (since PDF 1.4).
+% \item[\xoption{italic}:] An italic font is used (since PDF 1.4).
+% \end{description}
+% Both \xoption{bold} and \xoption{italic} can be used together.
+% Using value |false| disables the font option.
+%
+% \paragraph{Color option.}
+%
+% Colored bookmarks are a feature of PDF 1.4, they are not supported
+% by all PDF viewers.
+% \begin{description}
+% \item[\xoption{color}:] Here the color can be given as
+%   color specification of packages \xpackage{color} or \xpackage{xcolor}.
+%   An empty value means that the color property is not set.
+%   Without package \xpackage{xcolor} the recognized values
+%   are restricted to
+%   \begin{itemize}
+%   \item Empty value, no color is set,\\
+%         example: |color={}|
+%   \item Explicit color specification of color model rgb,\\
+%         example for red: |color=[rgb]{1,0,0}|
+%   \item Explicit color specification of color model gray,\\
+%         example for dark gray: |color=[gray]{0.25}|
+%   \end{itemize}
+%   Note that this restriction also holds if package \xpackage{color}
+%   is loaded. With \xpackage{xcolor}, however, the full range
+%   of color specifications can be used.
+% \end{description}
+%
+% \subsubsection{Action options}
+%
+% \begin{description}
+% \item[\xoption{dest}:] Destination name.
+% \item[\xoption{page}:] Page number, first page is 1.
+% \item[\xoption{view}:] View specification, examples:\\
+%   |view={FitB}|, |view={FitH 842}|, |view={XYZ 0 100 null}|
+%   Some view specification parameters expect numbers as parameters
+%   with unit bp. They can be given either as plain numbers or
+%   as length expressions inside \cs{calc}. Expressions of
+%   package \xpackage{calc} are supported if the package is loaded.
+%   Otherwise \hologo{eTeX}'s \cs{dimexpr} is used. Example:\\
+%   |view={FitH \calc{\paperheight-\topmargin-1in}}|\\
+%   |view={XYZ 0 \calc{\paperheight} null}|\\
+%   Note that \cs{calc} cannot be used for the third parameter
+%   of |XYZ|. This parameter is the zoom value, not a length.
+% \item[\xoption{named}:] Named action name:\\
+%   |FirstPage|, |LastPage|, |NextPage|, |PrevPage|
+% \item[\xoption{gotor}:] Name of the external PDF file.
+% \item[\xoption{uri}:] URI specification.
+% \item[\xoption{rawaction}:] Raw action specification.
+%   Because these specification depends on the driver this option
+%   should not be used.
+% \end{description}
+% The appropriate action for the bookmark is selected by
+% analyzing the specified options. The actions
+% are distinguished by different sets of options:
+% \begin{quote}
+% \begin{tabular}{@{}ll@{}}
+%   \textbf{Action} & \textbf{Options}\\
+%   \hline
+%   \textsf{GoTo}: & \xoption{dest}\\
+%   \textsf{GoTo}: & \xoption{page} + \xoption{view}\\
+%   \textsf{GoToR}: & \xoption{gotor} + \xoption{dest}\\
+%   \textsf{GoToR}: & \xoption{gotor} + \xoption{page} + \xoption{view}\\
+%   \textsf{Named}: & \xoption{named}\\
+%   \textsf{URI}: & \xoption{uri}
+% \end{tabular}
+% \end{quote}
+%
+% \paragraph{Missing actions.}
+% If the action is missing package \xpackage{bookmark} throws
+% an error message. Depending on the driver (\xoption{pdftex},
+% \xoption{dvips} and friends) the package detects it quite late
+% at the end of the document. Since version 2011/04/21 v1.21
+% the package tries printing the line number and file name
+% of the corresponding occurence of \cs{bookmark}.
+% However, \hologo{TeX} does provide the line number, but
+% unhappily the file name is a secret. The package supports
+% some ways to get the file name:
+% \begin{itemize}
+% \item If \hologo{LuaTeX} (indenpendently from DVI or PDF modus)
+%   is running, then its |status.filename| is used automatically.
+% \item Package \cs{currfile} \cite{currfile} redefines \hologo{LaTeX}
+%    internals to keep track of the file name. If the package
+%    is loaded, then its \cs{currfilepath} is detected and used
+%    automatically by package \xpackage{bookmark}.
+% \item The file name can be set manually by option \xoption{scrfile}
+%    in \cs{bookmarksetup} or \cs{bookmark}. But be careful,
+%    manual setting disables the previous ways for file name
+%    detection. And a wrong or missed file name setting might
+%    get you a wrong source location in the error message.
+% \end{itemize}
+%
+% \subsubsection{Level options}
+%
+% The order of the bookmark entries are defined by the
+% appearance order of \cs{bookmark} commands. The tree structure
+% is constructed by the property \xoption{level} of the bookmark nodes.
+% The values of \xoption{level} are integers. If the level of a
+% bookmark entry has a higher value than the previous node, then
+% the entry becomes a child of the previous node. The absolute
+% value of the difference does not matter.
+%
+% Package \xpackage{bookmark} remembers the level of the previous
+% bookmark entry in a global property `current level'.
+%
+% The behaviour of the level system can be configured by following
+% options:
+% \begin{description}
+% \item[\xoption{level}:]
+%    Sets the level, see the description above. If option \xoption{level}
+%    is given without value, then the default behaviour is restored,
+%    that the `current level' is used as level value.
+%    Since version 2010/10/19 v1.16 package \xpackage{bookmark}
+%    also supports names |part|, |section| and other,
+%    if the macros \cs{toclevel at part}, \cs{toclevel at section}
+%    are defined (done by package \xpackage{hyperref}, see
+%    option \xoption{bookmarkdepth}).
+% \item[\xoption{rellevel}:]
+%    Sets the level relative to the previous level.
+%    A positive value means that the bookmark entry become
+%    a child of the previous one.
+% \item[\xoption{keeplevel}:]
+%    Use the level, set by \xoption{level} or \xoption{rellevel},
+%    but do not change the global property `current level'.
+%    The option can be disabled by setting to |false|.
+% \item[\xoption{startatroot}:]
+%    At this time the bookmark tree starts at the top level again.
+%    The next bookmark entry is not sorted as child to a previous entry.
+%    Example scenario: A document uses part. However there are
+%    last chapters that should not be put below the last part:
+%    \begin{quote}
+%\begin{verbatim}
+%\documentclass{book}
+%[...]
+%\begin{document}
+%  \part{First part}
+%    \chapter{First chapter in first part}
+%    [...]
+%  \part{Second part}
+%    \chapter{First chapter in second part}
+%    [...]
+%  \bookmarksetup{startatroot}
+%  \chapter{Index}% does not belong to second part
+%\end{document}
+%\end{verbatim}
+%    \end{quote}
+% \end{description}
+%
+% \subsubsection{Style definitions}
+%
+% A style is a group of option settings. It can be defined
+% by macro \cs{bookmarkdefinestyle} and is used by option \xoption{style}.
+% \begin{declcs}{bookmarkdefinestyle} \M{name} \M{key value list}
+% \end{declcs}
+% The \meta{key value list} of option settings is assigned the
+% style \meta{name}.
+%
+% \begin{description}
+% \item[\xoption{style}:]
+%   The value of option \xoption{style} is the name of a previously
+%   defined style. Its option settings are now executed.
+%   The options may include option \xoption{style}.
+%   Endless recursion by calling the same style recursively
+%   is prevented and throws an error.
+% \end{description}
+%
+% \subsubsection{Hook support}
+%
+% A hook is called right after the processing the optional options
+% of macro \cs{bookmark}.
+% \begin{description}
+% \item[\xoption{addtohook}:]
+%   Code, given as value to this option is added to the hook.
+% \end{description}
+%
+% \begin{declcs}{bookmarkget} \M{option}
+% \end{declcs}
+% Macro \cs{bookmarkget} extracts the value of the latest option
+% setting of option \meta{option}. In case of boolean options number
+% one is returned, if the boolean option is enabled, otherwise the
+% result is zero.
+% The resulting numbers can directly be used in \cs{ifnum} or \cs{ifcase}.
+% If you want to have the digits \texttt{0} and \texttt{1}, then
+% prefix \cs{bookmarkget} with \cs{number}.
+% Macro \cs{bookmarkget} is expandable.
+% In case of
+% unsupported options an empty string is returned.
+% Supported boolean options are
+% \begin{quote}
+%   \xoption{bold},
+%   \xoption{italic},
+%   \xoption{open}
+% \end{quote}
+% Other supported options:
+% \begin{quote}
+%   \xoption{depth},
+%   \xoption{dest},
+%   \xoption{color},
+%   \xoption{gotor},
+%   \xoption{level},
+%   \xoption{named},
+%   \xoption{openlevel},
+%   \xoption{page},
+%   \xoption{rawaction},
+%   \xoption{uri},
+%   \xoption{view},
+% \end{quote}
+% Additionally the following key is available:
+% \begin{quote}
+%   \xoption{text}
+% \end{quote}
+% It returns the text of the outline entry.
+%
+% \paragraph{Option setting.}
+% Inside the hook an option can be set using \cs{bookmarksetup}.
+%
+% \subsection{Compatibility with \xpackage{hyperref}}
+%
+% Package \xpackage{bookmark} automatically disables
+% \xpackage{hyperref}'s bookmarks. However the package
+% uses some of the code of \xpackage{hyperref}. For example,
+% the package redefines the hook \cs{Hy at writebookmark} that
+% \xpackage{hyperref} inserts in \cs{addcontentsline} and
+% other commands. Therefore
+% \xpackage{hyperref}'s bookmarks should not be disabled.
+%
+% Package \xpackage{bookmark} uses \xpackage{hyperref}'s \cs{pdfstringdef}
+% and does not provide a replacement.
+%
+% Some options of \xpackage{hyperref} are also implemented
+% in package \xpackage{bookmark}:
+% \begin{quote}
+% \begin{tabular}{@{}ll@{}}
+%   \xpackage{hyperref} & \xpackage{bookmark}\\
+%   \hline
+%   \xoption{bookmarksdepth} & \xoption{depth}\\
+%   \xoption{bookmarksopen} & \xoption{open}\\
+%   \xoption{bookmarksopenlevel} & \xoption{openlevel}\\
+%   \xoption{bookmarksnumbered} & \xoption{numbered}\\
+% \end{tabular}
+% \end{quote}
+%
+% The following commands are also available:
+% \begin{quote}
+%   \cs{pdfbookmark}\\
+%   \cs{currentpdfbookmark}\\
+%   \cs{subpdfbookmark}\\
+%   \cs{belowpdfbookmark}
+% \end{quote}
+%
+% \subsection{Adding bookmarks at the end}
+%
+% Package option \xoption{atend} enables the following macro:
+% \begin{declcs}{BookmarkAtEnd}
+%   \M{stuff}
+% \end{declcs}
+% Macro \cs{BookmarkAtEnd} puts \meta{stuff} at the end
+% of the document. \meta{stuff} means bookmark commands.
+% Example:
+% \begin{quote}
+%\begin{verbatim}
+%\usepackage[atend]{bookmark}
+%\BookmarkAtEnd{%
+%  \bookmarksetup{startatroot}%
+%  \bookmark[named=LastPage, level=0]{Last page}%
+%}
+%\end{verbatim}
+% \end{quote}
+%
+% Alternatively, option \xoption{startatroot} can be given
+% in \cs{bookmark}:
+% \begin{quote}
+%\begin{verbatim}
+%\BookmarkAtEnd{%
+%  \bookmark[
+%    startatroot,
+%    named=LastPage,
+%    level=0,
+%  ]{Last page}%
+%}
+%\end{verbatim}
+% \end{quote}
+%
+% \paragraph{Remarks.}
+% \begin{itemize}
+% \item
+%   \cs{BookmarkAtEnd} hides the fact that the method for
+%   adding bookmarks at the end of the document depends
+%   on the driver.
+%
+%   Some drivers
+%   (\xoption{pdftex}, \xoption{dvips}, \xoption{dvipsone},
+%   \xoption{textures}) use package \xpackage{atveryend}'s
+%   for this purpose. \cs{AtEndDocument} is too early,
+%   the last page might not been shipped out. Because the \xext{aux}
+%   file is needed, these drivers use \cs{AfterLastShipout}.
+%
+%   The implementation of the other drivers
+%   (\xoption{dvipdfm}, \xoption{xetex}, \xoption{vtex})
+%   depends on
+%   \cs{special} that does not have an effect after the last
+%   page. In this case \cs{AtEndDvi} of package \xpackage{atenddvi}
+%   helps. It puts its argument on last page of the document.
+%   Two \hologo{LaTeX} runs are necessary at least, because
+%   the last page is detected by a reference.
+% \item
+%   The time of expansion of the argument of \cs{BookmarkAtEnd}
+%   is not specified. This can happen immediately or at the end
+%   of the document.
+% \end{itemize}
+%
+% \subsection{Limitations/ToDos}
+%
+% \begin{itemize}
+% \item Support for missing actions (Launch, \dots).
+% \item Better design for \xpackage{hyperref}'s option
+%       \xoption{bookmarkstype}.
+% \end{itemize}
+%
+% \section{Example}
+%
+%    \begin{macrocode}
+%<*example>
+%    \end{macrocode}
+%    \begin{macrocode}
+\documentclass{article}
+\usepackage{xcolor}[2007/01/21]
+\usepackage{hyperref}
+\usepackage[
+  open,
+  openlevel=2,
+  atend
+]{bookmark}[2019/12/03]
+
+\bookmarksetup{color=blue}
+
+\BookmarkAtEnd{%
+  \bookmarksetup{startatroot}%
+  \bookmark[named=LastPage, level=0]{End/Last page}%
+  \bookmark[named=FirstPage, level=1]{First page}%
+}
+
+\begin{document}
+\section{First section}
+\subsection{Subsection A}
+\begin{figure}
+  \hypertarget{fig}{}%
+  A figure.
+\end{figure}
+\bookmark[
+  rellevel=1,
+  keeplevel,
+  dest=fig
+]{A figure}
+\subsection{Subsection B}
+\subsubsection{Subsubsection C}
+\subsection{Umlauts: \"A\"O\"U\"a\"o\"u\ss}
+\newpage
+\bookmarksetup{
+  bold,
+  color=[rgb]{1,0,0}
+}
+\section{Very important section}
+\bookmarksetup{
+  italic,
+  bold=false,
+  color=blue
+}
+\subsection{Italic section}
+\bookmarksetup{
+  italic=false
+}
+\part{Misc}
+\section{Diverse}
+\subsubsection{Subsubsection, omitting subsection}
+\bookmarksetup{
+  startatroot
+}
+\section{Last section outside part}
+\subsection{Subsection}
+\bookmarksetup{
+  color={}
+}
+\begingroup
+  \bookmarksetup{level=0, color=green!80!black}
+  \bookmark[named=FirstPage]{First page}
+  \bookmark[named=LastPage]{Last page}
+  \bookmark[named=PrevPage]{Previous page}
+  \bookmark[named=NextPage]{Next page}
+\endgroup
+\bookmark[
+  page=2,
+  view=FitH 800
+]{Page 2, FitH 800}
+\bookmark[
+  page=2,
+  view=FitBH \calc{\paperheight-\topmargin-1in-\headheight-\headsep}
+]{Page 2, FitBH top of text body}
+\bookmark[
+  uri={http://www.dante.de/},
+  color=magenta
+]{Dante homepage}
+\bookmark[
+  gotor={t.pdf},
+  page=1,
+  view={XYZ 0 1000 null},
+  color=cyan!75!black
+]{File t.pdf}
+\bookmark[named=FirstPage]{First page}
+\bookmark[rellevel=1, named=LastPage]{Last page (rellevel=1)}
+\bookmark[named=PrevPage]{Previous page}
+\bookmark[level=0, named=FirstPage]{First page (level=0)}
+\bookmark[
+  rellevel=1,
+  keeplevel,
+  named=LastPage
+]{Last page (rellevel=1, keeplevel)}
+\bookmark[named=PrevPage]{Previous page}
+\end{document}
+%    \end{macrocode}
+%    \begin{macrocode}
+%</example>
+%    \end{macrocode}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+%
+% \subsection{Package}
+%
+%    \begin{macrocode}
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bookmark}%
+  [2019/12/03 v1.28 PDF bookmarks (HO)]%
+%    \end{macrocode}
+%
+% \subsubsection{Requirements}
+%
+% \paragraph{\hologo{eTeX}.}
+%
+%    \begin{macro}{\BKM at CalcExpr}
+%    \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname numexpr\endcsname\relax
+  \def\BKM at CalcExpr#1#2#3#4{%
+    \begingroup
+      \count@=#2\relax
+      \advance\count@ by#3#4\relax
+      \edef\x{\endgroup
+        \def\noexpand#1{\the\count@}%
+      }%
+    \x
+  }%
+\else
+  \def\BKM at CalcExpr#1#2#3#4{%
+    \edef#1{%
+      \the\numexpr#2#3#4\relax
+    }%
+  }%
+\fi
+%    \end{macrocode}
+%    \end{macro}
+%
+% \paragraph{Escape features of \hologo{pdfTeX}.}
+%
+%    \begin{macro}{\BKM at EscapeName}
+%    \begin{macrocode}
+\def\BKM at EscapeName#1{%
+  \ifx#1\@empty
+  \else
+    \EdefEscapeName#1#1%
+  \fi
+}%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at EscapeString}
+%    \begin{macrocode}
+\def\BKM at EscapeString#1{%
+  \ifx#1\@empty
+  \else
+    \EdefEscapeString#1#1%
+  \fi
+}%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at EscapeHex}
+%    \begin{macrocode}
+\def\BKM at EscapeHex#1{%
+  \ifx#1\@empty
+  \else
+    \EdefEscapeHex#1#1%
+  \fi
+}%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at UnescapeHex}
+%    \begin{macrocode}
+\def\BKM at UnescapeHex#1{%
+  \EdefUnescapeHex#1#1%
+}%
+%    \end{macrocode}
+%    \end{macro}
+%
+% \paragraph{Packages.}
+%
+% Don't load packages loaded by xpackage{hyperref}
+%    \begin{macrocode}
+\RequirePackage{hyperref}[2010/06/18]
+%    \end{macrocode}
+%
+% \subsubsection{Package options}
+%
+%    \begin{macrocode}
+\SetupKeyvalOptions{family=BKM,prefix=BKM@}
+\DeclareLocalOptions{%
+  atend,%
+  bold,%
+  color,%
+  depth,%
+  dest,%
+  draft,%
+  final,%
+  gotor,%
+  italic,%
+  keeplevel,%
+  level,%
+  named,%
+  numbered,%
+  open,%
+  openlevel,%
+  page,%
+  rawaction,%
+  rellevel,%
+  srcfile,%
+  srcline,%
+  startatroot,%
+  uri,%
+  view,%
+}
+%    \end{macrocode}
+%    \begin{macro}{\bookmarksetup}
+%    \begin{macrocode}
+\newcommand*{\bookmarksetup}{\kvsetkeys{BKM}}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at setup}
+%    \begin{macrocode}
+\def\BKM at setup#1{%
+  \bookmarksetup{#1}%
+  \ifx\BKM at HookNext\ltx at empty
+  \else
+    \expandafter\bookmarksetup\expandafter{\BKM at HookNext}%
+    \BKM at HookNextClear
+  \fi
+  \BKM at hook
+  \ifBKM at keeplevel
+  \else
+    \xdef\BKM at currentlevel{\BKM at level}%
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\bookmarksetupnext}
+%    \begin{macrocode}
+\newcommand*{\bookmarksetupnext}[1]{%
+  \ltx at GlobalAppendToMacro\BKM at HookNext{,#1}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at setupnext}
+%    \begin{macrocode}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at HookNextClear}
+%    \begin{macrocode}
+\def\BKM at HookNextClear{%
+  \global\let\BKM at HookNext\ltx at empty
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at HookNext}
+%    \begin{macrocode}
+\BKM at HookNextClear
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+\DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at DisableOptions}
+%    \begin{macrocode}
+\def\BKM at DisableOptions{%
+  \DisableKeyvalOption[action=warning,package=bookmark]%
+      {BKM}{draft}%
+  \DisableKeyvalOption[action=warning,package=bookmark]%
+      {BKM}{final}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\DeclareBoolOption[\ifHy at bookmarksopen true\else false\fi]{open}
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at open}
+%    \begin{macrocode}
+\def\bookmark at open{%
+  \ifBKM at open\ltx at one\else\ltx at zero\fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\DeclareStringOption[\maxdimen]{openlevel}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at openlevel}
+%    \begin{macrocode}
+\edef\BKM at openlevel{\number\@bookmarksopenlevel}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%\DeclareStringOption[\c at tocdepth]{depth}
+\ltx at IfUndefined{Hy at bookmarksdepth}{%
+  \def\BKM at depth{\c at tocdepth}%
+}{%
+  \let\BKM at depth\Hy at bookmarksdepth
+}
+\define at key{BKM}{depth}[]{%
+  \edef\BKM at param{#1}%
+  \ifx\BKM at param\@empty
+    \def\BKM at depth{\c at tocdepth}%
+  \else
+    \ltx at IfUndefined{toclevel@\BKM at param}{%
+      \@onelevel at sanitize\BKM at param
+      \edef\BKM at temp{\expandafter\@car\BKM at param\@nil}%
+      \ifcase 0\expandafter\ifx\BKM at temp-1\fi
+              \expandafter\ifnum\expandafter`\BKM at temp>47 %
+                \expandafter\ifnum\expandafter`\BKM at temp<58 %
+                  1%
+                \fi
+              \fi
+              \relax
+        \PackageWarning{bookmark}{%
+          Unknown document division name (\BKM at param)\MessageBreak
+          for option `depth'%
+        }%
+      \else
+        \BKM at SetDepthOrLevel\BKM at depth\BKM at param
+      \fi
+    }{%
+      \BKM at SetDepthOrLevel\BKM at depth{%
+        \csname toclevel@\BKM at param\endcsname
+      }%
+    }%
+  \fi
+}
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at depth}
+%    \begin{macrocode}
+\def\bookmark at depth{\BKM at depth}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at SetDepthOrLevel}
+%    \begin{macrocode}
+\def\BKM at SetDepthOrLevel#1#2{%
+  \begingroup
+    \setbox\z@=\hbox{%
+      \count@=#2\relax
+      \expandafter
+    }%
+  \expandafter\endgroup
+  \expandafter\def\expandafter#1\expandafter{\the\count@}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\DeclareStringOption[\BKM at currentlevel]{level}[\BKM at currentlevel]
+\define at key{BKM}{level}{%
+  \edef\BKM at param{#1}%
+  \ifx\BKM at param\BKM at MacroCurrentLevel
+    \let\BKM at level\BKM at param
+  \else
+    \ltx at IfUndefined{toclevel@\BKM at param}{%
+      \@onelevel at sanitize\BKM at param
+      \edef\BKM at temp{\expandafter\@car\BKM at param\@nil}%
+      \ifcase 0\expandafter\ifx\BKM at temp-1\fi
+              \expandafter\ifnum\expandafter`\BKM at temp>47 %
+                \expandafter\ifnum\expandafter`\BKM at temp<58 %
+                  1%
+                \fi
+              \fi
+              \relax
+        \PackageWarning{bookmark}{%
+          Unknown document division name (\BKM at param)\MessageBreak
+          for option `level'%
+        }%
+      \else
+        \BKM at SetDepthOrLevel\BKM at level\BKM at param
+      \fi
+    }{%
+      \BKM at SetDepthOrLevel\BKM at level{%
+        \csname toclevel@\BKM at param\endcsname
+      }%
+    }%
+  \fi
+}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at MacroCurrentLevel}
+%    \begin{macrocode}
+\def\BKM at MacroCurrentLevel{\BKM at currentlevel}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\DeclareBoolOption{keeplevel}
+\DeclareBoolOption{startatroot}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at startatrootfalse}
+%    \begin{macrocode}
+\def\BKM at startatrootfalse{%
+  \global\let\ifBKM at startatroot\iffalse
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at startatroottrue}
+%    \begin{macrocode}
+\def\BKM at startatroottrue{%
+  \global\let\ifBKM at startatroot\iftrue
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\define at key{BKM}{rellevel}{%
+  \BKM at CalcExpr\BKM at level{#1}+\BKM at currentlevel
+}
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at level}
+%    \begin{macrocode}
+\def\bookmark at level{\BKM at level}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at currentlevel}
+%    \begin{macrocode}
+\def\BKM at currentlevel{0}
+%    \end{macrocode}
+%    \end{macro}
+%    Make \xpackage{bookmark}'s option \xoption{numbered} an alias
+%    for \xpackage{hyperref}'s \xoption{bookmarksnumbered}.
+%    \begin{macrocode}
+\DeclareBoolOption[%
+  \ifHy at bookmarksnumbered true\else false\fi
+]{numbered}
+\g at addto@macro\BKM at numberedtrue{%
+  \let\ifHy at bookmarksnumbered\iftrue
+}
+\g at addto@macro\BKM at numberedfalse{%
+  \let\ifHy at bookmarksnumbered\iffalse
+}
+\g at addto@macro\Hy at bookmarksnumberedtrue{%
+  \let\ifBKM at numbered\iftrue
+}
+\g at addto@macro\Hy at bookmarksnumberedfalse{%
+  \let\ifBKM at numbered\iffalse
+}
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at numbered}
+%    \begin{macrocode}
+\def\bookmark at numbered{%
+  \ifBKM at numbered\ltx at one\else\ltx at zero\fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \paragraph{Redefinitions \xpackage{hyperref}'s options}
+%
+%    \begin{macro}{\BKM at PatchHyperrefOption}
+%    \begin{macrocode}
+\def\BKM at PatchHyperrefOption#1{%
+  \expandafter\BKM@@PatchHyperrefOption\csname KV at Hyp@#1\endcsname%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM@@PatchHyperrefOption}
+%    \begin{macrocode}
+\def\BKM@@PatchHyperrefOption#1{%
+  \expandafter\BKM@@@PatchHyperrefOption#1{##1}\BKM at nil#1%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM@@@PatchHyperrefOption}
+%    \begin{macrocode}
+\def\BKM@@@PatchHyperrefOption#1\BKM at nil#2#3{%
+  \def#2##1{%
+    #1%
+    \bookmarksetup{#3={##1}}%
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\BKM at PatchHyperrefOption{bookmarksopen}{open}
+\BKM at PatchHyperrefOption{bookmarksopenlevel}{openlevel}
+\BKM at PatchHyperrefOption{bookmarksdepth}{depth}
+%    \end{macrocode}
+%
+% \paragraph{Font style options.}
+%
+%    Caution: Package \xpackage{bitset} is zero-based, the
+%    PDF specifications starts with one.
+%    \begin{macrocode}
+\bitsetReset{BKM at FontStyle}%
+\define at key{BKM}{italic}[true]{%
+  \expandafter\ifx\csname if#1\endcsname\iftrue
+    \bitsetSet{BKM at FontStyle}{0}%
+  \else
+    \bitsetClear{BKM at FontStyle}{0}%
+  \fi
+}%
+\define at key{BKM}{bold}[true]{%
+  \expandafter\ifx\csname if#1\endcsname\iftrue
+    \bitsetSet{BKM at FontStyle}{1}%
+  \else
+    \bitsetClear{BKM at FontStyle}{1}%
+  \fi
+}%
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at italic}
+%    \begin{macrocode}
+\def\bookmark at italic{%
+  \ifnum\bitsetGet{BKM at FontStyle}{0}=1 \ltx at one\else\ltx at zero\fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at bold}
+%    \begin{macrocode}
+\def\bookmark at bold{%
+  \ifnum\bitsetGet{BKM at FontStyle}{1}=1 \ltx at one\else\ltx at zero\fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at PrintStyle}
+%    \begin{macrocode}
+\def\BKM at PrintStyle{%
+  \bitsetGetDec{BKM at FontStyle}%
+}%
+%    \end{macrocode}
+%    \end{macro}
+%
+% \paragraph{Options for color.}
+%
+%    \begin{macrocode}
+\define at key{BKM}{color}{%
+  \HyColor at BookmarkColor{#1}\BKM at color{bookmark}{color}%
+}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at color}
+%    \begin{macrocode}
+\let\BKM at color\@empty
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at color}
+%    \begin{macrocode}
+\def\bookmark at color{\BKM at color}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Action options}
+%
+%    \begin{macrocode}
+\def\BKM at temp#1{%
+  \DeclareStringOption{#1}%
+  \expandafter\edef\csname bookmark@#1\endcsname{%
+    \expandafter\noexpand\csname BKM@#1\endcsname
+  }%
+}
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at dest}
+%    \begin{macrocode}
+\BKM at temp{dest}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at named}
+%    \begin{macrocode}
+\BKM at temp{named}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at uri}
+%    \begin{macrocode}
+\BKM at temp{uri}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at gotor}
+%    \begin{macrocode}
+\BKM at temp{gotor}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at rawaction}
+%    \begin{macrocode}
+\BKM at temp{rawaction}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+\define at key{BKM}{page}{%
+  \def\BKM at page{#1}%
+  \ifx\BKM at page\@empty
+  \else
+    \edef\BKM at page{\number\BKM at page}%
+    \ifnum\BKM at page>\z@
+    \else
+      \PackageError{bookmark}{Page must be positive}\@ehc
+      \def\BKM at page{1}%
+    \fi
+  \fi
+}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at page}
+%    \begin{macrocode}
+\let\BKM at page\@empty
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at page}
+%    \begin{macrocode}
+\def\bookmark at page{\BKM@@page}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+\define at key{BKM}{view}{%
+  \BKM at CheckView{#1}%
+}
+%    \end{macrocode}
+%    \begin{macro}{\BKM at view}
+%    \begin{macrocode}
+\let\BKM at view\@empty
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\bookmark at view}
+%    \begin{macrocode}
+\def\bookmark at view{\BKM at view}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{BKM at CheckView}
+%    \begin{macrocode}
+\def\BKM at CheckView#1{%
+  \BKM at CheckViewType#1 \@nil
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at CheckViewType}
+%    \begin{macrocode}
+\def\BKM at CheckViewType#1 #2\@nil{%
+  \def\BKM at type{#1}%
+  \@onelevel at sanitize\BKM at type
+  \BKM at TestViewType{Fit}{}%
+  \BKM at TestViewType{FitB}{}%
+  \BKM at TestViewType{FitH}{%
+    \BKM at CheckParam#2 \@nil{top}%
+  }%
+  \BKM at TestViewType{FitBH}{%
+    \BKM at CheckParam#2 \@nil{top}%
+  }%
+  \BKM at TestViewType{FitV}{%
+    \BKM at CheckParam#2 \@nil{bottom}%
+  }%
+  \BKM at TestViewType{FitBV}{%
+    \BKM at CheckParam#2 \@nil{bottom}%
+  }%
+  \BKM at TestViewType{FitR}{%
+    \BKM at CheckRect{#2}{ }%
+  }%
+  \BKM at TestViewType{XYZ}{%
+    \BKM at CheckXYZ{#2}{ }%
+  }%
+  \@car{%
+    \PackageError{bookmark}{%
+      Unknown view type `\BKM at type',\MessageBreak
+      using `FitH' instead%
+    }\@ehc
+    \def\BKM at view{FitH}%
+  }%
+  \@nil
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at TestViewType}
+%    \begin{macrocode}
+\def\BKM at TestViewType#1{%
+  \def\BKM at temp{#1}%
+  \@onelevel at sanitize\BKM at temp
+  \ifx\BKM at type\BKM at temp
+    \let\BKM at view\BKM at temp
+    \expandafter\@car
+  \else
+    \expandafter\@gobble
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{BKM at CheckParam}
+%    \begin{macrocode}
+\def\BKM at CheckParam#1 #2\@nil#3{%
+  \def\BKM at param{#1}%
+  \ifx\BKM at param\@empty
+    \PackageWarning{bookmark}{%
+      Missing parameter (#3) for `\BKM at type',\MessageBreak
+      using 0%
+    }%
+    \def\BKM at param{0}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{BKM at CheckRect}
+%    \begin{macrocode}
+\def\BKM at CheckRect#1#2{%
+  \BKM@@CheckRect#1#2#2#2#2\@nil
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM@@CheckRect}
+%    \begin{macrocode}
+\def\BKM@@CheckRect#1 #2 #3 #4 #5\@nil{%
+  \def\BKM at temp{0}%
+  \def\BKM at param{#1}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#2}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#3}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#4}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \ifnum\BKM at temp>\z@
+    \PackageWarning{bookmark}{Missing parameters for `\BKM at type'}%
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at CheckXYZ}
+%    \begin{macrocode}
+\def\BKM at CheckXYZ#1#2{%
+  \BKM@@CheckXYZ#1#2#2#2\@nil
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM@@CheckXYZ}
+%    \begin{macrocode}
+\def\BKM@@CheckXYZ#1 #2 #3 #4\@nil{%
+  \def\BKM at param{#1}%
+  \let\BKM at temp\BKM at param
+  \@onelevel at sanitize\BKM at temp
+  \ifx\BKM at param\@empty
+    \let\BKM at param\BKM at null
+  \else
+    \ifx\BKM at temp\BKM at null
+    \else
+      \BKM at CalcParam
+    \fi
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#2}%
+  \let\BKM at temp\BKM at param
+  \@onelevel at sanitize\BKM at temp
+  \ifx\BKM at param\@empty
+    \let\BKM at param\BKM at null
+  \else
+    \ifx\BKM at temp\BKM at null
+    \else
+      \BKM at CalcParam
+    \fi
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#3}%
+  \ifx\BKM at param\@empty
+    \let\BKM at param\BKM at null
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at null}
+%    \begin{macrocode}
+\def\BKM at null{null}
+\@onelevel at sanitize\BKM at null
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\BKM at CalcParam}
+%    \begin{macrocode}
+\def\BKM at CalcParam{%
+  \begingroup
+  \let\calc\@firstofone
+  \expandafter\BKM@@CalcParam\BKM at param\@empty\@empty\@nil
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM@@CalcParam}
+%    \begin{macrocode}
+\def\BKM@@CalcParam#1#2#3\@nil{%
+  \ifx\calc#1%
+    \@ifundefined{calc at assign@dimen}{%
+      \@ifundefined{dimexpr}{%
+        \setlength{\dimen@}{#2}%
+      }{%
+        \setlength{\dimen@}{\dimexpr#2\relax}%
+      }%
+    }{%
+      \setlength{\dimen@}{#2}%
+    }%
+    \dimen at .99626\dimen@
+    \edef\BKM at param{\strip at pt\dimen@}%
+    \expandafter\endgroup
+    \expandafter\def\expandafter\BKM at param\expandafter{\BKM at param}%
+  \else
+    \endgroup
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Option \xoption{atend}}
+%
+%    \begin{macrocode}
+\DeclareBoolOption{atend}
+\g at addto@macro\BKM at DisableOptions{%
+  \DisableKeyvalOption[action=warning,package=bookmark]%
+      {BKM}{atend}%
+}
+%    \end{macrocode}
+%
+% \subsubsection{Option \xoption{style}}
+%
+%    \begin{macro}{\bookmarkdefinestyle}
+%    \begin{macrocode}
+\newcommand*{\bookmarkdefinestyle}[2]{%
+  \@ifundefined{BKM at style@#1}{%
+  }{%
+    \PackageInfo{bookmark}{Redefining style `#1'}%
+  }%
+  \@namedef{BKM at style@#1}{#2}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\define at key{BKM}{style}{%
+  \BKM at StyleCall{#1}%
+}
+\newif\ifBKM at ok
+%    \end{macrocode}
+%    \begin{macro}{\BKM at StyleCall}
+%    \begin{macrocode}
+\def\BKM at StyleCall#1{%
+  \@ifundefined{BKM at style@#1}{%
+    \PackageWarning{bookmark}{%
+      Ignoring unknown style `#1'%
+    }%
+  }{%
+%    \end{macrocode}
+%    Check style stack.
+%    \begin{macrocode}
+    \BKM at oktrue
+    \edef\BKM at StyleCurrent{#1}%
+    \@onelevel at sanitize\BKM at StyleCurrent
+    \let\BKM at StyleEntry\BKM at StyleEntryCheck
+    \BKM at StyleStack
+    \ifBKM at ok
+      \expandafter\@firstofone
+    \else
+      \PackageError{bookmark}{%
+        Ignoring recursive call of style `\BKM at StyleCurrent'%
+      }\@ehc
+      \expandafter\@gobble
+    \fi
+    {%
+%    \end{macrocode}
+%    Push current style on stack.
+%    \begin{macrocode}
+      \let\BKM at StyleEntry\relax
+      \edef\BKM at StyleStack{%
+        \BKM at StyleEntry{\BKM at StyleCurrent}%
+        \BKM at StyleStack
+      }%
+%    \end{macrocode}
+%   Call style.
+%    \begin{macrocode}
+      \expandafter\expandafter\expandafter\bookmarksetup
+      \expandafter\expandafter\expandafter{%
+        \csname BKM at style@\BKM at StyleCurrent\endcsname
+      }%
+%    \end{macrocode}
+%    Pop current style from stack.
+%    \begin{macrocode}
+      \BKM at StyleStackPop
+    }%
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at StyleStackPop}
+%    \begin{macrocode}
+\def\BKM at StyleStackPop{%
+  \let\BKM at StyleEntry\relax
+  \edef\BKM at StyleStack{%
+    \expandafter\@gobbletwo\BKM at StyleStack
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at StyleEntryCheck}
+%    \begin{macrocode}
+\def\BKM at StyleEntryCheck#1{%
+  \def\BKM at temp{#1}%
+  \ifx\BKM at temp\BKM at StyleCurrent
+    \BKM at okfalse
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at StyleStack}
+%    \begin{macrocode}
+\def\BKM at StyleStack{}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Options for source file location}
+%
+%    \begin{macrocode}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+%    \end{macrocode}
+%
+% \subsubsection{Hook support}
+%
+%    \begin{macro}{\BKM at hook}
+%    \begin{macrocode}
+\def\BKM at hook{}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\define at key{BKM}{addtohook}{%
+  \ltx at LocalAppendToMacro\BKM at hook{#1}%
+}
+%    \end{macrocode}
+%
+%    \begin{macro}{bookmarkget}
+%    \begin{macrocode}
+\newcommand*{\bookmarkget}[1]{%
+  \romannumeral0%
+  \ltx at ifundefined{bookmark@#1}{%
+    \ltx at space
+  }{%
+    \expandafter\expandafter\expandafter\ltx at space
+    \csname bookmark@#1\endcsname
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Driver setup and loading}
+%
+% \paragraph{Driver detection.}
+%
+%    \begin{macro}{\BKM at DefineDriverKey}
+%    \begin{macrocode}
+\def\BKM at DefineDriverKey#1{%
+  \define at key{BKM}{#1}[]{%
+    \def\BKM at driver{#1}%
+  }%
+  \g at addto@macro\BKM at DisableOptions{%
+    \DisableKeyvalOption[action=warning,package=bookmark]%
+        {BKM}{#1}%
+  }%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\BKM at DefineDriverKey{pdftex}
+\BKM at DefineDriverKey{dvips}
+\BKM at DefineDriverKey{dvipsone}
+\BKM at DefineDriverKey{textures}
+\BKM at DefineDriverKey{dvipdfm}
+\BKM at DefineDriverKey{dvipdfmx}
+\BKM at DefineDriverKey{xetex}
+\BKM at DefineDriverKey{vtex}
+\define at key{BKM}{dvipdfmx-outline-open}[true]{%
+  \expandafter\ifx\csname if#1\expandafter\endcsname
+                  \csname iftrue\endcsname
+    \chardef\SpecialDvipdfmxOutlineOpen\@ne
+  \else
+    \chardef\SpecialDvipdfmxOutlineOpen\z@
+  \fi
+}
+\g at addto@macro\BKM at DisableOptions{%
+  \DisableKeyvalOption{BKM}{dvipdfmx-outline-open}%
+}
+%    \end{macrocode}
+%    \begin{macro}{\bookmark at driver}
+%    \begin{macrocode}
+\def\bookmark at driver{\BKM at driver}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\InputIfFileExists{bookmark.cfg}{}{}
+%    \end{macrocode}
+%    \begin{macro}{\BookmarkDriverDefault}
+%    \begin{macrocode}
+\providecommand*{\BookmarkDriverDefault}{dvips}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at driver}
+% Lua\TeX\ and pdf\TeX\ share driver.
+%    \begin{macrocode}
+\ifpdf
+  \def\BKM at driver{pdftex}%
+  \ifx\pdfoutline\@undefined
+    \ifx\pdfextension\@undefined\else
+      \protected\def\pdfoutline{\pdfextension outline }
+    \fi
+  \fi
+\else
+  \ifxetex
+    \def\BKM at driver{dvipdfm}%
+  \else
+    \ifvtex
+      \def\BKM at driver{vtex}%
+    \else
+      \edef\BKM at driver{\BookmarkDriverDefault}%
+    \fi
+  \fi
+\fi
+%    \end{macrocode}
+%    \end{macro}
+%
+% \paragraph{Process options.}
+%
+%    \begin{macrocode}
+\ProcessKeyvalOptions*
+\BKM at DisableOptions
+%    \end{macrocode}
+%
+% \paragraph{Option \xoption{draft}}
+%
+%    \begin{macrocode}
+\ifBKM at draft
+  \PackageWarningNoLine{bookmark}{Draft mode on}%
+  \let\bookmarksetup\ltx at gobble
+  \let\BookmarkAtEnd\ltx at gobble
+  \let\bookmarkdefinestyle\ltx at gobbletwo
+  \let\bookmarkget\ltx at gobble
+  \let\pdfbookmark\ltx at undefined
+  \newcommand*{\pdfbookmark}[3][]{}%
+  \let\currentpdfbookmark\ltx at gobbletwo
+  \let\subpdfbookmark\ltx at gobbletwo
+  \let\belowpdfbookmark\ltx at gobbletwo
+  \newcommand*{\bookmark}[2][]{}%
+  \renewcommand*{\Hy at writebookmark}[5]{}%
+  \let\ReadBookmarks\relax
+  \let\BKM at DefGotoNameAction\ltx at gobbletwo % package `hypdestopt'
+  \expandafter\endinput
+\fi
+%    \end{macrocode}
+%
+% \paragraph{Driver validation and loading.}
+%
+%    \begin{macrocode}
+\newif\ifBKM at DvipdfmxOutlineOpen
+\ltx at IfUndefined{SpecialDvipdfmxOutlineOpen}{%
+  \ifxetex
+    \ifdim\number\XeTeXversion\XeTeXrevision in<0.9995in %
+    \else
+      \chardef\SpecialDvipdfmxOutlineOpen\ltx at one
+      \BKM at DvipdfmxOutlineOpentrue
+    \fi
+  \fi
+}{%
+  \ifnum\SpecialDvipdfmxOutlineOpen>\z@
+    \BKM at DvipdfmxOutlineOpentrue
+  \fi
+}
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\BKM at temp{dvipdfmx}%
+\ifx\BKM at temp\BKM at driver
+  \def\BKM at driver{dvipdfm}%
+\fi
+\def\BKM at temp{pdftex}%
+\ifpdf
+  \ifx\BKM at temp\BKM at driver
+  \else
+    \PackageWarningNoLine{bookmark}{%
+      Wrong driver `\BKM at driver', using `pdftex' instead%
+    }%
+    \let\BKM at driver\BKM at temp
+  \fi
+\else
+  \ifx\BKM at temp\BKM at driver
+    \PackageError{bookmark}{%
+      Wrong driver, pdfTeX is not running in PDF mode.\MessageBreak
+      Package loading is aborted%
+    }\@ehc
+    \expandafter\expandafter\expandafter\endinput
+  \fi
+  \def\BKM at temp{dvipdfm}%
+  \ifxetex
+    \ifx\BKM at temp\BKM at driver
+    \else
+      \PackageWarningNoLine{bookmark}{%
+        Wrong driver `\BKM at driver',\MessageBreak
+        using `dvipdfm' for XeTeX instead%
+      }%
+      \let\BKM at driver\BKM at temp
+    \fi
+  \else
+    \def\BKM at temp{vtex}%
+    \ifvtex
+      \ifx\BKM at temp\BKM at driver
+      \else
+        \PackageWarningNoLine{bookmark}{%
+          Wrong driver `\BKM at driver',\MessageBreak
+          using `vtex' for VTeX instead%
+        }%
+        \let\BKM at driver\BKM at temp
+      \fi
+    \else
+      \ifx\BKM at temp\BKM at 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 at driver.def}{}{%
+  \PackageError{bookmark}{%
+    Unsupported driver `\BKM at driver'.\MessageBreak
+    Package loading is aborted%
+  }\@ehc
+  \endinput
+}
+%    \end{macrocode}
+%
+% \subsubsection{Compatibility for \xpackage{hyperref}}
+%
+%    \begin{macro}{\pdfbookmark}
+%    \begin{macrocode}
+\let\pdfbookmark\ltx at undefined
+\newcommand*{\pdfbookmark}[3][0]{%
+  \bookmark[level=#1,dest={#3.#1}]{#2}%
+  \hyper at anchorstart{#3.#1}\hyper at anchorend
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\currentpdfbookmark}
+%    \begin{macrocode}
+\def\currentpdfbookmark{%
+  \pdfbookmark[\BKM at currentlevel]%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\subpdfbookmark}
+%    \begin{macrocode}
+\def\subpdfbookmark{%
+  \BKM at CalcExpr\BKM at CalcResult\BKM at currentlevel+1%
+  \expandafter\pdfbookmark\expandafter[\BKM at CalcResult]%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\belowpdfbookmark}
+%    \begin{macrocode}
+\def\belowpdfbookmark#1#2{%
+  \xdef\BKM at gtemp{\number\BKM at currentlevel}%
+  \subpdfbookmark{#1}{#2}%
+  \global\let\BKM at currentlevel\BKM at gtemp
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    Section number, text, label, level, file
+%    \begin{macro}{\Hy at writebookmark}
+%    \begin{macrocode}
+\def\Hy at writebookmark#1#2#3#4#5{%
+  \ifnum#4>\BKM at depth\relax
+  \else
+    \def\BKM at type{#5}%
+    \ifx\BKM at type\Hy at bookmarkstype
+      \begingroup
+        \ifBKM at numbered
+          \let\numberline\Hy at numberline
+          \let\booknumberline\Hy at numberline
+          \let\partnumberline\Hy at numberline
+          \let\chapternumberline\Hy at numberline
+        \else
+          \let\numberline\@gobble
+          \let\booknumberline\@gobble
+          \let\partnumberline\@gobble
+          \let\chapternumberline\@gobble
+        \fi
+        \bookmark[level=#4,dest={#3}]{#2}%
+      \endgroup
+    \fi
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\ReadBookmarks}
+%    \begin{macrocode}
+\let\ReadBookmarks\relax
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+% \subsection{Driver for dvipdfm}
+%
+%    \begin{macrocode}
+%<*dvipdfm>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-dvipdfm.def}%
+  [2019/12/03 v1.28 bookmark driver for dvipdfm (HO)]%
+%    \end{macrocode}
+%
+%    \begin{macro}{\BKM at id}
+%    \begin{macrocode}
+\newcount\BKM at id
+\BKM at id=\z@
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\BKM at 0}
+%    \begin{macrocode}
+\@namedef{BKM at 0}{000}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\ifBKM at sw}
+%    \begin{macrocode}
+\newif\ifBKM at sw
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\bookmark}
+%    \begin{macrocode}
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \def\BKM at abslevel{1}%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}\BKM at abslevel
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \BKM at CalcExpr\BKM at abslevel\BKM at x@abslevel+1%
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}\BKM at abslevel
+            }%
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \csname HyPsd at XeTeXBigCharstrue\endcsname
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \let\BKM at action\@empty
+      \ifx\BKM at gotor\@empty
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at named\@empty
+            \ifx\BKM at rawaction\@empty
+              \ifx\BKM at uri\@empty
+                \ifx\BKM at page\@empty
+                  \PackageError{bookmark}{Missing action}\@ehc
+                  \edef\BKM at action{/Dest[@page1/Fit]}%
+                \else
+                  \ifx\BKM at view\@empty
+                    \def\BKM at view{Fit}%
+                  \fi
+                  \edef\BKM at action{/Dest[@page\BKM at page/\BKM at view]}%
+                \fi
+              \else
+                \BKM at EscapeString\BKM at uri
+                \edef\BKM at action{%
+                  /A<<%
+                    /S/URI%
+                    /URI(\BKM at uri)%
+                  >>%
+                }%
+              \fi
+            \else
+              \edef\BKM at action{/A<<\BKM at rawaction>>}%
+            \fi
+          \else
+            \BKM at EscapeName\BKM at named
+            \edef\BKM at action{%
+              /A<</S/Named/N/\BKM at named>>%
+            }%
+          \fi
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{%
+            /A<<%
+              /S/GoTo%
+              /D(\BKM at dest)%
+            >>%
+          }%
+        \fi
+      \else
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at page\@empty
+            \def\BKM at page{0}%
+          \else
+            \BKM at CalcExpr\BKM at page\BKM at page-1%
+          \fi
+          \ifx\BKM at view\@empty
+            \def\BKM at view{Fit}%
+          \fi
+          \edef\BKM at action{/D[\BKM at page/\BKM at view]}%
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{/D(\BKM at dest)}%
+        \fi
+        \BKM at EscapeString\BKM at gotor
+        \edef\BKM at action{%
+          /A<<%
+            /S/GoToR%
+            /F(\BKM at gotor)%
+            \BKM at action
+          >>%
+        }%
+      \fi
+      \special{pdf:%
+        out \ifBKM at DvipdfmxOutlineOpen
+              [%
+              \ifBKM at open
+                \ifnum\BKM at level<%
+                    \expandafter\ltx at firstofone\expandafter
+                    {\number\BKM at openlevel} %
+                \else
+                  -%
+                \fi
+              \else
+                -%
+              \fi
+              ] %
+            \fi
+            \BKM at abslevel
+        <<%
+          /Title(\BKM at title)%
+          \ifx\BKM at color\@empty
+          \else
+            /C[\BKM at color]%
+          \fi
+          \ifnum\BKM at FLAGS>\z@
+            /F \BKM at FLAGS
+          \fi
+          \BKM at action
+        >>%
+      }%
+    \endgroup
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at getx}
+%    \begin{macrocode}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@abslevel{#3}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macrocode}
+%</dvipdfm>
+%    \end{macrocode}
+%
+% \subsection{Driver for \hologo{VTeX}}
+%
+%    \begin{macrocode}
+%<*vtex>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-vtex.def}%
+  [2019/12/03 v1.28 bookmark driver for VTeX (HO)]%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ifvtexpdf
+\else
+  \PackageWarningNoLine{bookmark}{%
+    The VTeX driver only supports PDF mode%
+  }%
+\fi
+%    \end{macrocode}
+%
+%    \begin{macro}{\BKM at id}
+%    \begin{macrocode}
+\newcount\BKM at id
+\BKM at id=\z@
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\BKM at 0}
+%    \begin{macrocode}
+\@namedef{BKM at 0}{00}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\ifBKM at sw}
+%    \begin{macrocode}
+\newif\ifBKM at sw
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\bookmark}
+%    \begin{macrocode}
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \def\BKM at parent{0}%
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \let\BKM at parent\BKM at prev
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}%
+            }%
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \BKM at vtex@title
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \let\BKM at action\@empty
+      \ifx\BKM at gotor\@empty
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at named\@empty
+            \ifx\BKM at rawaction\@empty
+              \ifx\BKM at uri\@empty
+                \ifx\BKM at page\@empty
+                  \PackageError{bookmark}{Missing action}\@ehc
+                  \def\BKM at action{!1}%
+                \else
+                  \edef\BKM at action{!\BKM at page}%
+                \fi
+              \else
+                \BKM at EscapeString\BKM at uri
+                \edef\BKM at action{%
+                  <u=%
+                    /S/URI%
+                    /URI(\BKM at uri)%
+                  >%
+                }%
+              \fi
+            \else
+              \edef\BKM at action{<u=\BKM at rawaction>}%
+            \fi
+          \else
+            \BKM at EscapeName\BKM at named
+            \edef\BKM at action{%
+              <u=%
+                /S/Named%
+                /N/\BKM at named
+              >%
+            }%
+          \fi
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{\BKM at dest}%
+        \fi
+      \else
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at page\@empty
+            \def\BKM at page{1}%
+          \fi
+          \ifx\BKM at view\@empty
+            \def\BKM at view{Fit}%
+          \fi
+          \edef\BKM at action{/D[\BKM at page/\BKM at view]}%
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{/D(\BKM at dest)}%
+        \fi
+        \BKM at EscapeString\BKM at gotor
+        \edef\BKM at action{%
+          <u=%
+            /S/GoToR%
+            /F(\BKM at gotor)%
+            \BKM at action
+          >>%
+        }%
+      \fi
+      \ifx\BKM at color\@empty
+        \let\BKM at RGBcolor\@empty
+      \else
+        \expandafter\BKM at toRGB\BKM at color\@nil
+      \fi
+      \special{%
+        !outline \BKM at action;%
+        p=\BKM at parent,%
+        i=\number\BKM at id,%
+        s=%
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              o%
+            \else
+              c%
+            \fi
+          \else
+            c%
+          \fi,%
+        \ifx\BKM at RGBcolor\@empty
+        \else
+          c=\BKM at RGBcolor,%
+        \fi
+        \ifnum\BKM at FLAGS>\z@
+          f=\BKM at FLAGS,%
+        \fi
+        t=\BKM at title
+      }%
+    \endgroup
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at getx}
+%    \begin{macrocode}
+\def\BKM at getx#1#2{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at toRGB}
+%    \begin{macrocode}
+\def\BKM at toRGB#1 #2 #3\@nil{%
+  \let\BKM at RGBcolor\@empty
+  \BKM at toRGBComponent{#1}%
+  \BKM at toRGBComponent{#2}%
+  \BKM at toRGBComponent{#3}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at toRGBComponent}
+%    \begin{macrocode}
+\def\BKM at 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 at ii=\dimen@
+      \divide\dimen at ii by 16\relax
+      \edef\BKM at RGBcolor{%
+        \BKM at RGBcolor
+        \BKM at toHexDigit\dimen at ii
+      }%
+      \dimen at ii=16\dimen at ii
+      \advance\dimen at -\dimen at ii
+      \edef\BKM at RGBcolor{%
+        \BKM at RGBcolor
+        \BKM at toHexDigit\dimen@
+      }%
+    \else
+      \edef\BKM at RGBcolor{\BKM at RGBcolor FF}%
+    \fi
+  \else
+    \edef\BKM at RGBcolor{\BKM at RGBcolor00}%
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at toHexDigit}
+%    \begin{macrocode}
+\def\BKM at toHexDigit#1{%
+  \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}
+%    \end{macro}
+%    \begin{macrocode}
+\begingroup
+  \catcode`\|=0 %
+  \catcode`\\=12 %
+%    \end{macrocode}
+%    \begin{macro}{\BKM at vtex@title}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@title{%
+    |@onelevel at sanitize|BKM at title
+    |edef|BKM at title{|expandafter|BKM at vtex@leftparen|BKM at title\(|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@rightparen|BKM at title\)|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@zero|BKM at title\0|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@one|BKM at title\1|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@two|BKM at title\2|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@three|BKM at title\3|@nil}%
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at vtex@leftparen}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@leftparen#1\(#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      (%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@leftparen#2|@nil
+      }%
+    |fi
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at vtex@rightparen}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@rightparen#1\)#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      )%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@rightparen#2|@nil
+      }%
+    |fi
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at vtex@zero}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@zero#1\0#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char0%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@zero#2|@nil
+      }%
+    |fi
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at vtex@one}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@one#1\1#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char1%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@one#2|@nil
+      }%
+    |fi
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at vtex@two}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@two#1\2#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char2%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@two#2|@nil
+      }%
+    |fi
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at vtex@three}
+%    \begin{macrocode}
+  |gdef|BKM at vtex@three#1\3#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char3%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@three#2|@nil
+      }%
+    |fi
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+|endgroup
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%</vtex>
+%    \end{macrocode}
+%
+% \subsection{Driver for \hologo{pdfTeX}}
+%
+%    \begin{macrocode}
+%<*pdftex>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-pdftex.def}%
+  [2019/12/03 v1.28 bookmark driver for pdfTeX (HO)]%
+%    \end{macrocode}
+%
+%    \begin{macro}{\BKM at DO@entry}
+%    \begin{macrocode}
+\def\BKM at DO@entry#1#2{%
+  \begingroup
+    \kvsetkeys{BKM at DO}{#1}%
+    \def\BKM at DO@title{#2}%
+    \ifx\BKM at DO@srcfile\@empty
+    \else
+      \BKM at UnescapeHex\BKM at DO@srcfile
+    \fi
+    \BKM at UnescapeHex\BKM at DO@title
+    \expandafter\expandafter\expandafter\BKM at getx
+        \csname BKM@\BKM at DO@id\endcsname\@empty\@empty
+    \let\BKM at attr\@empty
+    \ifx\BKM at DO@flags\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/F \BKM at DO@flags}%
+    \fi
+    \ifx\BKM at DO@color\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/C[\BKM at DO@color]}%
+    \fi
+    \ifx\BKM at attr\@empty
+    \else
+      \edef\BKM at attr{attr{\BKM at attr}}%
+    \fi
+    \let\BKM at action\@empty
+    \ifx\BKM at DO@gotor\@empty
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@named\@empty
+          \ifx\BKM at DO@rawaction\@empty
+            \ifx\BKM at DO@uri\@empty
+              \ifx\BKM at DO@page\@empty
+                \PackageError{bookmark}{%
+                  Missing action\BKM at SourceLocation
+                }\@ehc
+                \edef\BKM at action{goto page1{/Fit}}%
+              \else
+                \ifx\BKM at DO@view\@empty
+                  \def\BKM at DO@view{Fit}%
+                \fi
+                \edef\BKM at action{goto page\BKM at DO@page{/\BKM at DO@view}}%
+              \fi
+            \else
+              \BKM at UnescapeHex\BKM at DO@uri
+              \BKM at EscapeString\BKM at DO@uri
+              \edef\BKM at action{user{<</S/URI/URI(\BKM at DO@uri)>>}}%
+            \fi
+          \else
+            \BKM at UnescapeHex\BKM at DO@rawaction
+            \edef\BKM at action{%
+              user{%
+                <<%
+                  \BKM at DO@rawaction
+                >>%
+              }%
+            }%
+          \fi
+        \else
+          \BKM at EscapeName\BKM at DO@named
+          \edef\BKM at action{%
+            user{<</S/Named/N/\BKM at DO@named>>}%
+          }%
+        \fi
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at DefGotoNameAction\BKM at action\BKM at DO@dest
+      \fi
+    \else
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@page\@empty
+          \def\BKM at DO@page{0}%
+        \else
+          \BKM at CalcExpr\BKM at DO@page\BKM at DO@page-1%
+        \fi
+        \ifx\BKM at DO@view\@empty
+          \def\BKM at DO@view{Fit}%
+        \fi
+        \edef\BKM at action{/D[\BKM at DO@page/\BKM at DO@view]}%
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{/D(\BKM at DO@dest)}%
+      \fi
+      \BKM at UnescapeHex\BKM at DO@gotor
+      \BKM at EscapeString\BKM at DO@gotor
+      \edef\BKM at action{%
+        user{%
+          <<%
+            /S/GoToR%
+            /F(\BKM at DO@gotor)%
+            \BKM at action
+          >>%
+        }%
+      }%
+    \fi
+    \pdfoutline\BKM at attr\BKM at action
+                count\ifBKM at DO@open\else-\fi\BKM at x@childs
+                {\BKM at DO@title}%
+  \endgroup
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at DefGotoNameAction}
+%    Macro \cs{BKM at DefGotoNameAction} is a hook for
+%    package \xpackage{hypdestopt}.
+%    \begin{macrocode}
+\def\BKM at DefGotoNameAction#1#2{%
+  \BKM at EscapeString\BKM at DO@dest
+  \edef#1{goto name{#2}}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%</pdftex>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<*pdftex|pdfmark>
+%    \end{macrocode}
+%    \begin{macro}{\BKM at SourceLocation}
+%    \begin{macrocode}
+\def\BKM at SourceLocation{%
+  \ifx\BKM at DO@srcfile\@empty
+    \ifx\BKM at DO@srcline\@empty
+    \else
+      .\MessageBreak
+      Source: line \BKM at DO@srcline
+    \fi
+  \else
+    \ifx\BKM at DO@srcline\@empty
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile'%
+    \else
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile', line \BKM at DO@srcline
+    \fi
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%</pdftex|pdfmark>
+%    \end{macrocode}
+%
+% \subsection{Drivers with pdfmark specials}
+%
+% \subsubsection{Driver dvips}
+%
+%    \begin{macrocode}
+%<*dvips>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-dvips.def}%
+  [2019/12/03 v1.28 bookmark driver for dvips (HO)]%
+%    \end{macrocode}
+%    \begin{macro}{\BKM at PSHeaderFile}
+%    \begin{macrocode}
+\def\BKM at PSHeaderFile#1{%
+  \special{header=#1}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%</dvips>
+%    \end{macrocode}
+%
+% \subsubsection{Driver dvipsone}
+%
+%    \begin{macrocode}
+%<*dvipsone>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-dvipsone.def}%
+  [2019/12/03 v1.28 bookmark driver for dvipsone (HO)]%
+%    \end{macrocode}
+%    \begin{macro}{\BKM at PSHeaderFile}
+%    \begin{macrocode}
+\def\BKM at PSHeaderFile#1{%
+  \special{header=#1}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%</dvipsone>
+%    \end{macrocode}
+%
+% \subsubsection{Driver textures}
+%
+%    \begin{macrocode}
+%<*textures>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-textures.def}%
+  [2019/12/03 v1.28 bookmark driver for textures (HO)]%
+%    \end{macrocode}
+%    \begin{macro}{\BKM at PSHeaderFile}
+%    \begin{macrocode}
+\def\BKM at PSHeaderFile#1{%
+  \special{prePostScriptfile #1}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%</textures>
+%    \end{macrocode}
+%
+% \subsubsection{Common part}
+%
+%    \begin{macrocode}
+%<*pdfmark>
+%    \end{macrocode}
+%    \begin{macro}{\BKM at filename}
+%    \begin{macrocode}
+\def\BKM at filename{\jobname.out.ps}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\BKM at PSHeaderFile\BKM at filename
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\RequirePackage{atveryend}[2009/12/07]
+\AfterLastShipout{\BKM at pdfmark@out}
+%    \end{macrocode}
+%
+%    \begin{macro}{\BKM at pdfmark@out}
+%    Do not use package \xpackage{rerunfilecheck} here, because
+%    the file \cs{BKM at filename} is not read during the \hologo{TeX} run.
+%    \begin{macrocode}
+\def\BKM at pdfmark@out{%
+  \if at filesw
+    \newwrite\BKM at file
+    \immediate\openout\BKM at file=\BKM at filename\relax
+    \BKM at write{\@percentchar!}%
+    \BKM at write{/pdfmark where{pop}}%
+    \BKM at write{%
+      {%
+        /globaldict where{pop globaldict}{userdict}ifelse%
+        /pdfmark/cleartomark load put%
+      }%
+    }%
+    \BKM at write{ifelse}%
+  \else
+    \let\BKM at write\@gobble
+    \let\BKM at DO@entry\@gobbletwo
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at write}
+%    \begin{macrocode}
+\def\BKM at write#{%
+  \immediate\write\BKM at file
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\BKM at DO@entry}
+%    The specification for pdfmark says that |/Color| is the
+%    name of the key for color, however ghostscript only passes
+%    the key into the PDF file, thus the key name must be |/C|.
+%    \begin{macrocode}
+\def\BKM at DO@entry#1#2{%
+  \begingroup
+    \kvsetkeys{BKM at DO}{#1}%
+    \ifx\BKM at DO@srcfile\@empty
+    \else
+      \BKM at UnescapeHex\BKM at DO@srcfile
+    \fi
+    \def\BKM at DO@title{#2}%
+    \BKM at UnescapeHex\BKM at DO@title
+    \expandafter\expandafter\expandafter\BKM at getx
+        \csname BKM@\BKM at DO@id\endcsname\@empty\@empty
+    \let\BKM at attr\@empty
+    \ifx\BKM at DO@flags\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/F \BKM at DO@flags}%
+    \fi
+    \ifx\BKM at DO@color\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/C[\BKM at DO@color]}%
+    \fi
+    \let\BKM at action\@empty
+    \ifx\BKM at DO@gotor\@empty
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@named\@empty
+          \ifx\BKM at DO@rawaction\@empty
+            \ifx\BKM at DO@uri\@empty
+              \ifx\BKM at DO@page\@empty
+                \PackageError{bookmark}{%
+                  Missing action\BKM at SourceLocation
+                }\@ehc
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page 1%
+                  /View[/Fit]%
+                }%
+              \else
+                \ifx\BKM at DO@view\@empty
+                  \def\BKM at DO@view{Fit}%
+                \fi
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page \BKM at DO@page
+                  /View[/\BKM at DO@view]%
+                }%
+              \fi
+            \else
+              \BKM at UnescapeHex\BKM at DO@uri
+              \BKM at EscapeString\BKM at DO@uri
+              \edef\BKM at action{%
+                /Action<<%
+                  /Subtype/URI%
+                  /URI(\BKM at DO@uri)%
+                >>%
+              }%
+            \fi
+          \else
+            \BKM at UnescapeHex\BKM at DO@rawaction
+            \edef\BKM at action{%
+              /Action<<%
+                \BKM at DO@rawaction
+              >>%
+            }%
+          \fi
+        \else
+          \BKM at EscapeName\BKM at DO@named
+          \edef\BKM at action{%
+            /Action<<%
+              /Subtype/Named%
+              /N/\BKM at DO@named
+            >>%
+          }%
+        \fi
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Action/GoTo%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+    \else
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@page\@empty
+          \def\BKM at DO@page{1}%
+        \fi
+        \ifx\BKM at DO@view\@empty
+          \def\BKM at DO@view{Fit}%
+        \fi
+        \edef\BKM at action{%
+          /Page \BKM at DO@page
+          /View[/\BKM at DO@view]%
+        }%
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+      \BKM at UnescapeHex\BKM at DO@gotor
+      \BKM at EscapeString\BKM at DO@gotor
+      \edef\BKM at action{%
+        /Action/GoToR%
+        /File(\BKM at DO@gotor)%
+        \BKM at action
+      }%
+    \fi
+    \BKM at write{[}%
+    \BKM at write{/Title(\BKM at DO@title)}%
+    \ifnum\BKM at x@childs>\z@
+      \BKM at write{/Count \ifBKM at DO@open\else-\fi\BKM at x@childs}%
+    \fi
+    \ifx\BKM at attr\@empty
+    \else
+      \BKM at write{\BKM at attr}%
+    \fi
+    \BKM at write{\BKM at action}%
+    \BKM at write{/OUT pdfmark}%
+  \endgroup
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+%</pdfmark>
+%    \end{macrocode}
+%
+% \subsection{Common part for \xoption{pdftex} and \xoption{pdfmark}}
+%
+%    \begin{macrocode}
+%<*pdftex|pdfmark>
+%    \end{macrocode}
+%
+% \subsubsection{Write auxiliary file}
+%
+%    \begin{macrocode}
+\RequirePackage{auxhook}
+%    \end{macrocode}
+%    \begin{macrocode}
+\AddLineBeginMainAux{%
+  \string\providecommand\string\BKM at entry[2]{}%
+}
+%    \end{macrocode}
+%
+%    \begin{macro}{\BKM at id}
+%    \begin{macrocode}
+\newcount\BKM at id
+\BKM at id=\z@
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\BKM at 0}
+%    \begin{macrocode}
+\@namedef{BKM at 0}{000}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\ifBKM at sw}
+%    \begin{macrocode}
+\newif\ifBKM at sw
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\bookmark}
+%    \begin{macrocode}
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \BKM at InitSourceLocation
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \ifx\BKM at srcfile\@empty
+      \else
+        \BKM at EscapeHex\BKM at srcfile
+      \fi
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}0%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}0%
+            }%
+            \ifnum\BKM at prev>\z@
+              \BKM at CalcExpr\BKM at CalcResult\BKM at x@childs+1%
+              \expandafter\xdef\csname BKM@\BKM at prev\endcsname{%
+                {\BKM at x@parent}{\BKM at x@level}{\BKM at CalcResult}%
+              }%
+            \fi
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \csname BKM at HypDestOptHook\endcsname
+      \BKM at EscapeHex\BKM at dest
+      \BKM at EscapeHex\BKM at uri
+      \BKM at EscapeHex\BKM at gotor
+      \BKM at EscapeHex\BKM at rawaction
+      \BKM at EscapeHex\BKM at title
+      \immediate\write\@mainaux{%
+        \string\BKM at entry{%
+          id=\number\BKM at id
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              ,open%
+            \fi
+          \fi
+          \BKM at auxentry{dest}%
+          \BKM at auxentry{named}%
+          \BKM at auxentry{uri}%
+          \BKM at auxentry{gotor}%
+          \BKM at auxentry{page}%
+          \BKM at auxentry{view}%
+          \BKM at auxentry{rawaction}%
+          \BKM at auxentry{color}%
+          \ifnum\BKM at FLAGS>\z@
+            ,flags=\BKM at FLAGS
+          \fi
+          \BKM at auxentry{srcline}%
+          \BKM at auxentry{srcfile}%
+        }{\BKM at title}%
+      }%
+    \endgroup
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at getx}
+%    \begin{macrocode}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@childs{#3}%
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at auxentry}
+%    \begin{macrocode}
+\def\BKM at auxentry#1{%
+  \expandafter\ifx\csname BKM@#1\endcsname\@empty
+  \else
+    ,#1={\csname BKM@#1\endcsname}%
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%
+%    \begin{macro}{\BKM at InitSourceLocation}
+%    \begin{macrocode}
+\def\BKM at InitSourceLocation{%
+  \edef\BKM at srcline{\the\inputlineno}%
+  \BKM at LuaTeX@InitFile
+  \ifx\BKM at srcfile\@empty
+    \ltx at IfUndefined{currfilepath}{}{%
+      \edef\BKM at srcfile{\currfilepath}%
+    }%
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\BKM at LuaTeX@InitFile}
+%    \begin{macrocode}
+\ifluatex
+  \ifnum\luatexversion>36 %
+    \def\BKM at LuaTeX@InitFile{%
+      \begingroup
+        \ltx at LocToksA={}%
+      \edef\x{\endgroup
+        \def\noexpand\BKM at srcfile{%
+          \the\expandafter\ltx at LocToksA
+          \directlua{%
+             if status and status.filename then %
+               tex.settoks('ltx at LocToksA', status.filename)%
+             end%
+          }%
+        }%
+      }\x
+    }%
+  \else
+    \let\BKM at LuaTeX@InitFile\relax
+  \fi
+\else
+  \let\BKM at LuaTeX@InitFile\relax
+\fi
+%    \end{macrocode}
+%    \end{macro}
+%
+% \subsubsection{Read auxiliary data}
+%
+%    \begin{macrocode}
+\SetupKeyvalOptions{family=BKM at DO,prefix=BKM at DO@}
+\DeclareStringOption[0]{id}
+\DeclareBoolOption{open}
+\DeclareStringOption{flags}
+\DeclareStringOption{color}
+\DeclareStringOption{dest}
+\DeclareStringOption{named}
+\DeclareStringOption{uri}
+\DeclareStringOption{gotor}
+\DeclareStringOption{page}
+\DeclareStringOption{view}
+\DeclareStringOption{rawaction}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \let\BKM at entry\BKM at DO@entry
+}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%</pdftex|pdfmark>
+%    \end{macrocode}
+%
+% \subsection{Option \xoption{atend}}
+%
+% \subsubsection{Hook}
+%
+%    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
+%    \begin{macrocode}
+\ifBKM at atend
+\else
+%    \end{macrocode}
+%    \begin{macro}{\BookmarkAtEnd}
+%    This is a dummy definition that generates a warning
+%    if option \xoption{atend} has not been given.
+%    \begin{macrocode}
+  \newcommand{\BookmarkAtEnd}[1]{%
+    \PackageWarning{bookmark}{%
+      Ignored, because option `atend' is missing%
+    }%
+  }%
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+  \expandafter\endinput
+\fi
+%    \end{macrocode}
+%    \begin{macro}{\BookmarkAtEnd}
+%    \begin{macrocode}
+\newcommand*{\BookmarkAtEnd}{%
+  \g at addto@macro\BKM at EndHook
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
+\let\BKM at EndHook\@empty
+%    \end{macrocode}
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+% \subsubsection{Drivers using hooks at end of document}
+%
+%    The following drivers use package \xpackage{atveryend}'s
+%    \cs{AfterLastShipout}, because they still need the
+%    \xext{aux} file.
+%    \begin{itemize}
+%    \item
+%      Driver \xoption{pdftex} uses \cs{pdfoutline} that can
+%      be used after the last page.
+%    \item
+%      PostScript drivers such as
+%      \xoption{dvips} use an external PostScript header file
+%      for the bookmarks. File writing can be done after
+%      the last shipout page, but before the \xext{aux} file is closed.
+%    \end{itemize}
+%    \begin{macrocode}
+%<*pdftex|pdfmark>
+\ifBKM at atend
+  \AfterLastShipout{%
+    \BKM at EndHook
+  }%
+\fi
+%</pdftex|pdfmark>
+%    \end{macrocode}
+%
+% \subsubsection{Drivers using \cs{AtEndDvi}}
+%
+%    The other drivers implement \cs{bookmark} using \cs{special}
+%    commands. Thus the last bookmarks must be put on the last page,
+%    not afterwards.
+%    \cs{AtEndDocument} cannot be used, because it is too late, the
+%    last page can already be output. Therefore we use package
+%    \xpackage{atenddvi} that uses the help of packages \xpackage{atbegshi}
+%    and \xpackage{zref}. The argument of \cs{AtEndDvi} is put
+%    at the end of the last page. At least two \hologo{LaTeX} runs are necessary.
+%    \begin{macrocode}
+%<*dvipdfm|vtex>
+\ifBKM at atend
+  \RequirePackage{atenddvi}%
+  \AtEndDvi{\BKM at EndHook}%
+\fi
+%</dvipdfm|vtex>
+%    \end{macrocode}
+%
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\CTANpkg{bookmark}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/bookmark/bookmark.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/bookmark/bookmark.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `bookmark'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTANinstall{install/macros/latex/contrib/bookmark.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTANpkg{tds}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{bookmark.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+%   |unzip bookmark.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+%   \verb|tex bookmark.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+%   bookmark.sty & tex/latex/bookmark/bookmark.sty\\
+%   bkm-dvipdfm.def & tex/latex/bookmark/bkm-dvipdfm.def\\
+%   bkm-dvips.def & tex/latex/bookmark/bkm-dvips.def\\
+%   bkm-dvipsone.def & tex/latex/bookmark/bkm-dvipsone.def\\
+%   bkm-textures.def & tex/latex/bookmark/bkm-textures.def\\
+%   bkm-pdftex.def & tex/latex/bookmark/bkm-pdftex.def\\
+%   bkm-vtex.def & tex/latex/bookmark/bkm-vtex.def\\
+%   bookmark.pdf & doc/latex/bookmark/bookmark.pdf\\
+%   bookmark-example.tex & doc/latex/bookmark/bookmark-example.tex\\
+%   bookmark.dtx & source/latex/bookmark/bookmark.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+%   \begingroup
+%     \advance\linewidth by\leftmargin
+%     \advance\linewidth by\rightmargin
+%   \edef\x{\endgroup
+%     \def\noexpand\lw{\the\linewidth}^^A
+%   }\x
+%   \def\lwbox{^^A
+%     \leavevmode
+%     \hbox to \linewidth{^^A
+%       \kern-\leftmargin\relax
+%       \hss
+%       \usebox0
+%       \hss
+%       \kern-\rightmargin\relax
+%     }^^A
+%   }^^A
+%   \ifdim\wd0>\lw
+%     \sbox0{\small\t}^^A
+%     \ifdim\wd0>\linewidth
+%       \ifdim\wd0>\lw
+%         \sbox0{\footnotesize\t}^^A
+%         \ifdim\wd0>\linewidth
+%           \ifdim\wd0>\lw
+%             \sbox0{\scriptsize\t}^^A
+%             \ifdim\wd0>\linewidth
+%               \ifdim\wd0>\lw
+%                 \sbox0{\tiny\t}^^A
+%                 \ifdim\wd0>\linewidth
+%                   \lwbox
+%                 \else
+%                   \usebox0
+%                 \fi
+%               \else
+%                 \lwbox
+%               \fi
+%             \else
+%               \usebox0
+%             \fi
+%           \else
+%             \lwbox
+%           \fi
+%         \else
+%           \usebox0
+%         \fi
+%       \else
+%         \lwbox
+%       \fi
+%     \else
+%       \usebox0
+%     \fi
+%   \else
+%     \lwbox
+%   \fi
+% \else
+%   \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \TeX\,Live\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+%   \verb|latex \let\install=y\input{bookmark.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+%   \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex bookmark.dtx
+%makeindex -s gind.ist bookmark.idx
+%pdflatex bookmark.dtx
+%makeindex -s gind.ist bookmark.idx
+%pdflatex bookmark.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{thebibliography}{9}
+%
+% \bibitem{hyperref}
+%   Sebastian Rahtz, Heiko Oberdiek:
+%   \textit{The \xpackage{hyperref} package};
+%   2011/04/17 v6.82g;
+%   \CTANpkg{hyperref}
+%
+% \bibitem{currfile}
+%   Martin Scharrer:
+%   \textit{The \xpackage{currfile} package};
+%   2011/01/09 v0.4.
+%   \CTANpkg{currfile}
+%
+% \end{thebibliography}
+%
+% \begin{History}
+%   \begin{Version}{2007/02/19 v0.1}
+%   \item
+%     First experimental version.
+%   \end{Version}
+%   \begin{Version}{2007/02/20 v0.2}
+%   \item
+%     Option \xoption{startatroot} added.
+%   \item
+%     Dummies for \cs{pdf(un)escape...} commands added to get
+%     the package basically work for non-\hologo{pdfTeX} users.
+%   \end{Version}
+%   \begin{Version}{2007/02/21 v0.3}
+%   \item
+%     Dependency from \hologo{pdfTeX} 1.30 removed by using package
+%     \xpackage{pdfescape}.
+%   \end{Version}
+%   \begin{Version}{2007/02/22 v0.4}
+%   \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
+%     Implementation of option \xoption{depth} completed. Division names
+%     are supported, see \xpackage{hyperref}'s
+%     option \xoption{bookmarksdepth}.
+%   \item
+%     \xpackage{hyperref}'s options \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}
+%   \begin{Version}{2007/03/07 v0.7}
+%   \item
+%     Dependency from \hologo{eTeX} removed.
+%   \end{Version}
+%   \begin{Version}{2007/04/09 v0.8}
+%   \item
+%     Option \xoption{atend} added.
+%   \item
+%     Option \xoption{rgbcolor} removed.
+%     \verb|rgbcolor=<r> <g> <b>| can be replaced by
+%     \verb|color=[rgb]{<r>,<g>,<b>}|.
+%   \item
+%     Support of recent cvs version (2007-03-29) of dvipdfmx
+%     that extends the \cs{special} for bookmarks to specify
+%     open outline entries. Option \xoption{dvipdfmx-outline-open}
+%     or \cs{SpecialDvipdfmxOutlineOpen} notify the package.
+%   \end{Version}
+%   \begin{Version}{2007/04/25 v0.9}
+%   \item
+%     The syntax of \cs{special} of dvipdfmx, if feature
+%     \xoption{dvipdfmx-outline-open} is enabled, has changed.
+%     Now cvs version 2007-04-25 is needed.
+%   \end{Version}
+%   \begin{Version}{2007/05/29 v1.0}
+%   \item
+%     Bug fix in code for second parameter of XYZ.
+%   \end{Version}
+%   \begin{Version}{2007/07/13 v1.1}
+%   \item
+%     Fix for pdfmark with GoToR action.
+%   \end{Version}
+%   \begin{Version}{2007/09/25 v1.2}
+%   \item
+%     pdfmark driver respects \cs{nofiles}.
+%   \end{Version}
+%   \begin{Version}{2008/08/08 v1.3}
+%   \item
+%     Package \xpackage{flags} replaced by package \xpackage{bitset}.
+%     Now flags are also supported without \hologo{eTeX}.
+%   \item
+%     Hook for package \xpackage{hypdestopt} added.
+%   \end{Version}
+%   \begin{Version}{2008/09/13 v1.4}
+%   \item
+%     Fix for bug introduced in v1.3, package \xpackage{flags} is one-based,
+%     but package \xpackage{bitset} is zero-based. Thus options \xoption{bold}
+%     and \xoption{italic} are wrong in v1.3. (Daniel M\"ullner)
+%   \end{Version}
+%   \begin{Version}{2009/08/13 v1.5}
+%   \item
+%     Except for driver options the other options are now local options.
+%     This resolves a problem with KOMA-Script v3.00 and its option \xoption{open}.
+%   \end{Version}
+%   \begin{Version}{2009/12/06 v1.6}
+%   \item
+%     Use of package \xpackage{atveryend} for drivers \xoption{pdftex}
+%     and \xoption{pdfmark}.
+%   \end{Version}
+%   \begin{Version}{2009/12/07 v1.7}
+%   \item
+%     Use of package \xpackage{atveryend} fixed.
+%   \end{Version}
+%   \begin{Version}{2009/12/17 v1.8}
+%   \item
+%     Support of \xpackage{hyperref} 2009/12/17 v6.79v for \hologo{XeTeX}.
+%   \end{Version}
+%   \begin{Version}{2010/03/30 v1.9}
+%   \item
+%     Package name in an error message fixed.
+%   \end{Version}
+%   \begin{Version}{2010/04/03 v1.10}
+%   \item
+%     Option \xoption{style} and macro \cs{bookmarkdefinestyle} added.
+%   \item
+%     Hook support with option \xoption{addtohook} added.
+%   \item
+%     \cs{bookmarkget} added.
+%   \end{Version}
+%   \begin{Version}{2010/04/04 v1.11}
+%   \item
+%     Bug fix (introduced in v1.10).
+%   \end{Version}
+%   \begin{Version}{2010/04/08 v1.12}
+%   \item
+%     Requires \xpackage{ltxcmds} 2010/04/08.
+%   \end{Version}
+%   \begin{Version}{2010/07/23 v1.13}
+%   \item
+%     Support for \xclass{memoir}'s \cs{booknumberline} added.
+%   \end{Version}
+%   \begin{Version}{2010/09/02 v1.14}
+%   \item
+%     (Local) options \xoption{draft} and \xoption{final} added.
+%   \end{Version}
+%   \begin{Version}{2010/09/25 v1.15}
+%   \item
+%     Fix for option \xoption{dvipdfmx-outline-open}.
+%   \item
+%     Option \xoption{dvipdfmx-outline-open} is set automatically,
+%     if XeTeX $\geq$ 0.9995 is detected.
+%   \end{Version}
+%   \begin{Version}{2010/10/19 v1.16}
+%   \item
+%     Option `startatroot' now acts globally.
+%   \item
+%     Option `level' also accepts names the same way as option `depth'.
+%   \end{Version}
+%   \begin{Version}{2010/10/25 v1.17}
+%   \item
+%     \cs{bookmarksetupnext} added.
+%   \item
+%     Using \cs{kvsetkeys} of package \xpackage{kvsetkeys}, because
+%     \cs{setkeys} of package \xpackage{keyval} is not reentrant.
+%     This can cause problems (unknown keys) with older versions of
+%     hyperref that also uses \cs{setkeys} (found by GL).
+%   \end{Version}
+%   \begin{Version}{2010/11/05 v1.18}
+%   \item
+%     Use of \cs{pdf at ifdraftmode} of package \xpackage{pdftexcmds} for
+%     the default of option \xoption{draft}.
+%   \end{Version}
+%   \begin{Version}{2011/03/20 v1.19}
+%   \item
+%     Use of \cs{dimexpr} fixed, if \hologo{eTeX} is not used.
+%     (Bug found by Martin M\"unch.)
+%   \item
+%     Fix in documentation. Also layout options work without \hologo{eTeX}.
+%   \end{Version}
+%   \begin{Version}{2011/04/13 v1.20}
+%   \item
+%     Bug fix: \cs{BKM at SetDepth} renamed to \cs{BKM at SetDepthOrLevel}.
+%   \end{Version}
+%   \begin{Version}{2011/04/21 v1.21}
+%   \item
+%     Some support for file name and line number in error messages
+%     at end of document (pdfTeX and pdfmark based drivers).
+%   \end{Version}
+%   \begin{Version}{2011/05/13 v1.22}
+%   \item
+%     Change of version 2010/11/05 v1.18 reverted, because otherwise
+%     draftmode disables some \xext{aux} file entries.
+%   \end{Version}
+%   \begin{Version}{2011/09/19 v1.23}
+%   \item
+%     Some \cs{renewcommand}s changed to \cs{def} to avoid trouble
+%     if the commands are not defined, because hyperref stopped early.
+%   \end{Version}
+%   \begin{Version}{2011/12/02 v1.24}
+%   \item
+%     Small optimization in \cs{BKM at toHexDigit}.
+%   \end{Version}
+%   \begin{Version}{2016/05/16 v1.25}
+%   \item
+%     Documentation updates.
+%   \end{Version}
+%   \begin{Version}{2016/05/17 v1.26}
+%   \item
+%     define \cs{pdfbookmark} to allow pdftex driver to be used with Lua\TeX.
+%   \end{Version}
+%   \begin{Version}{2019/06/04 v1.27}
+%   \item
+%     unknown style options are ignored (issue 67)
+%   \end{Version}
+
+%   \begin{Version}{2019/12/03 v1.28}
+%   \item
+%     Documentation updates.
+%   \item adjust package loading (all required packages already loade
+%     by \xpackage{hyperref}).
+%   \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/bookmark/bookmark.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,191 @@
+%%
+%% This is file `bkm-dvipdfm.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `dvipdfm')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-dvipdfm.def}%
+  [2019/12/03 v1.28 bookmark driver for dvipdfm (HO)]%
+\newcount\BKM at id
+\BKM at id=\z@
+\@namedef{BKM at 0}{000}
+\newif\ifBKM at sw
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \def\BKM at abslevel{1}%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}\BKM at abslevel
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \BKM at CalcExpr\BKM at abslevel\BKM at x@abslevel+1%
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}\BKM at abslevel
+            }%
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \csname HyPsd at XeTeXBigCharstrue\endcsname
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \let\BKM at action\@empty
+      \ifx\BKM at gotor\@empty
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at named\@empty
+            \ifx\BKM at rawaction\@empty
+              \ifx\BKM at uri\@empty
+                \ifx\BKM at page\@empty
+                  \PackageError{bookmark}{Missing action}\@ehc
+                  \edef\BKM at action{/Dest[@page1/Fit]}%
+                \else
+                  \ifx\BKM at view\@empty
+                    \def\BKM at view{Fit}%
+                  \fi
+                  \edef\BKM at action{/Dest[@page\BKM at page/\BKM at view]}%
+                \fi
+              \else
+                \BKM at EscapeString\BKM at uri
+                \edef\BKM at action{%
+                  /A<<%
+                    /S/URI%
+                    /URI(\BKM at uri)%
+                  >>%
+                }%
+              \fi
+            \else
+              \edef\BKM at action{/A<<\BKM at rawaction>>}%
+            \fi
+          \else
+            \BKM at EscapeName\BKM at named
+            \edef\BKM at action{%
+              /A<</S/Named/N/\BKM at named>>%
+            }%
+          \fi
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{%
+            /A<<%
+              /S/GoTo%
+              /D(\BKM at dest)%
+            >>%
+          }%
+        \fi
+      \else
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at page\@empty
+            \def\BKM at page{0}%
+          \else
+            \BKM at CalcExpr\BKM at page\BKM at page-1%
+          \fi
+          \ifx\BKM at view\@empty
+            \def\BKM at view{Fit}%
+          \fi
+          \edef\BKM at action{/D[\BKM at page/\BKM at view]}%
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{/D(\BKM at dest)}%
+        \fi
+        \BKM at EscapeString\BKM at gotor
+        \edef\BKM at action{%
+          /A<<%
+            /S/GoToR%
+            /F(\BKM at gotor)%
+            \BKM at action
+          >>%
+        }%
+      \fi
+      \special{pdf:%
+        out \ifBKM at DvipdfmxOutlineOpen
+              [%
+              \ifBKM at open
+                \ifnum\BKM at level<%
+                    \expandafter\ltx at firstofone\expandafter
+                    {\number\BKM at openlevel} %
+                \else
+                  -%
+                \fi
+              \else
+                -%
+              \fi
+              ] %
+            \fi
+            \BKM at abslevel
+        <<%
+          /Title(\BKM at title)%
+          \ifx\BKM at color\@empty
+          \else
+            /C[\BKM at color]%
+          \fi
+          \ifnum\BKM at FLAGS>\z@
+            /F \BKM at FLAGS
+          \fi
+          \BKM at action
+        >>%
+      }%
+    \endgroup
+  \fi
+}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@abslevel{#3}%
+}
+\ifBKM at atend
+  \RequirePackage{atenddvi}%
+  \AtEndDvi{\BKM at EndHook}%
+\fi
+
+\endinput
+%%
+%% End of file `bkm-dvipdfm.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipdfm.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvips.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvips.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvips.def	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,358 @@
+%%
+%% This is file `bkm-dvips.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `dvips,pdfmark')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\def\BKM at SourceLocation{%
+  \ifx\BKM at DO@srcfile\@empty
+    \ifx\BKM at DO@srcline\@empty
+    \else
+      .\MessageBreak
+      Source: line \BKM at DO@srcline
+    \fi
+  \else
+    \ifx\BKM at DO@srcline\@empty
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile'%
+    \else
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile', line \BKM at DO@srcline
+    \fi
+  \fi
+}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-dvips.def}%
+  [2019/12/03 v1.28 bookmark driver for dvips (HO)]%
+\def\BKM at PSHeaderFile#1{%
+  \special{header=#1}%
+}
+\def\BKM at filename{\jobname.out.ps}
+\BKM at PSHeaderFile\BKM at filename
+\RequirePackage{atveryend}[2009/12/07]
+\AfterLastShipout{\BKM at pdfmark@out}
+\def\BKM at pdfmark@out{%
+  \if at filesw
+    \newwrite\BKM at file
+    \immediate\openout\BKM at file=\BKM at filename\relax
+    \BKM at write{\@percentchar!}%
+    \BKM at write{/pdfmark where{pop}}%
+    \BKM at write{%
+      {%
+        /globaldict where{pop globaldict}{userdict}ifelse%
+        /pdfmark/cleartomark load put%
+      }%
+    }%
+    \BKM at write{ifelse}%
+  \else
+    \let\BKM at write\@gobble
+    \let\BKM at DO@entry\@gobbletwo
+  \fi
+}
+\def\BKM at write#{%
+  \immediate\write\BKM at file
+}
+\def\BKM at DO@entry#1#2{%
+  \begingroup
+    \kvsetkeys{BKM at DO}{#1}%
+    \ifx\BKM at DO@srcfile\@empty
+    \else
+      \BKM at UnescapeHex\BKM at DO@srcfile
+    \fi
+    \def\BKM at DO@title{#2}%
+    \BKM at UnescapeHex\BKM at DO@title
+    \expandafter\expandafter\expandafter\BKM at getx
+        \csname BKM@\BKM at DO@id\endcsname\@empty\@empty
+    \let\BKM at attr\@empty
+    \ifx\BKM at DO@flags\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/F \BKM at DO@flags}%
+    \fi
+    \ifx\BKM at DO@color\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/C[\BKM at DO@color]}%
+    \fi
+    \let\BKM at action\@empty
+    \ifx\BKM at DO@gotor\@empty
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@named\@empty
+          \ifx\BKM at DO@rawaction\@empty
+            \ifx\BKM at DO@uri\@empty
+              \ifx\BKM at DO@page\@empty
+                \PackageError{bookmark}{%
+                  Missing action\BKM at SourceLocation
+                }\@ehc
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page 1%
+                  /View[/Fit]%
+                }%
+              \else
+                \ifx\BKM at DO@view\@empty
+                  \def\BKM at DO@view{Fit}%
+                \fi
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page \BKM at DO@page
+                  /View[/\BKM at DO@view]%
+                }%
+              \fi
+            \else
+              \BKM at UnescapeHex\BKM at DO@uri
+              \BKM at EscapeString\BKM at DO@uri
+              \edef\BKM at action{%
+                /Action<<%
+                  /Subtype/URI%
+                  /URI(\BKM at DO@uri)%
+                >>%
+              }%
+            \fi
+          \else
+            \BKM at UnescapeHex\BKM at DO@rawaction
+            \edef\BKM at action{%
+              /Action<<%
+                \BKM at DO@rawaction
+              >>%
+            }%
+          \fi
+        \else
+          \BKM at EscapeName\BKM at DO@named
+          \edef\BKM at action{%
+            /Action<<%
+              /Subtype/Named%
+              /N/\BKM at DO@named
+            >>%
+          }%
+        \fi
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Action/GoTo%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+    \else
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@page\@empty
+          \def\BKM at DO@page{1}%
+        \fi
+        \ifx\BKM at DO@view\@empty
+          \def\BKM at DO@view{Fit}%
+        \fi
+        \edef\BKM at action{%
+          /Page \BKM at DO@page
+          /View[/\BKM at DO@view]%
+        }%
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+      \BKM at UnescapeHex\BKM at DO@gotor
+      \BKM at EscapeString\BKM at DO@gotor
+      \edef\BKM at action{%
+        /Action/GoToR%
+        /File(\BKM at DO@gotor)%
+        \BKM at action
+      }%
+    \fi
+    \BKM at write{[}%
+    \BKM at write{/Title(\BKM at DO@title)}%
+    \ifnum\BKM at x@childs>\z@
+      \BKM at write{/Count \ifBKM at DO@open\else-\fi\BKM at x@childs}%
+    \fi
+    \ifx\BKM at attr\@empty
+    \else
+      \BKM at write{\BKM at attr}%
+    \fi
+    \BKM at write{\BKM at action}%
+    \BKM at write{/OUT pdfmark}%
+  \endgroup
+}
+\RequirePackage{auxhook}
+\AddLineBeginMainAux{%
+  \string\providecommand\string\BKM at entry[2]{}%
+}
+\newcount\BKM at id
+\BKM at id=\z@
+\@namedef{BKM at 0}{000}
+\newif\ifBKM at sw
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \BKM at InitSourceLocation
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \ifx\BKM at srcfile\@empty
+      \else
+        \BKM at EscapeHex\BKM at srcfile
+      \fi
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}0%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}0%
+            }%
+            \ifnum\BKM at prev>\z@
+              \BKM at CalcExpr\BKM at CalcResult\BKM at x@childs+1%
+              \expandafter\xdef\csname BKM@\BKM at prev\endcsname{%
+                {\BKM at x@parent}{\BKM at x@level}{\BKM at CalcResult}%
+              }%
+            \fi
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \csname BKM at HypDestOptHook\endcsname
+      \BKM at EscapeHex\BKM at dest
+      \BKM at EscapeHex\BKM at uri
+      \BKM at EscapeHex\BKM at gotor
+      \BKM at EscapeHex\BKM at rawaction
+      \BKM at EscapeHex\BKM at title
+      \immediate\write\@mainaux{%
+        \string\BKM at entry{%
+          id=\number\BKM at id
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              ,open%
+            \fi
+          \fi
+          \BKM at auxentry{dest}%
+          \BKM at auxentry{named}%
+          \BKM at auxentry{uri}%
+          \BKM at auxentry{gotor}%
+          \BKM at auxentry{page}%
+          \BKM at auxentry{view}%
+          \BKM at auxentry{rawaction}%
+          \BKM at auxentry{color}%
+          \ifnum\BKM at FLAGS>\z@
+            ,flags=\BKM at FLAGS
+          \fi
+          \BKM at auxentry{srcline}%
+          \BKM at auxentry{srcfile}%
+        }{\BKM at title}%
+      }%
+    \endgroup
+  \fi
+}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@childs{#3}%
+}
+\def\BKM at auxentry#1{%
+  \expandafter\ifx\csname BKM@#1\endcsname\@empty
+  \else
+    ,#1={\csname BKM@#1\endcsname}%
+  \fi
+}
+\def\BKM at InitSourceLocation{%
+  \edef\BKM at srcline{\the\inputlineno}%
+  \BKM at LuaTeX@InitFile
+  \ifx\BKM at srcfile\@empty
+    \ltx at IfUndefined{currfilepath}{}{%
+      \edef\BKM at srcfile{\currfilepath}%
+    }%
+  \fi
+}
+\ifluatex
+  \ifnum\luatexversion>36 %
+    \def\BKM at LuaTeX@InitFile{%
+      \begingroup
+        \ltx at LocToksA={}%
+      \edef\x{\endgroup
+        \def\noexpand\BKM at srcfile{%
+          \the\expandafter\ltx at LocToksA
+          \directlua{%
+             if status and status.filename then %
+               tex.settoks('ltx at LocToksA', status.filename)%
+             end%
+          }%
+        }%
+      }\x
+    }%
+  \else
+    \let\BKM at LuaTeX@InitFile\relax
+  \fi
+\else
+  \let\BKM at LuaTeX@InitFile\relax
+\fi
+\SetupKeyvalOptions{family=BKM at DO,prefix=BKM at DO@}
+\DeclareStringOption[0]{id}
+\DeclareBoolOption{open}
+\DeclareStringOption{flags}
+\DeclareStringOption{color}
+\DeclareStringOption{dest}
+\DeclareStringOption{named}
+\DeclareStringOption{uri}
+\DeclareStringOption{gotor}
+\DeclareStringOption{page}
+\DeclareStringOption{view}
+\DeclareStringOption{rawaction}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+\AtBeginDocument{%
+  \let\BKM at entry\BKM at DO@entry
+}
+\ifBKM at atend
+  \AfterLastShipout{%
+    \BKM at EndHook
+  }%
+\fi
+
+\endinput
+%%
+%% End of file `bkm-dvips.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvips.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipsone.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipsone.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipsone.def	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,358 @@
+%%
+%% This is file `bkm-dvipsone.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `dvipsone,pdfmark')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\def\BKM at SourceLocation{%
+  \ifx\BKM at DO@srcfile\@empty
+    \ifx\BKM at DO@srcline\@empty
+    \else
+      .\MessageBreak
+      Source: line \BKM at DO@srcline
+    \fi
+  \else
+    \ifx\BKM at DO@srcline\@empty
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile'%
+    \else
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile', line \BKM at DO@srcline
+    \fi
+  \fi
+}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-dvipsone.def}%
+  [2019/12/03 v1.28 bookmark driver for dvipsone (HO)]%
+\def\BKM at PSHeaderFile#1{%
+  \special{header=#1}%
+}
+\def\BKM at filename{\jobname.out.ps}
+\BKM at PSHeaderFile\BKM at filename
+\RequirePackage{atveryend}[2009/12/07]
+\AfterLastShipout{\BKM at pdfmark@out}
+\def\BKM at pdfmark@out{%
+  \if at filesw
+    \newwrite\BKM at file
+    \immediate\openout\BKM at file=\BKM at filename\relax
+    \BKM at write{\@percentchar!}%
+    \BKM at write{/pdfmark where{pop}}%
+    \BKM at write{%
+      {%
+        /globaldict where{pop globaldict}{userdict}ifelse%
+        /pdfmark/cleartomark load put%
+      }%
+    }%
+    \BKM at write{ifelse}%
+  \else
+    \let\BKM at write\@gobble
+    \let\BKM at DO@entry\@gobbletwo
+  \fi
+}
+\def\BKM at write#{%
+  \immediate\write\BKM at file
+}
+\def\BKM at DO@entry#1#2{%
+  \begingroup
+    \kvsetkeys{BKM at DO}{#1}%
+    \ifx\BKM at DO@srcfile\@empty
+    \else
+      \BKM at UnescapeHex\BKM at DO@srcfile
+    \fi
+    \def\BKM at DO@title{#2}%
+    \BKM at UnescapeHex\BKM at DO@title
+    \expandafter\expandafter\expandafter\BKM at getx
+        \csname BKM@\BKM at DO@id\endcsname\@empty\@empty
+    \let\BKM at attr\@empty
+    \ifx\BKM at DO@flags\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/F \BKM at DO@flags}%
+    \fi
+    \ifx\BKM at DO@color\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/C[\BKM at DO@color]}%
+    \fi
+    \let\BKM at action\@empty
+    \ifx\BKM at DO@gotor\@empty
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@named\@empty
+          \ifx\BKM at DO@rawaction\@empty
+            \ifx\BKM at DO@uri\@empty
+              \ifx\BKM at DO@page\@empty
+                \PackageError{bookmark}{%
+                  Missing action\BKM at SourceLocation
+                }\@ehc
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page 1%
+                  /View[/Fit]%
+                }%
+              \else
+                \ifx\BKM at DO@view\@empty
+                  \def\BKM at DO@view{Fit}%
+                \fi
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page \BKM at DO@page
+                  /View[/\BKM at DO@view]%
+                }%
+              \fi
+            \else
+              \BKM at UnescapeHex\BKM at DO@uri
+              \BKM at EscapeString\BKM at DO@uri
+              \edef\BKM at action{%
+                /Action<<%
+                  /Subtype/URI%
+                  /URI(\BKM at DO@uri)%
+                >>%
+              }%
+            \fi
+          \else
+            \BKM at UnescapeHex\BKM at DO@rawaction
+            \edef\BKM at action{%
+              /Action<<%
+                \BKM at DO@rawaction
+              >>%
+            }%
+          \fi
+        \else
+          \BKM at EscapeName\BKM at DO@named
+          \edef\BKM at action{%
+            /Action<<%
+              /Subtype/Named%
+              /N/\BKM at DO@named
+            >>%
+          }%
+        \fi
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Action/GoTo%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+    \else
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@page\@empty
+          \def\BKM at DO@page{1}%
+        \fi
+        \ifx\BKM at DO@view\@empty
+          \def\BKM at DO@view{Fit}%
+        \fi
+        \edef\BKM at action{%
+          /Page \BKM at DO@page
+          /View[/\BKM at DO@view]%
+        }%
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+      \BKM at UnescapeHex\BKM at DO@gotor
+      \BKM at EscapeString\BKM at DO@gotor
+      \edef\BKM at action{%
+        /Action/GoToR%
+        /File(\BKM at DO@gotor)%
+        \BKM at action
+      }%
+    \fi
+    \BKM at write{[}%
+    \BKM at write{/Title(\BKM at DO@title)}%
+    \ifnum\BKM at x@childs>\z@
+      \BKM at write{/Count \ifBKM at DO@open\else-\fi\BKM at x@childs}%
+    \fi
+    \ifx\BKM at attr\@empty
+    \else
+      \BKM at write{\BKM at attr}%
+    \fi
+    \BKM at write{\BKM at action}%
+    \BKM at write{/OUT pdfmark}%
+  \endgroup
+}
+\RequirePackage{auxhook}
+\AddLineBeginMainAux{%
+  \string\providecommand\string\BKM at entry[2]{}%
+}
+\newcount\BKM at id
+\BKM at id=\z@
+\@namedef{BKM at 0}{000}
+\newif\ifBKM at sw
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \BKM at InitSourceLocation
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \ifx\BKM at srcfile\@empty
+      \else
+        \BKM at EscapeHex\BKM at srcfile
+      \fi
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}0%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}0%
+            }%
+            \ifnum\BKM at prev>\z@
+              \BKM at CalcExpr\BKM at CalcResult\BKM at x@childs+1%
+              \expandafter\xdef\csname BKM@\BKM at prev\endcsname{%
+                {\BKM at x@parent}{\BKM at x@level}{\BKM at CalcResult}%
+              }%
+            \fi
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \csname BKM at HypDestOptHook\endcsname
+      \BKM at EscapeHex\BKM at dest
+      \BKM at EscapeHex\BKM at uri
+      \BKM at EscapeHex\BKM at gotor
+      \BKM at EscapeHex\BKM at rawaction
+      \BKM at EscapeHex\BKM at title
+      \immediate\write\@mainaux{%
+        \string\BKM at entry{%
+          id=\number\BKM at id
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              ,open%
+            \fi
+          \fi
+          \BKM at auxentry{dest}%
+          \BKM at auxentry{named}%
+          \BKM at auxentry{uri}%
+          \BKM at auxentry{gotor}%
+          \BKM at auxentry{page}%
+          \BKM at auxentry{view}%
+          \BKM at auxentry{rawaction}%
+          \BKM at auxentry{color}%
+          \ifnum\BKM at FLAGS>\z@
+            ,flags=\BKM at FLAGS
+          \fi
+          \BKM at auxentry{srcline}%
+          \BKM at auxentry{srcfile}%
+        }{\BKM at title}%
+      }%
+    \endgroup
+  \fi
+}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@childs{#3}%
+}
+\def\BKM at auxentry#1{%
+  \expandafter\ifx\csname BKM@#1\endcsname\@empty
+  \else
+    ,#1={\csname BKM@#1\endcsname}%
+  \fi
+}
+\def\BKM at InitSourceLocation{%
+  \edef\BKM at srcline{\the\inputlineno}%
+  \BKM at LuaTeX@InitFile
+  \ifx\BKM at srcfile\@empty
+    \ltx at IfUndefined{currfilepath}{}{%
+      \edef\BKM at srcfile{\currfilepath}%
+    }%
+  \fi
+}
+\ifluatex
+  \ifnum\luatexversion>36 %
+    \def\BKM at LuaTeX@InitFile{%
+      \begingroup
+        \ltx at LocToksA={}%
+      \edef\x{\endgroup
+        \def\noexpand\BKM at srcfile{%
+          \the\expandafter\ltx at LocToksA
+          \directlua{%
+             if status and status.filename then %
+               tex.settoks('ltx at LocToksA', status.filename)%
+             end%
+          }%
+        }%
+      }\x
+    }%
+  \else
+    \let\BKM at LuaTeX@InitFile\relax
+  \fi
+\else
+  \let\BKM at LuaTeX@InitFile\relax
+\fi
+\SetupKeyvalOptions{family=BKM at DO,prefix=BKM at DO@}
+\DeclareStringOption[0]{id}
+\DeclareBoolOption{open}
+\DeclareStringOption{flags}
+\DeclareStringOption{color}
+\DeclareStringOption{dest}
+\DeclareStringOption{named}
+\DeclareStringOption{uri}
+\DeclareStringOption{gotor}
+\DeclareStringOption{page}
+\DeclareStringOption{view}
+\DeclareStringOption{rawaction}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+\AtBeginDocument{%
+  \let\BKM at entry\BKM at DO@entry
+}
+\ifBKM at atend
+  \AfterLastShipout{%
+    \BKM at EndHook
+  }%
+\fi
+
+\endinput
+%%
+%% End of file `bkm-dvipsone.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-dvipsone.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-pdftex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bkm-pdftex.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bkm-pdftex.def	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,313 @@
+%%
+%% This is file `bkm-pdftex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `pdftex')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-pdftex.def}%
+  [2019/12/03 v1.28 bookmark driver for pdfTeX (HO)]%
+\def\BKM at DO@entry#1#2{%
+  \begingroup
+    \kvsetkeys{BKM at DO}{#1}%
+    \def\BKM at DO@title{#2}%
+    \ifx\BKM at DO@srcfile\@empty
+    \else
+      \BKM at UnescapeHex\BKM at DO@srcfile
+    \fi
+    \BKM at UnescapeHex\BKM at DO@title
+    \expandafter\expandafter\expandafter\BKM at getx
+        \csname BKM@\BKM at DO@id\endcsname\@empty\@empty
+    \let\BKM at attr\@empty
+    \ifx\BKM at DO@flags\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/F \BKM at DO@flags}%
+    \fi
+    \ifx\BKM at DO@color\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/C[\BKM at DO@color]}%
+    \fi
+    \ifx\BKM at attr\@empty
+    \else
+      \edef\BKM at attr{attr{\BKM at attr}}%
+    \fi
+    \let\BKM at action\@empty
+    \ifx\BKM at DO@gotor\@empty
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@named\@empty
+          \ifx\BKM at DO@rawaction\@empty
+            \ifx\BKM at DO@uri\@empty
+              \ifx\BKM at DO@page\@empty
+                \PackageError{bookmark}{%
+                  Missing action\BKM at SourceLocation
+                }\@ehc
+                \edef\BKM at action{goto page1{/Fit}}%
+              \else
+                \ifx\BKM at DO@view\@empty
+                  \def\BKM at DO@view{Fit}%
+                \fi
+                \edef\BKM at action{goto page\BKM at DO@page{/\BKM at DO@view}}%
+              \fi
+            \else
+              \BKM at UnescapeHex\BKM at DO@uri
+              \BKM at EscapeString\BKM at DO@uri
+              \edef\BKM at action{user{<</S/URI/URI(\BKM at DO@uri)>>}}%
+            \fi
+          \else
+            \BKM at UnescapeHex\BKM at DO@rawaction
+            \edef\BKM at action{%
+              user{%
+                <<%
+                  \BKM at DO@rawaction
+                >>%
+              }%
+            }%
+          \fi
+        \else
+          \BKM at EscapeName\BKM at DO@named
+          \edef\BKM at action{%
+            user{<</S/Named/N/\BKM at DO@named>>}%
+          }%
+        \fi
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at DefGotoNameAction\BKM at action\BKM at DO@dest
+      \fi
+    \else
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@page\@empty
+          \def\BKM at DO@page{0}%
+        \else
+          \BKM at CalcExpr\BKM at DO@page\BKM at DO@page-1%
+        \fi
+        \ifx\BKM at DO@view\@empty
+          \def\BKM at DO@view{Fit}%
+        \fi
+        \edef\BKM at action{/D[\BKM at DO@page/\BKM at DO@view]}%
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{/D(\BKM at DO@dest)}%
+      \fi
+      \BKM at UnescapeHex\BKM at DO@gotor
+      \BKM at EscapeString\BKM at DO@gotor
+      \edef\BKM at action{%
+        user{%
+          <<%
+            /S/GoToR%
+            /F(\BKM at DO@gotor)%
+            \BKM at action
+          >>%
+        }%
+      }%
+    \fi
+    \pdfoutline\BKM at attr\BKM at action
+                count\ifBKM at DO@open\else-\fi\BKM at x@childs
+                {\BKM at DO@title}%
+  \endgroup
+}
+\def\BKM at DefGotoNameAction#1#2{%
+  \BKM at EscapeString\BKM at DO@dest
+  \edef#1{goto name{#2}}%
+}
+\def\BKM at SourceLocation{%
+  \ifx\BKM at DO@srcfile\@empty
+    \ifx\BKM at DO@srcline\@empty
+    \else
+      .\MessageBreak
+      Source: line \BKM at DO@srcline
+    \fi
+  \else
+    \ifx\BKM at DO@srcline\@empty
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile'%
+    \else
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile', line \BKM at DO@srcline
+    \fi
+  \fi
+}
+\RequirePackage{auxhook}
+\AddLineBeginMainAux{%
+  \string\providecommand\string\BKM at entry[2]{}%
+}
+\newcount\BKM at id
+\BKM at id=\z@
+\@namedef{BKM at 0}{000}
+\newif\ifBKM at sw
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \BKM at InitSourceLocation
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \ifx\BKM at srcfile\@empty
+      \else
+        \BKM at EscapeHex\BKM at srcfile
+      \fi
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}0%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}0%
+            }%
+            \ifnum\BKM at prev>\z@
+              \BKM at CalcExpr\BKM at CalcResult\BKM at x@childs+1%
+              \expandafter\xdef\csname BKM@\BKM at prev\endcsname{%
+                {\BKM at x@parent}{\BKM at x@level}{\BKM at CalcResult}%
+              }%
+            \fi
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \csname BKM at HypDestOptHook\endcsname
+      \BKM at EscapeHex\BKM at dest
+      \BKM at EscapeHex\BKM at uri
+      \BKM at EscapeHex\BKM at gotor
+      \BKM at EscapeHex\BKM at rawaction
+      \BKM at EscapeHex\BKM at title
+      \immediate\write\@mainaux{%
+        \string\BKM at entry{%
+          id=\number\BKM at id
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              ,open%
+            \fi
+          \fi
+          \BKM at auxentry{dest}%
+          \BKM at auxentry{named}%
+          \BKM at auxentry{uri}%
+          \BKM at auxentry{gotor}%
+          \BKM at auxentry{page}%
+          \BKM at auxentry{view}%
+          \BKM at auxentry{rawaction}%
+          \BKM at auxentry{color}%
+          \ifnum\BKM at FLAGS>\z@
+            ,flags=\BKM at FLAGS
+          \fi
+          \BKM at auxentry{srcline}%
+          \BKM at auxentry{srcfile}%
+        }{\BKM at title}%
+      }%
+    \endgroup
+  \fi
+}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@childs{#3}%
+}
+\def\BKM at auxentry#1{%
+  \expandafter\ifx\csname BKM@#1\endcsname\@empty
+  \else
+    ,#1={\csname BKM@#1\endcsname}%
+  \fi
+}
+\def\BKM at InitSourceLocation{%
+  \edef\BKM at srcline{\the\inputlineno}%
+  \BKM at LuaTeX@InitFile
+  \ifx\BKM at srcfile\@empty
+    \ltx at IfUndefined{currfilepath}{}{%
+      \edef\BKM at srcfile{\currfilepath}%
+    }%
+  \fi
+}
+\ifluatex
+  \ifnum\luatexversion>36 %
+    \def\BKM at LuaTeX@InitFile{%
+      \begingroup
+        \ltx at LocToksA={}%
+      \edef\x{\endgroup
+        \def\noexpand\BKM at srcfile{%
+          \the\expandafter\ltx at LocToksA
+          \directlua{%
+             if status and status.filename then %
+               tex.settoks('ltx at LocToksA', status.filename)%
+             end%
+          }%
+        }%
+      }\x
+    }%
+  \else
+    \let\BKM at LuaTeX@InitFile\relax
+  \fi
+\else
+  \let\BKM at LuaTeX@InitFile\relax
+\fi
+\SetupKeyvalOptions{family=BKM at DO,prefix=BKM at DO@}
+\DeclareStringOption[0]{id}
+\DeclareBoolOption{open}
+\DeclareStringOption{flags}
+\DeclareStringOption{color}
+\DeclareStringOption{dest}
+\DeclareStringOption{named}
+\DeclareStringOption{uri}
+\DeclareStringOption{gotor}
+\DeclareStringOption{page}
+\DeclareStringOption{view}
+\DeclareStringOption{rawaction}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+\AtBeginDocument{%
+  \let\BKM at entry\BKM at DO@entry
+}
+\ifBKM at atend
+  \AfterLastShipout{%
+    \BKM at EndHook
+  }%
+\fi
+
+\endinput
+%%
+%% End of file `bkm-pdftex.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-pdftex.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-textures.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bkm-textures.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bkm-textures.def	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,358 @@
+%%
+%% This is file `bkm-textures.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `textures,pdfmark')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\def\BKM at SourceLocation{%
+  \ifx\BKM at DO@srcfile\@empty
+    \ifx\BKM at DO@srcline\@empty
+    \else
+      .\MessageBreak
+      Source: line \BKM at DO@srcline
+    \fi
+  \else
+    \ifx\BKM at DO@srcline\@empty
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile'%
+    \else
+      .\MessageBreak
+      Source: file `\BKM at DO@srcfile', line \BKM at DO@srcline
+    \fi
+  \fi
+}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-textures.def}%
+  [2019/12/03 v1.28 bookmark driver for textures (HO)]%
+\def\BKM at PSHeaderFile#1{%
+  \special{prePostScriptfile #1}%
+}
+\def\BKM at filename{\jobname.out.ps}
+\BKM at PSHeaderFile\BKM at filename
+\RequirePackage{atveryend}[2009/12/07]
+\AfterLastShipout{\BKM at pdfmark@out}
+\def\BKM at pdfmark@out{%
+  \if at filesw
+    \newwrite\BKM at file
+    \immediate\openout\BKM at file=\BKM at filename\relax
+    \BKM at write{\@percentchar!}%
+    \BKM at write{/pdfmark where{pop}}%
+    \BKM at write{%
+      {%
+        /globaldict where{pop globaldict}{userdict}ifelse%
+        /pdfmark/cleartomark load put%
+      }%
+    }%
+    \BKM at write{ifelse}%
+  \else
+    \let\BKM at write\@gobble
+    \let\BKM at DO@entry\@gobbletwo
+  \fi
+}
+\def\BKM at write#{%
+  \immediate\write\BKM at file
+}
+\def\BKM at DO@entry#1#2{%
+  \begingroup
+    \kvsetkeys{BKM at DO}{#1}%
+    \ifx\BKM at DO@srcfile\@empty
+    \else
+      \BKM at UnescapeHex\BKM at DO@srcfile
+    \fi
+    \def\BKM at DO@title{#2}%
+    \BKM at UnescapeHex\BKM at DO@title
+    \expandafter\expandafter\expandafter\BKM at getx
+        \csname BKM@\BKM at DO@id\endcsname\@empty\@empty
+    \let\BKM at attr\@empty
+    \ifx\BKM at DO@flags\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/F \BKM at DO@flags}%
+    \fi
+    \ifx\BKM at DO@color\@empty
+    \else
+      \edef\BKM at attr{\BKM at attr/C[\BKM at DO@color]}%
+    \fi
+    \let\BKM at action\@empty
+    \ifx\BKM at DO@gotor\@empty
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@named\@empty
+          \ifx\BKM at DO@rawaction\@empty
+            \ifx\BKM at DO@uri\@empty
+              \ifx\BKM at DO@page\@empty
+                \PackageError{bookmark}{%
+                  Missing action\BKM at SourceLocation
+                }\@ehc
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page 1%
+                  /View[/Fit]%
+                }%
+              \else
+                \ifx\BKM at DO@view\@empty
+                  \def\BKM at DO@view{Fit}%
+                \fi
+                \edef\BKM at action{%
+                  /Action/GoTo%
+                  /Page \BKM at DO@page
+                  /View[/\BKM at DO@view]%
+                }%
+              \fi
+            \else
+              \BKM at UnescapeHex\BKM at DO@uri
+              \BKM at EscapeString\BKM at DO@uri
+              \edef\BKM at action{%
+                /Action<<%
+                  /Subtype/URI%
+                  /URI(\BKM at DO@uri)%
+                >>%
+              }%
+            \fi
+          \else
+            \BKM at UnescapeHex\BKM at DO@rawaction
+            \edef\BKM at action{%
+              /Action<<%
+                \BKM at DO@rawaction
+              >>%
+            }%
+          \fi
+        \else
+          \BKM at EscapeName\BKM at DO@named
+          \edef\BKM at action{%
+            /Action<<%
+              /Subtype/Named%
+              /N/\BKM at DO@named
+            >>%
+          }%
+        \fi
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Action/GoTo%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+    \else
+      \ifx\BKM at DO@dest\@empty
+        \ifx\BKM at DO@page\@empty
+          \def\BKM at DO@page{1}%
+        \fi
+        \ifx\BKM at DO@view\@empty
+          \def\BKM at DO@view{Fit}%
+        \fi
+        \edef\BKM at action{%
+          /Page \BKM at DO@page
+          /View[/\BKM at DO@view]%
+        }%
+      \else
+        \BKM at UnescapeHex\BKM at DO@dest
+        \BKM at EscapeString\BKM at DO@dest
+        \edef\BKM at action{%
+          /Dest(\BKM at DO@dest)cvn%
+        }%
+      \fi
+      \BKM at UnescapeHex\BKM at DO@gotor
+      \BKM at EscapeString\BKM at DO@gotor
+      \edef\BKM at action{%
+        /Action/GoToR%
+        /File(\BKM at DO@gotor)%
+        \BKM at action
+      }%
+    \fi
+    \BKM at write{[}%
+    \BKM at write{/Title(\BKM at DO@title)}%
+    \ifnum\BKM at x@childs>\z@
+      \BKM at write{/Count \ifBKM at DO@open\else-\fi\BKM at x@childs}%
+    \fi
+    \ifx\BKM at attr\@empty
+    \else
+      \BKM at write{\BKM at attr}%
+    \fi
+    \BKM at write{\BKM at action}%
+    \BKM at write{/OUT pdfmark}%
+  \endgroup
+}
+\RequirePackage{auxhook}
+\AddLineBeginMainAux{%
+  \string\providecommand\string\BKM at entry[2]{}%
+}
+\newcount\BKM at id
+\BKM at id=\z@
+\@namedef{BKM at 0}{000}
+\newif\ifBKM at sw
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \BKM at InitSourceLocation
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \ifx\BKM at srcfile\@empty
+      \else
+        \BKM at EscapeHex\BKM at srcfile
+      \fi
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}0%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}0%
+            }%
+            \ifnum\BKM at prev>\z@
+              \BKM at CalcExpr\BKM at CalcResult\BKM at x@childs+1%
+              \expandafter\xdef\csname BKM@\BKM at prev\endcsname{%
+                {\BKM at x@parent}{\BKM at x@level}{\BKM at CalcResult}%
+              }%
+            \fi
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \csname BKM at HypDestOptHook\endcsname
+      \BKM at EscapeHex\BKM at dest
+      \BKM at EscapeHex\BKM at uri
+      \BKM at EscapeHex\BKM at gotor
+      \BKM at EscapeHex\BKM at rawaction
+      \BKM at EscapeHex\BKM at title
+      \immediate\write\@mainaux{%
+        \string\BKM at entry{%
+          id=\number\BKM at id
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              ,open%
+            \fi
+          \fi
+          \BKM at auxentry{dest}%
+          \BKM at auxentry{named}%
+          \BKM at auxentry{uri}%
+          \BKM at auxentry{gotor}%
+          \BKM at auxentry{page}%
+          \BKM at auxentry{view}%
+          \BKM at auxentry{rawaction}%
+          \BKM at auxentry{color}%
+          \ifnum\BKM at FLAGS>\z@
+            ,flags=\BKM at FLAGS
+          \fi
+          \BKM at auxentry{srcline}%
+          \BKM at auxentry{srcfile}%
+        }{\BKM at title}%
+      }%
+    \endgroup
+  \fi
+}
+\def\BKM at getx#1#2#3{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+  \def\BKM at x@childs{#3}%
+}
+\def\BKM at auxentry#1{%
+  \expandafter\ifx\csname BKM@#1\endcsname\@empty
+  \else
+    ,#1={\csname BKM@#1\endcsname}%
+  \fi
+}
+\def\BKM at InitSourceLocation{%
+  \edef\BKM at srcline{\the\inputlineno}%
+  \BKM at LuaTeX@InitFile
+  \ifx\BKM at srcfile\@empty
+    \ltx at IfUndefined{currfilepath}{}{%
+      \edef\BKM at srcfile{\currfilepath}%
+    }%
+  \fi
+}
+\ifluatex
+  \ifnum\luatexversion>36 %
+    \def\BKM at LuaTeX@InitFile{%
+      \begingroup
+        \ltx at LocToksA={}%
+      \edef\x{\endgroup
+        \def\noexpand\BKM at srcfile{%
+          \the\expandafter\ltx at LocToksA
+          \directlua{%
+             if status and status.filename then %
+               tex.settoks('ltx at LocToksA', status.filename)%
+             end%
+          }%
+        }%
+      }\x
+    }%
+  \else
+    \let\BKM at LuaTeX@InitFile\relax
+  \fi
+\else
+  \let\BKM at LuaTeX@InitFile\relax
+\fi
+\SetupKeyvalOptions{family=BKM at DO,prefix=BKM at DO@}
+\DeclareStringOption[0]{id}
+\DeclareBoolOption{open}
+\DeclareStringOption{flags}
+\DeclareStringOption{color}
+\DeclareStringOption{dest}
+\DeclareStringOption{named}
+\DeclareStringOption{uri}
+\DeclareStringOption{gotor}
+\DeclareStringOption{page}
+\DeclareStringOption{view}
+\DeclareStringOption{rawaction}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+\AtBeginDocument{%
+  \let\BKM at entry\BKM at DO@entry
+}
+\ifBKM at atend
+  \AfterLastShipout{%
+    \BKM at EndHook
+  }%
+\fi
+
+\endinput
+%%
+%% End of file `bkm-textures.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-textures.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-vtex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bkm-vtex.def	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bkm-vtex.def	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,300 @@
+%%
+%% This is file `bkm-vtex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `vtex')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bkm-vtex.def}%
+  [2019/12/03 v1.28 bookmark driver for VTeX (HO)]%
+\ifvtexpdf
+\else
+  \PackageWarningNoLine{bookmark}{%
+    The VTeX driver only supports PDF mode%
+  }%
+\fi
+\newcount\BKM at id
+\BKM at id=\z@
+\@namedef{BKM at 0}{00}
+\newif\ifBKM at sw
+\newcommand*{\bookmark}[2][]{%
+  \if at filesw
+    \begingroup
+      \def\bookmark at text{#2}%
+      \BKM at setup{#1}%
+      \edef\BKM at prev{\the\BKM at id}%
+      \global\advance\BKM at id\@ne
+      \BKM at swtrue
+      \@whilesw\ifBKM at sw\fi{%
+        \ifnum\ifBKM at startatroot\z@\else\BKM at prev\fi=\z@
+          \BKM at startatrootfalse
+          \def\BKM at parent{0}%
+          \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+            0{\BKM at level}%
+          }%
+          \BKM at swfalse
+        \else
+          \expandafter\expandafter\expandafter\BKM at getx
+              \csname BKM@\BKM at prev\endcsname
+          \ifnum\BKM at level>\BKM at x@level\relax
+            \let\BKM at parent\BKM at prev
+            \expandafter\xdef\csname BKM@\the\BKM at id\endcsname{%
+              {\BKM at prev}{\BKM at level}%
+            }%
+            \BKM at swfalse
+          \else
+            \let\BKM at prev\BKM at x@parent
+          \fi
+        \fi
+      }%
+      \pdfstringdef\BKM at title{\bookmark at text}%
+      \BKM at vtex@title
+      \edef\BKM at FLAGS{\BKM at PrintStyle}%
+      \let\BKM at action\@empty
+      \ifx\BKM at gotor\@empty
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at named\@empty
+            \ifx\BKM at rawaction\@empty
+              \ifx\BKM at uri\@empty
+                \ifx\BKM at page\@empty
+                  \PackageError{bookmark}{Missing action}\@ehc
+                  \def\BKM at action{!1}%
+                \else
+                  \edef\BKM at action{!\BKM at page}%
+                \fi
+              \else
+                \BKM at EscapeString\BKM at uri
+                \edef\BKM at action{%
+                  <u=%
+                    /S/URI%
+                    /URI(\BKM at uri)%
+                  >%
+                }%
+              \fi
+            \else
+              \edef\BKM at action{<u=\BKM at rawaction>}%
+            \fi
+          \else
+            \BKM at EscapeName\BKM at named
+            \edef\BKM at action{%
+              <u=%
+                /S/Named%
+                /N/\BKM at named
+              >%
+            }%
+          \fi
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{\BKM at dest}%
+        \fi
+      \else
+        \ifx\BKM at dest\@empty
+          \ifx\BKM at page\@empty
+            \def\BKM at page{1}%
+          \fi
+          \ifx\BKM at view\@empty
+            \def\BKM at view{Fit}%
+          \fi
+          \edef\BKM at action{/D[\BKM at page/\BKM at view]}%
+        \else
+          \BKM at EscapeString\BKM at dest
+          \edef\BKM at action{/D(\BKM at dest)}%
+        \fi
+        \BKM at EscapeString\BKM at gotor
+        \edef\BKM at action{%
+          <u=%
+            /S/GoToR%
+            /F(\BKM at gotor)%
+            \BKM at action
+          >>%
+        }%
+      \fi
+      \ifx\BKM at color\@empty
+        \let\BKM at RGBcolor\@empty
+      \else
+        \expandafter\BKM at toRGB\BKM at color\@nil
+      \fi
+      \special{%
+        !outline \BKM at action;%
+        p=\BKM at parent,%
+        i=\number\BKM at id,%
+        s=%
+          \ifBKM at open
+            \ifnum\BKM at level<\BKM at openlevel
+              o%
+            \else
+              c%
+            \fi
+          \else
+            c%
+          \fi,%
+        \ifx\BKM at RGBcolor\@empty
+        \else
+          c=\BKM at RGBcolor,%
+        \fi
+        \ifnum\BKM at FLAGS>\z@
+          f=\BKM at FLAGS,%
+        \fi
+        t=\BKM at title
+      }%
+    \endgroup
+  \fi
+}
+\def\BKM at getx#1#2{%
+  \def\BKM at x@parent{#1}%
+  \def\BKM at x@level{#2}%
+}
+\def\BKM at toRGB#1 #2 #3\@nil{%
+  \let\BKM at RGBcolor\@empty
+  \BKM at toRGBComponent{#1}%
+  \BKM at toRGBComponent{#2}%
+  \BKM at toRGBComponent{#3}%
+}
+\def\BKM at 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 at ii=\dimen@
+      \divide\dimen at ii by 16\relax
+      \edef\BKM at RGBcolor{%
+        \BKM at RGBcolor
+        \BKM at toHexDigit\dimen at ii
+      }%
+      \dimen at ii=16\dimen at ii
+      \advance\dimen at -\dimen at ii
+      \edef\BKM at RGBcolor{%
+        \BKM at RGBcolor
+        \BKM at toHexDigit\dimen@
+      }%
+    \else
+      \edef\BKM at RGBcolor{\BKM at RGBcolor FF}%
+    \fi
+  \else
+    \edef\BKM at RGBcolor{\BKM at RGBcolor00}%
+  \fi
+}
+\def\BKM at toHexDigit#1{%
+  \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
+}
+\begingroup
+  \catcode`\|=0 %
+  \catcode`\\=12 %
+  |gdef|BKM at vtex@title{%
+    |@onelevel at sanitize|BKM at title
+    |edef|BKM at title{|expandafter|BKM at vtex@leftparen|BKM at title\(|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@rightparen|BKM at title\)|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@zero|BKM at title\0|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@one|BKM at title\1|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@two|BKM at title\2|@nil}%
+    |edef|BKM at title{|expandafter|BKM at vtex@three|BKM at title\3|@nil}%
+  }%
+  |gdef|BKM at vtex@leftparen#1\(#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      (%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@leftparen#2|@nil
+      }%
+    |fi
+  }%
+  |gdef|BKM at vtex@rightparen#1\)#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      )%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@rightparen#2|@nil
+      }%
+    |fi
+  }%
+  |gdef|BKM at vtex@zero#1\0#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char0%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@zero#2|@nil
+      }%
+    |fi
+  }%
+  |gdef|BKM at vtex@one#1\1#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char1%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@one#2|@nil
+      }%
+    |fi
+  }%
+  |gdef|BKM at vtex@two#1\2#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char2%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@two#2|@nil
+      }%
+    |fi
+  }%
+  |gdef|BKM at vtex@three#1\3#2|@nil{%
+    #1%
+    |ifx||#2||%
+    |else
+      |noexpand|hv at pdf@char3%
+      |ltx at ReturnAfterFi{%
+        |BKM at vtex@three#2|@nil
+      }%
+    |fi
+  }%
+|endgroup
+\ifBKM at atend
+  \RequirePackage{atenddvi}%
+  \AtEndDvi{\BKM at EndHook}%
+\fi
+
+\endinput
+%%
+%% End of file `bkm-vtex.def'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bkm-vtex.def
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bookmark/bookmark.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookmark/bookmark.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bookmark/bookmark.sty	2019-12-04 22:50:54 UTC (rev 53026)
@@ -0,0 +1,760 @@
+%%
+%% This is file `bookmark.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bookmark.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Project: bookmark
+%% Version: 2019/12/03 v1.28
+%% 
+%% Copyright (C)
+%%    2007-2011 Heiko Oberdiek
+%%    2016-2019 Oberdiek Package Support Group
+%% 
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%%    https://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%%    https://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%% 
+%% This work has the LPPL maintenance status "maintained".
+%% 
+%% The Current Maintainers of this work are
+%% Heiko Oberdiek and the Oberdiek Package Support Group
+%% https://github.com/ho-tex/bookmark/issues
+%% 
+%% 
+%% 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-dvipsone.def,
+%%    bkm-textures.def, bkm-pdftex.def, bkm-vtex.def,
+%%    bookmark-example.tex.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bookmark}%
+  [2019/12/03 v1.28 PDF bookmarks (HO)]%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname numexpr\endcsname\relax
+  \def\BKM at CalcExpr#1#2#3#4{%
+    \begingroup
+      \count@=#2\relax
+      \advance\count@ by#3#4\relax
+      \edef\x{\endgroup
+        \def\noexpand#1{\the\count@}%
+      }%
+    \x
+  }%
+\else
+  \def\BKM at CalcExpr#1#2#3#4{%
+    \edef#1{%
+      \the\numexpr#2#3#4\relax
+    }%
+  }%
+\fi
+\def\BKM at EscapeName#1{%
+  \ifx#1\@empty
+  \else
+    \EdefEscapeName#1#1%
+  \fi
+}%
+\def\BKM at EscapeString#1{%
+  \ifx#1\@empty
+  \else
+    \EdefEscapeString#1#1%
+  \fi
+}%
+\def\BKM at EscapeHex#1{%
+  \ifx#1\@empty
+  \else
+    \EdefEscapeHex#1#1%
+  \fi
+}%
+\def\BKM at UnescapeHex#1{%
+  \EdefUnescapeHex#1#1%
+}%
+\RequirePackage{hyperref}[2010/06/18]
+\SetupKeyvalOptions{family=BKM,prefix=BKM@}
+\DeclareLocalOptions{%
+  atend,%
+  bold,%
+  color,%
+  depth,%
+  dest,%
+  draft,%
+  final,%
+  gotor,%
+  italic,%
+  keeplevel,%
+  level,%
+  named,%
+  numbered,%
+  open,%
+  openlevel,%
+  page,%
+  rawaction,%
+  rellevel,%
+  srcfile,%
+  srcline,%
+  startatroot,%
+  uri,%
+  view,%
+}
+\newcommand*{\bookmarksetup}{\kvsetkeys{BKM}}
+\def\BKM at setup#1{%
+  \bookmarksetup{#1}%
+  \ifx\BKM at HookNext\ltx at empty
+  \else
+    \expandafter\bookmarksetup\expandafter{\BKM at HookNext}%
+    \BKM at HookNextClear
+  \fi
+  \BKM at hook
+  \ifBKM at keeplevel
+  \else
+    \xdef\BKM at currentlevel{\BKM at level}%
+  \fi
+}
+\newcommand*{\bookmarksetupnext}[1]{%
+  \ltx at GlobalAppendToMacro\BKM at HookNext{,#1}%
+}
+\def\BKM at HookNextClear{%
+  \global\let\BKM at HookNext\ltx at empty
+}
+\BKM at HookNextClear
+\DeclareBoolOption{draft}
+\DeclareComplementaryOption{final}{draft}
+\def\BKM at DisableOptions{%
+  \DisableKeyvalOption[action=warning,package=bookmark]%
+      {BKM}{draft}%
+  \DisableKeyvalOption[action=warning,package=bookmark]%
+      {BKM}{final}%
+}
+\DeclareBoolOption[\ifHy at bookmarksopen true\else false\fi]{open}
+\def\bookmark at open{%
+  \ifBKM at open\ltx at one\else\ltx at zero\fi
+}
+\DeclareStringOption[\maxdimen]{openlevel}
+\edef\BKM at openlevel{\number\@bookmarksopenlevel}
+\ltx at IfUndefined{Hy at bookmarksdepth}{%
+  \def\BKM at depth{\c at tocdepth}%
+}{%
+  \let\BKM at depth\Hy at bookmarksdepth
+}
+\define at key{BKM}{depth}[]{%
+  \edef\BKM at param{#1}%
+  \ifx\BKM at param\@empty
+    \def\BKM at depth{\c at tocdepth}%
+  \else
+    \ltx at IfUndefined{toclevel@\BKM at param}{%
+      \@onelevel at sanitize\BKM at param
+      \edef\BKM at temp{\expandafter\@car\BKM at param\@nil}%
+      \ifcase 0\expandafter\ifx\BKM at temp-1\fi
+              \expandafter\ifnum\expandafter`\BKM at temp>47 %
+                \expandafter\ifnum\expandafter`\BKM at temp<58 %
+                  1%
+                \fi
+              \fi
+              \relax
+        \PackageWarning{bookmark}{%
+          Unknown document division name (\BKM at param)\MessageBreak
+          for option `depth'%
+        }%
+      \else
+        \BKM at SetDepthOrLevel\BKM at depth\BKM at param
+      \fi
+    }{%
+      \BKM at SetDepthOrLevel\BKM at depth{%
+        \csname toclevel@\BKM at param\endcsname
+      }%
+    }%
+  \fi
+}
+\def\bookmark at depth{\BKM at depth}
+\def\BKM at SetDepthOrLevel#1#2{%
+  \begingroup
+    \setbox\z@=\hbox{%
+      \count@=#2\relax
+      \expandafter
+    }%
+  \expandafter\endgroup
+  \expandafter\def\expandafter#1\expandafter{\the\count@}%
+}
+\DeclareStringOption[\BKM at currentlevel]{level}[\BKM at currentlevel]
+\define at key{BKM}{level}{%
+  \edef\BKM at param{#1}%
+  \ifx\BKM at param\BKM at MacroCurrentLevel
+    \let\BKM at level\BKM at param
+  \else
+    \ltx at IfUndefined{toclevel@\BKM at param}{%
+      \@onelevel at sanitize\BKM at param
+      \edef\BKM at temp{\expandafter\@car\BKM at param\@nil}%
+      \ifcase 0\expandafter\ifx\BKM at temp-1\fi
+              \expandafter\ifnum\expandafter`\BKM at temp>47 %
+                \expandafter\ifnum\expandafter`\BKM at temp<58 %
+                  1%
+                \fi
+              \fi
+              \relax
+        \PackageWarning{bookmark}{%
+          Unknown document division name (\BKM at param)\MessageBreak
+          for option `level'%
+        }%
+      \else
+        \BKM at SetDepthOrLevel\BKM at level\BKM at param
+      \fi
+    }{%
+      \BKM at SetDepthOrLevel\BKM at level{%
+        \csname toclevel@\BKM at param\endcsname
+      }%
+    }%
+  \fi
+}
+\def\BKM at MacroCurrentLevel{\BKM at currentlevel}
+\DeclareBoolOption{keeplevel}
+\DeclareBoolOption{startatroot}
+\def\BKM at startatrootfalse{%
+  \global\let\ifBKM at startatroot\iffalse
+}
+\def\BKM at startatroottrue{%
+  \global\let\ifBKM at startatroot\iftrue
+}
+\define at key{BKM}{rellevel}{%
+  \BKM at CalcExpr\BKM at level{#1}+\BKM at currentlevel
+}
+\def\bookmark at level{\BKM at level}
+\def\BKM at currentlevel{0}
+\DeclareBoolOption[%
+  \ifHy at bookmarksnumbered true\else false\fi
+]{numbered}
+\g at addto@macro\BKM at numberedtrue{%
+  \let\ifHy at bookmarksnumbered\iftrue
+}
+\g at addto@macro\BKM at numberedfalse{%
+  \let\ifHy at bookmarksnumbered\iffalse
+}
+\g at addto@macro\Hy at bookmarksnumberedtrue{%
+  \let\ifBKM at numbered\iftrue
+}
+\g at addto@macro\Hy at bookmarksnumberedfalse{%
+  \let\ifBKM at numbered\iffalse
+}
+\def\bookmark at numbered{%
+  \ifBKM at numbered\ltx at one\else\ltx at zero\fi
+}
+\def\BKM at PatchHyperrefOption#1{%
+  \expandafter\BKM@@PatchHyperrefOption\csname KV at Hyp@#1\endcsname%
+}
+\def\BKM@@PatchHyperrefOption#1{%
+  \expandafter\BKM@@@PatchHyperrefOption#1{##1}\BKM at nil#1%
+}
+\def\BKM@@@PatchHyperrefOption#1\BKM at nil#2#3{%
+  \def#2##1{%
+    #1%
+    \bookmarksetup{#3={##1}}%
+  }%
+}
+\BKM at PatchHyperrefOption{bookmarksopen}{open}
+\BKM at PatchHyperrefOption{bookmarksopenlevel}{openlevel}
+\BKM at PatchHyperrefOption{bookmarksdepth}{depth}
+\bitsetReset{BKM at FontStyle}%
+\define at key{BKM}{italic}[true]{%
+  \expandafter\ifx\csname if#1\endcsname\iftrue
+    \bitsetSet{BKM at FontStyle}{0}%
+  \else
+    \bitsetClear{BKM at FontStyle}{0}%
+  \fi
+}%
+\define at key{BKM}{bold}[true]{%
+  \expandafter\ifx\csname if#1\endcsname\iftrue
+    \bitsetSet{BKM at FontStyle}{1}%
+  \else
+    \bitsetClear{BKM at FontStyle}{1}%
+  \fi
+}%
+\def\bookmark at italic{%
+  \ifnum\bitsetGet{BKM at FontStyle}{0}=1 \ltx at one\else\ltx at zero\fi
+}
+\def\bookmark at bold{%
+  \ifnum\bitsetGet{BKM at FontStyle}{1}=1 \ltx at one\else\ltx at zero\fi
+}
+\def\BKM at PrintStyle{%
+  \bitsetGetDec{BKM at FontStyle}%
+}%
+\define at key{BKM}{color}{%
+  \HyColor at BookmarkColor{#1}\BKM at color{bookmark}{color}%
+}
+\let\BKM at color\@empty
+\def\bookmark at color{\BKM at color}
+\def\BKM at temp#1{%
+  \DeclareStringOption{#1}%
+  \expandafter\edef\csname bookmark@#1\endcsname{%
+    \expandafter\noexpand\csname BKM@#1\endcsname
+  }%
+}
+\BKM at temp{dest}
+\BKM at temp{named}
+\BKM at temp{uri}
+\BKM at temp{gotor}
+\BKM at temp{rawaction}
+\define at key{BKM}{page}{%
+  \def\BKM at page{#1}%
+  \ifx\BKM at page\@empty
+  \else
+    \edef\BKM at page{\number\BKM at page}%
+    \ifnum\BKM at page>\z@
+    \else
+      \PackageError{bookmark}{Page must be positive}\@ehc
+      \def\BKM at page{1}%
+    \fi
+  \fi
+}
+\let\BKM at page\@empty
+\def\bookmark at page{\BKM@@page}
+\define at key{BKM}{view}{%
+  \BKM at CheckView{#1}%
+}
+\let\BKM at view\@empty
+\def\bookmark at view{\BKM at view}
+\def\BKM at CheckView#1{%
+  \BKM at CheckViewType#1 \@nil
+}
+\def\BKM at CheckViewType#1 #2\@nil{%
+  \def\BKM at type{#1}%
+  \@onelevel at sanitize\BKM at type
+  \BKM at TestViewType{Fit}{}%
+  \BKM at TestViewType{FitB}{}%
+  \BKM at TestViewType{FitH}{%
+    \BKM at CheckParam#2 \@nil{top}%
+  }%
+  \BKM at TestViewType{FitBH}{%
+    \BKM at CheckParam#2 \@nil{top}%
+  }%
+  \BKM at TestViewType{FitV}{%
+    \BKM at CheckParam#2 \@nil{bottom}%
+  }%
+  \BKM at TestViewType{FitBV}{%
+    \BKM at CheckParam#2 \@nil{bottom}%
+  }%
+  \BKM at TestViewType{FitR}{%
+    \BKM at CheckRect{#2}{ }%
+  }%
+  \BKM at TestViewType{XYZ}{%
+    \BKM at CheckXYZ{#2}{ }%
+  }%
+  \@car{%
+    \PackageError{bookmark}{%
+      Unknown view type `\BKM at type',\MessageBreak
+      using `FitH' instead%
+    }\@ehc
+    \def\BKM at view{FitH}%
+  }%
+  \@nil
+}
+\def\BKM at TestViewType#1{%
+  \def\BKM at temp{#1}%
+  \@onelevel at sanitize\BKM at temp
+  \ifx\BKM at type\BKM at temp
+    \let\BKM at view\BKM at temp
+    \expandafter\@car
+  \else
+    \expandafter\@gobble
+  \fi
+}
+\def\BKM at CheckParam#1 #2\@nil#3{%
+  \def\BKM at param{#1}%
+  \ifx\BKM at param\@empty
+    \PackageWarning{bookmark}{%
+      Missing parameter (#3) for `\BKM at type',\MessageBreak
+      using 0%
+    }%
+    \def\BKM at param{0}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+}
+\def\BKM at CheckRect#1#2{%
+  \BKM@@CheckRect#1#2#2#2#2\@nil
+}
+\def\BKM@@CheckRect#1 #2 #3 #4 #5\@nil{%
+  \def\BKM at temp{0}%
+  \def\BKM at param{#1}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#2}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#3}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#4}%
+  \ifx\BKM at param\@empty
+    \def\BKM at param{0}%
+    \def\BKM at temp{1}%
+  \else
+    \BKM at CalcParam
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \ifnum\BKM at temp>\z@
+    \PackageWarning{bookmark}{Missing parameters for `\BKM at type'}%
+  \fi
+}
+\def\BKM at CheckXYZ#1#2{%
+  \BKM@@CheckXYZ#1#2#2#2\@nil
+}
+\def\BKM@@CheckXYZ#1 #2 #3 #4\@nil{%
+  \def\BKM at param{#1}%
+  \let\BKM at temp\BKM at param
+  \@onelevel at sanitize\BKM at temp
+  \ifx\BKM at param\@empty
+    \let\BKM at param\BKM at null
+  \else
+    \ifx\BKM at temp\BKM at null
+    \else
+      \BKM at CalcParam
+    \fi
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#2}%
+  \let\BKM at temp\BKM at param
+  \@onelevel at sanitize\BKM at temp
+  \ifx\BKM at param\@empty
+    \let\BKM at param\BKM at null
+  \else
+    \ifx\BKM at temp\BKM at null
+    \else
+      \BKM at CalcParam
+    \fi
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+  \def\BKM at param{#3}%
+  \ifx\BKM at param\@empty
+    \let\BKM at param\BKM at null
+  \fi
+  \edef\BKM at view{\BKM at view\space\BKM at param}%
+}
+\def\BKM at null{null}
+\@onelevel at sanitize\BKM at null
+\def\BKM at CalcParam{%
+  \begingroup
+  \let\calc\@firstofone
+  \expandafter\BKM@@CalcParam\BKM at param\@empty\@empty\@nil
+}
+\def\BKM@@CalcParam#1#2#3\@nil{%
+  \ifx\calc#1%
+    \@ifundefined{calc at assign@dimen}{%
+      \@ifundefined{dimexpr}{%
+        \setlength{\dimen@}{#2}%
+      }{%
+        \setlength{\dimen@}{\dimexpr#2\relax}%
+      }%
+    }{%
+      \setlength{\dimen@}{#2}%
+    }%
+    \dimen at .99626\dimen@
+    \edef\BKM at param{\strip at pt\dimen@}%
+    \expandafter\endgroup
+    \expandafter\def\expandafter\BKM at param\expandafter{\BKM at param}%
+  \else
+    \endgroup
+  \fi
+}
+\DeclareBoolOption{atend}
+\g at addto@macro\BKM at DisableOptions{%
+  \DisableKeyvalOption[action=warning,package=bookmark]%
+      {BKM}{atend}%
+}
+\newcommand*{\bookmarkdefinestyle}[2]{%
+  \@ifundefined{BKM at style@#1}{%
+  }{%
+    \PackageInfo{bookmark}{Redefining style `#1'}%
+  }%
+  \@namedef{BKM at style@#1}{#2}%
+}
+\define at key{BKM}{style}{%
+  \BKM at StyleCall{#1}%
+}
+\newif\ifBKM at ok
+\def\BKM at StyleCall#1{%
+  \@ifundefined{BKM at style@#1}{%
+    \PackageWarning{bookmark}{%
+      Ignoring unknown style `#1'%
+    }%
+  }{%
+    \BKM at oktrue
+    \edef\BKM at StyleCurrent{#1}%
+    \@onelevel at sanitize\BKM at StyleCurrent
+    \let\BKM at StyleEntry\BKM at StyleEntryCheck
+    \BKM at StyleStack
+    \ifBKM at ok
+      \expandafter\@firstofone
+    \else
+      \PackageError{bookmark}{%
+        Ignoring recursive call of style `\BKM at StyleCurrent'%
+      }\@ehc
+      \expandafter\@gobble
+    \fi
+    {%
+      \let\BKM at StyleEntry\relax
+      \edef\BKM at StyleStack{%
+        \BKM at StyleEntry{\BKM at StyleCurrent}%
+        \BKM at StyleStack
+      }%
+      \expandafter\expandafter\expandafter\bookmarksetup
+      \expandafter\expandafter\expandafter{%
+        \csname BKM at style@\BKM at StyleCurrent\endcsname
+      }%
+      \BKM at StyleStackPop
+    }%
+  }%
+}
+\def\BKM at StyleStackPop{%
+  \let\BKM at StyleEntry\relax
+  \edef\BKM at StyleStack{%
+    \expandafter\@gobbletwo\BKM at StyleStack
+  }%
+}
+\def\BKM at StyleEntryCheck#1{%
+  \def\BKM at temp{#1}%
+  \ifx\BKM at temp\BKM at StyleCurrent
+    \BKM at okfalse
+  \fi
+}
+\def\BKM at StyleStack{}
+\DeclareStringOption{srcline}
+\DeclareStringOption{srcfile}
+\def\BKM at hook{}
+\define at key{BKM}{addtohook}{%
+  \ltx at LocalAppendToMacro\BKM at hook{#1}%
+}
+\newcommand*{\bookmarkget}[1]{%
+  \romannumeral0%
+  \ltx at ifundefined{bookmark@#1}{%
+    \ltx at space
+  }{%
+    \expandafter\expandafter\expandafter\ltx at space
+    \csname bookmark@#1\endcsname
+  }%
+}
+\def\BKM at DefineDriverKey#1{%
+  \define at key{BKM}{#1}[]{%
+    \def\BKM at driver{#1}%
+  }%
+  \g at addto@macro\BKM at DisableOptions{%
+    \DisableKeyvalOption[action=warning,package=bookmark]%
+        {BKM}{#1}%
+  }%
+}
+\BKM at DefineDriverKey{pdftex}
+\BKM at DefineDriverKey{dvips}
+\BKM at DefineDriverKey{dvipsone}
+\BKM at DefineDriverKey{textures}
+\BKM at DefineDriverKey{dvipdfm}
+\BKM at DefineDriverKey{dvipdfmx}
+\BKM at DefineDriverKey{xetex}
+\BKM at DefineDriverKey{vtex}
+\define at key{BKM}{dvipdfmx-outline-open}[true]{%
+  \expandafter\ifx\csname if#1\expandafter\endcsname
+                  \csname iftrue\endcsname
+    \chardef\SpecialDvipdfmxOutlineOpen\@ne
+  \else
+    \chardef\SpecialDvipdfmxOutlineOpen\z@
+  \fi
+}
+\g at addto@macro\BKM at DisableOptions{%
+  \DisableKeyvalOption{BKM}{dvipdfmx-outline-open}%
+}
+\def\bookmark at driver{\BKM at driver}
+\InputIfFileExists{bookmark.cfg}{}{}
+\providecommand*{\BookmarkDriverDefault}{dvips}
+\ifpdf
+  \def\BKM at driver{pdftex}%
+  \ifx\pdfoutline\@undefined
+    \ifx\pdfextension\@undefined\else
+      \protected\def\pdfoutline{\pdfextension outline }
+    \fi
+  \fi
+\else
+  \ifxetex
+    \def\BKM at driver{dvipdfm}%
+  \else
+    \ifvtex
+      \def\BKM at driver{vtex}%
+    \else
+      \edef\BKM at driver{\BookmarkDriverDefault}%
+    \fi
+  \fi
+\fi
+\ProcessKeyvalOptions*
+\BKM at DisableOptions
+\ifBKM at draft
+  \PackageWarningNoLine{bookmark}{Draft mode on}%
+  \let\bookmarksetup\ltx at gobble
+  \let\BookmarkAtEnd\ltx at gobble
+  \let\bookmarkdefinestyle\ltx at gobbletwo
+  \let\bookmarkget\ltx at gobble
+  \let\pdfbookmark\ltx at undefined
+  \newcommand*{\pdfbookmark}[3][]{}%
+  \let\currentpdfbookmark\ltx at gobbletwo
+  \let\subpdfbookmark\ltx at gobbletwo
+  \let\belowpdfbookmark\ltx at gobbletwo
+  \newcommand*{\bookmark}[2][]{}%
+  \renewcommand*{\Hy at writebookmark}[5]{}%
+  \let\ReadBookmarks\relax
+  \let\BKM at DefGotoNameAction\ltx at gobbletwo % package `hypdestopt'
+  \expandafter\endinput
+\fi
+\newif\ifBKM at DvipdfmxOutlineOpen
+\ltx at IfUndefined{SpecialDvipdfmxOutlineOpen}{%
+  \ifxetex
+    \ifdim\number\XeTeXversion\XeTeXrevision in<0.9995in %
+    \else
+      \chardef\SpecialDvipdfmxOutlineOpen\ltx at one
+      \BKM at DvipdfmxOutlineOpentrue
+    \fi
+  \fi
+}{%
+  \ifnum\SpecialDvipdfmxOutlineOpen>\z@
+    \BKM at DvipdfmxOutlineOpentrue
+  \fi
+}
+\def\BKM at temp{dvipdfmx}%
+\ifx\BKM at temp\BKM at driver
+  \def\BKM at driver{dvipdfm}%
+\fi
+\def\BKM at temp{pdftex}%
+\ifpdf
+  \ifx\BKM at temp\BKM at driver
+  \else
+    \PackageWarningNoLine{bookmark}{%
+      Wrong driver `\BKM at driver', using `pdftex' instead%
+    }%
+    \let\BKM at driver\BKM at temp
+  \fi
+\else
+  \ifx\BKM at temp\BKM at driver
+    \PackageError{bookmark}{%
+      Wrong driver, pdfTeX is not running in PDF mode.\MessageBreak
+      Package loading is aborted%
+    }\@ehc
+    \expandafter\expandafter\expandafter\endinput
+  \fi
+  \def\BKM at temp{dvipdfm}%
+  \ifxetex
+    \ifx\BKM at temp\BKM at driver
+    \else
+      \PackageWarningNoLine{bookmark}{%
+        Wrong driver `\BKM at driver',\MessageBreak
+        using `dvipdfm' for XeTeX instead%
+      }%
+      \let\BKM at driver\BKM at temp
+    \fi
+  \else
+    \def\BKM at temp{vtex}%
+    \ifvtex
+      \ifx\BKM at temp\BKM at driver
+      \else
+        \PackageWarningNoLine{bookmark}{%
+          Wrong driver `\BKM at driver',\MessageBreak
+          using `vtex' for VTeX instead%
+        }%
+        \let\BKM at driver\BKM at temp
+      \fi
+    \else
+      \ifx\BKM at temp\BKM at 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 at driver.def}{}{%
+  \PackageError{bookmark}{%
+    Unsupported driver `\BKM at driver'.\MessageBreak
+    Package loading is aborted%
+  }\@ehc
+  \endinput
+}
+\let\pdfbookmark\ltx at undefined
+\newcommand*{\pdfbookmark}[3][0]{%
+  \bookmark[level=#1,dest={#3.#1}]{#2}%
+  \hyper at anchorstart{#3.#1}\hyper at anchorend
+}
+\def\currentpdfbookmark{%
+  \pdfbookmark[\BKM at currentlevel]%
+}
+\def\subpdfbookmark{%
+  \BKM at CalcExpr\BKM at CalcResult\BKM at currentlevel+1%
+  \expandafter\pdfbookmark\expandafter[\BKM at CalcResult]%
+}
+\def\belowpdfbookmark#1#2{%
+  \xdef\BKM at gtemp{\number\BKM at currentlevel}%
+  \subpdfbookmark{#1}{#2}%
+  \global\let\BKM at currentlevel\BKM at gtemp
+}
+\def\Hy at writebookmark#1#2#3#4#5{%
+  \ifnum#4>\BKM at depth\relax
+  \else
+    \def\BKM at type{#5}%
+    \ifx\BKM at type\Hy at bookmarkstype
+      \begingroup
+        \ifBKM at numbered
+          \let\numberline\Hy at numberline
+          \let\booknumberline\Hy at numberline
+          \let\partnumberline\Hy at numberline
+          \let\chapternumberline\Hy at numberline
+        \else
+          \let\numberline\@gobble
+          \let\booknumberline\@gobble
+          \let\partnumberline\@gobble
+          \let\chapternumberline\@gobble
+        \fi
+        \bookmark[level=#4,dest={#3}]{#2}%
+      \endgroup
+    \fi
+  \fi
+}
+\let\ReadBookmarks\relax
+\ifBKM at atend
+\else
+  \newcommand{\BookmarkAtEnd}[1]{%
+    \PackageWarning{bookmark}{%
+      Ignored, because option `atend' is missing%
+    }%
+  }%
+  \expandafter\endinput
+\fi
+\newcommand*{\BookmarkAtEnd}{%
+  \g at addto@macro\BKM at EndHook
+}
+\let\BKM at EndHook\@empty
+
+\endinput
+%%
+%% End of file `bookmark.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/bookmark/bookmark.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-12-04 22:50:21 UTC (rev 53025)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2019-12-04 22:50:54 UTC (rev 53026)
@@ -126,7 +126,7 @@
     blochsphere block blockdraw_mp bloques blowup blox
     bnumexpr bodegraph bohr boisik bold-extra
     boites boldtensors bondgraph bondgraphs
-    bookcover bookdb bookest bookhands booklet bookman
+    bookcover bookdb bookest bookhands booklet bookman bookmark
     booktabs booktabs-de booktabs-fr boolexpr boondox bophook
     borceux bosisio
     boxedminipage boxedminipage2e boxhandler bpchem bpolynomial

Added: trunk/Master/tlpkg/tlpsrc/bookmark.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc	2019-12-04 22:50:21 UTC (rev 53025)
+++ trunk/Master/tlpkg/tlpsrc/collection-latex.tlpsrc	2019-12-04 22:50:54 UTC (rev 53026)
@@ -11,6 +11,7 @@
 depend babel
 depend babel-english
 depend babelbib
+depend bookmark
 depend carlisle
 depend colortbl
 depend epstopdf-pkg



More information about the tex-live-commits mailing list