From 046927b57b0a0739186f6d42b6af76218d6d2f6a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 13 Jun 2018 21:44:46 +0000 Subject: xbmks (13jun18) git-svn-id: svn://tug.org/texlive/trunk@48005 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/xbmks/README.md | 7 ++- Master/texmf-dist/doc/latex/xbmks/docs/xbmks.pdf | Bin 0 -> 90233 bytes .../texmf-dist/doc/latex/xbmks/docs/xbmksman.pdf | Bin 193947 -> 200688 bytes .../texmf-dist/doc/latex/xbmks/docs/xbmksman.tex | 32 +++++++++--- .../texmf-dist/doc/latex/xbmks/examples/doc1.pdf | Bin 31874 -> 13348 bytes .../texmf-dist/doc/latex/xbmks/examples/doc1.tex | 5 +- .../texmf-dist/doc/latex/xbmks/examples/doc2.pdf | Bin 30227 -> 11984 bytes .../texmf-dist/doc/latex/xbmks/examples/doc2.tex | 4 +- .../texmf-dist/doc/latex/xbmks/examples/master.pdf | Bin 53092 -> 15811 bytes .../texmf-dist/doc/latex/xbmks/examples/master.tex | 8 +-- .../doc/latex/xbmks/examples/stand-alone.tex | 51 +++++++++++++++++++ Master/texmf-dist/source/latex/xbmks/xbmks.dtx | 56 ++++++++++++--------- Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def | 2 +- .../texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def | 2 +- Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def | 2 +- Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def | 2 +- Master/texmf-dist/tex/latex/xbmks/xbmks.sty | 48 +++++++++--------- 17 files changed, 150 insertions(+), 69 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/xbmks/docs/xbmks.pdf create mode 100644 Master/texmf-dist/doc/latex/xbmks/examples/stand-alone.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/xbmks/README.md b/Master/texmf-dist/doc/latex/xbmks/README.md index cab5c8ab91d..fc53fd66899 100644 --- a/Master/texmf-dist/doc/latex/xbmks/README.md +++ b/Master/texmf-dist/doc/latex/xbmks/README.md @@ -1,6 +1,6 @@ The xbmks Package Author: D. P. Story -Dated: 2018/06/11 +Dated: 2018/06/13 Short description: Create a cross-document bookmark tree. @@ -16,6 +16,11 @@ the bundle. PDF Creator: no restrictions, use dvips->distiller|ps2pdf, pdflatex, lualatex, or xelatex. +What's New (2018/06/13) Corrected a misspelling in the driver specification +for pdfmark. Now allow the docbundle key to be empty or missing; in this +case, we set docbundle=\jobname. Bookmarks are generated for that document +alone, as an extra benefit, the keys colors and style are still obeyed. + Now, I simply must get back to my retirement. diff --git a/Master/texmf-dist/doc/latex/xbmks/docs/xbmks.pdf b/Master/texmf-dist/doc/latex/xbmks/docs/xbmks.pdf new file mode 100644 index 00000000000..4cbeca1dd3d Binary files /dev/null and b/Master/texmf-dist/doc/latex/xbmks/docs/xbmks.pdf differ diff --git a/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.pdf b/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.pdf index 178da6d808a..c6fd8d39a0c 100644 Binary files a/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.pdf and b/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.pdf differ diff --git a/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.tex b/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.tex index bff6b09c411..149e707b375 100644 --- a/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.tex +++ b/Master/texmf-dist/doc/latex/xbmks/docs/xbmksman.tex @@ -11,11 +11,16 @@ aebxmp ]{aeb_pro} \usepackage{aeb_mlink} +\usepackage{xbmks} \usepackage{graphicx,array} %\usepackage{myriadpro} %\usepackage{calibri} \usepackage[altbullet]{lucidbry} +\xbmksetup{colors={intdoc=red},style={intbf}} + +\addtolength{\marginparwidth}{20pt} + %\previewtrue %\usepackage{makeidx} %\makeindex @@ -56,7 +61,7 @@ email={dpstory@acrotex.net}, subject={Documentation for the richtext package from AcroTeX}, talksite={\url{www.acrotex.net}}, - version={1.0, 2018/06/11}, + version={v1.1, 2018/06/13}, keywords={AcroTeX, rich text strings}, copyrightStatus=True, copyrightNotice={Copyright (C) \the\year, D. P. Story}, @@ -193,9 +198,9 @@ options. \paragraph*{Description of the key-values} \begin{description} - \item[\texttt{docbundle}] (Required) The value of this key, \emph{which - is required to be nonempty}, is a comma-delimited list of base names - that are a part of this document collection, or bundle. For example, + \item[\texttt{docbundle}] (Optional) The value of this key, if present, + is a comma-delimited list of base names that are a part of this + document collection, or bundle. For example, \begin{Verbatim}[xleftmargin=\amtIndent] docbundle={lesson1,lesson2,lesson3,lesson4} \end{Verbatim} @@ -214,6 +219,15 @@ files is the one currently being compiled; it is necessary in order to create a internal jump or an external jump. If anything goes wrong, be sure to check the spelling of each file listed. +\textbf{Empty or missing \texttt{docbundle} key.} If this key is missing, +then it is assigned a value of \cs{jobname}. As a result, normal bookmarks +are generated for the document \cs{jobname}; however, as an extra benefit, +the other keys are obeyed (\texttt{colors} and \texttt{style}). See the +sample file \texttt{stand-alone.tex} found in the \texttt{examples} file. +This manual uses the \pkg{xbmks} package with, +\begin{Verbatim}[xleftmargin=\amtIndent] +\xbmksetup{colors={intdoc=red},style={intbf}} +\end{Verbatim} \item[\texttt{colors}] (Optional) For any given document in the bundle, there are two types of links in the bookmarks, a link to an item in the current (or internal) document, or a link to an external document @@ -316,15 +330,17 @@ document links. collection and the \texttt{xbmks.cfg} configuration file that contains your setup options for the whole collection. \item If you are using \app{pdflatex}, \app{lualatex}, or - \app{xelatex}, you are done; otherwise, covert each DVI file to PS + \app{xelatex}, you are done; otherwise, convert each DVI file to PS using \app{dvips}. Finally, convert each PS file in the collection to PDF using \app{Acrobat Distiller} or \app{ps2pdf}. \item Delete all auxiliary file, including \texttt{xbmks.cfg} if you wish. \end{enumerate} If you are on \app{Windows OS}, you can use the -\app{\href{http://www.acrotex.net/builders/}{AeB Builder}} -utility.\footnote{\url{http://www.acrotex.net/builders/}} In that utility, you would select the -\app{External cross-references} option, found on the user-interface. +\app{\href{http://www.acrotex.net/builders/}{AeB Builder}} utility to build +the entire bundle of +documents.\footnote{\url{http://www.acrotex.net/builders/}} In that utility, +you would select the \app{External cross-references} option, found on the +user-interface. \paragraph*{Sample files.} The demonstration files are found in the \texttt{examples} folder. The \pkg{xcolor} package is used, otherwise, the packages used are minimal. diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/doc1.pdf b/Master/texmf-dist/doc/latex/xbmks/examples/doc1.pdf index 351354a5363..df5d6497a3a 100644 Binary files a/Master/texmf-dist/doc/latex/xbmks/examples/doc1.pdf and b/Master/texmf-dist/doc/latex/xbmks/examples/doc1.pdf differ diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/doc1.tex b/Master/texmf-dist/doc/latex/xbmks/examples/doc1.tex index 10dda228034..e45c5d894b5 100644 --- a/Master/texmf-dist/doc/latex/xbmks/examples/doc1.tex +++ b/Master/texmf-dist/doc/latex/xbmks/examples/doc1.tex @@ -1,11 +1,12 @@ -\documentclass{article} +\documentclass[12pt]{article} \usepackage{xcolor} +%\usepackage{xr-hyper} \usepackage[bookmarksopen]{hyperref} \usepackage{xbmks} + % the xr-hyper package may also be used if you have % cross document links within the body of the doc -%\usepackage{xr-hyper} %\externaldocument[m-]{master} %\externaldocument[d2-]{doc2} diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/doc2.pdf b/Master/texmf-dist/doc/latex/xbmks/examples/doc2.pdf index 494fa06b274..331bffa81d9 100644 Binary files a/Master/texmf-dist/doc/latex/xbmks/examples/doc2.pdf and b/Master/texmf-dist/doc/latex/xbmks/examples/doc2.pdf differ diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/doc2.tex b/Master/texmf-dist/doc/latex/xbmks/examples/doc2.tex index 9229cb1473e..9f033fefe80 100644 --- a/Master/texmf-dist/doc/latex/xbmks/examples/doc2.tex +++ b/Master/texmf-dist/doc/latex/xbmks/examples/doc2.tex @@ -1,11 +1,11 @@ -\documentclass{article} +\documentclass[12pt]{article} \usepackage{xcolor} +%\usepackage{xr-hyper} \usepackage[bookmarksopen]{hyperref} \usepackage{xbmks} % the xr-hyper package may also be used if you have % cross document links within the body of the doc -%\usepackage{xr-hyper} %\externaldocument[m-]{master} %\externaldocument[d1-]{doc1} diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/master.pdf b/Master/texmf-dist/doc/latex/xbmks/examples/master.pdf index f82fe27dc2d..63d6ad0cc0c 100644 Binary files a/Master/texmf-dist/doc/latex/xbmks/examples/master.pdf and b/Master/texmf-dist/doc/latex/xbmks/examples/master.pdf differ diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/master.tex b/Master/texmf-dist/doc/latex/xbmks/examples/master.tex index 21bd1f47927..1b0806a3ad6 100644 --- a/Master/texmf-dist/doc/latex/xbmks/examples/master.tex +++ b/Master/texmf-dist/doc/latex/xbmks/examples/master.tex @@ -1,24 +1,24 @@ -\documentclass{article} +\documentclass[12pt]{article} \usepackage{xcolor} +%\usepackage{xr-hyper} \usepackage[bookmarksopen]{hyperref} \usepackage{xbmks} % the xr-hyper package may also be used if you have % cross document links within the body of the doc -%\usepackage{xr-hyper} %\externaldocument[d1-]{doc1} %\externaldocument[d2-]{doc2} \title{On merging bookmarks for several documents} \author{D. P. Story} -% The \xbmksetup command is placed in only +% The \xbmksetup command is placed in only % one of the collection. It is written to xbmks.cfg % in input by the other files to obtain uniformity % of option choices. \xbmksetup{% docbundle={master,doc1,doc2}, -% colors={intdoc=red,extdoc}, + colors={intdoc=red,extdoc}, style={intbf} } diff --git a/Master/texmf-dist/doc/latex/xbmks/examples/stand-alone.tex b/Master/texmf-dist/doc/latex/xbmks/examples/stand-alone.tex new file mode 100644 index 00000000000..cb2a34fe0b6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xbmks/examples/stand-alone.tex @@ -0,0 +1,51 @@ +\documentclass[12pt]{article} +\usepackage{xcolor} +\usepackage[bookmarksopen]{hyperref} +\usepackage{xbmks} + +\title{Stand alone document} +\author{D. P. Story} + +\xbmksetup{% +% docbundle={\jobname}, + colors={intdoc=red,extdoc}, + style={intbf} +} + +\begin{document} + +\maketitle + +\section{Section One} + +When the \texttt{docbundle} key is either empty or is not present, \textsf{xbmks} sets it +to \verb~\jobname~. No cross-document bookmarks are generated because there was no specification +for creating (multiple values for \texttt{docbundle}); instead, we obtain a standard document +with bookmarks, but the color and style of of the bookmarks are controlled by the \texttt{colors} +and \texttt{style} keys, as seen in the preamble. + +\subsection{Section One: subSec 1} + +Some content goes here. + +\newpage + + +\section{Section Two} + +Some content goes here. + + +\subsection{Section Two: subSec 1} + +Some content goes here. + +\newpage + +\subsection{Section Two: subSec 2} + +Some content goes here. + + +\end{document} + diff --git a/Master/texmf-dist/source/latex/xbmks/xbmks.dtx b/Master/texmf-dist/source/latex/xbmks/xbmks.dtx index 8b69dd97b5e..65c3eae17ef 100644 --- a/Master/texmf-dist/source/latex/xbmks/xbmks.dtx +++ b/Master/texmf-dist/source/latex/xbmks/xbmks.dtx @@ -3,7 +3,7 @@ % makeindex -s gind.ist -o xbmks.ind xbmks.idx %<*copyright> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% +%% xbmks.sty package, %% %% Copyright (C) 2016--2018 %% %% dpstory@uakron.edu %% %% %% @@ -16,11 +16,14 @@ % %\NeedsTeXFormat{LaTeX2e}[1997/12/01] %\ProvidesPackage{xbmks} -% [2018/06/11 v1.0 xbmks: Cross-document bookmarks (dps)] +% [2018/06/13 v1.1 xbmks: Cross-document bookmarks (dps)] %<*driver> \documentclass{ltxdoc} -\usepackage[colorlinks,hyperindex=false]{hyperref} +\usepackage{xcolor} +\usepackage[colorlinks,hyperindex=false,bookmarksopen]{hyperref} \usepackage{fancyvrb,array,calc} +\usepackage{xbmks} +\xbmksetup{colors={intdoc=red},style={intbf}} %\pdfstringdefDisableCommands{\let\\\textbackslash} \EnableCrossrefs \CodelineIndex @@ -108,26 +111,26 @@ % \section{Drivers and options} % We support the drivers \app{dvips} (and \app{dvipsone}), \app{pdflatex}, \app{lualatex}, and \app{xelatex}; these % options are then named \opt{dvipsone}, \opt{dvips}, \opt{pdftex}, \opt{luatex}, and \opt{xetex}. +% \changes{v1.1}{2018/06/13}{Fixed misspelling of drive command for pdfmark case} % \begin{macrocode} -\def\xbmk@driver{bmks-pdfmark.def} -\DeclareOptionX{dvipsone}{\def\xbmk@driver{bmks-pdfmark.def}} +\def\xbmk@driver{xbmks-pdfmark.def} +\DeclareOptionX{dvipsone}{\def\xbmk@driver{xbmks-pdfmark.def}} \DeclareOptionX{dvips}{\def\xbmk@driver{xbmks-pdfmark.def}} \DeclareOptionX{pdftex}{\def\xbmk@driver{xbmks-pdftex.def}} \DeclareOptionX{luatex}{\def\xbmk@driver{xbmks-pdftex.def}} \DeclareOptionX{xetex}{\def\xbmk@driver{xbmks-xetex.def}} -%\AtEndOfPackage{\InputIfFileExists{\xbmk@driver}{}{}} % \end{macrocode} % \section{Process the options} % \begin{macrocode} \ifpdf\ExecuteOptionsX{pdftex}\else - \ifxetex\ExecuteOptionsX{xetex}\else - \let\ExecuteOptions@SAVE\ExecuteOptions - \let\ExecuteOptions\ExecuteOptionsX - \InputIfFileExists{web.cfg}{} - {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} - {\ExecuteOptionsX{dvipsone}}}% - \let\ExecuteOptions\ExecuteOptions@SAVE - \fi\fi +\ifxetex\ExecuteOptionsX{xetex}\else + \let\ExecuteOptions@SAVE\ExecuteOptions + \let\ExecuteOptions\ExecuteOptionsX + \InputIfFileExists{web.cfg}{} + {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} + {\ExecuteOptionsX{dvipsone}}}% + \let\ExecuteOptions\ExecuteOptions@SAVE +\fi\fi \ProcessOptionsX % \end{macrocode} % \section{Requirements} @@ -138,6 +141,7 @@ % \end{macrocode} % \begin{macro}{\xbmksetup} % Set the cross-document options: +% \changes{v1.1}{2018/06/13}{Allow an empty value of docbundle, its value is set to \string\cs{jobname}}% %\begin{quote}\ttfamily\obeylines %\string\xbmksetup\darg{% %\qquad docbundle=\darg{\ameta{doc\SUB1},\ameta{doc\SUB2},...,\ameta{doc\SUB{n}}}, @@ -161,22 +165,29 @@ \define@key{xbmk@colors}{intdoc}[]{% \HyColor@BookmarkColor{#1}{\xbmks@intdoc}{xbmks}{intdoc}% \ifx\xbmks@intdoc\@empty\else - \edef\xbmks@intdoc{/C [\xbmks@intdoc]}\fi + \edef\xbmks@intdoc{/C[\xbmks@intdoc]}\fi } \let\xbmks@intdoc\@empty \define@key{xbmk@colors}{extdoc}[]{% \HyColor@BookmarkColor{#1}{\xbmks@extdoc}{xbmks}{extdoc}% \ifx\xbmks@extdoc\@empty\else - \edef\xbmks@extdoc{/C [\xbmks@extdoc]}\fi + \edef\xbmks@extdoc{/C[\xbmks@extdoc]}\fi } \let\xbmks@extdoc\@empty -\let\xbmks@Yes=y -\let\xbmks@No=n +\let\xbmks@Yes=y \let\xbmks@No=n \define@boolkey{xbmk@style}{intbf}[true]{} %\ifKV@xbmk@style@intbf \define@boolkey{xbmk@style}{extbf}[true]{} \define@boolkey{xbmk@style}{intit}[true]{} \define@boolkey{xbmk@style}{extit}[true]{} -\newcommand{\xbmksetup}[1]{\write@xbmks@cfg{#1}} +\newcommand{\xbmksetup}[1]{\setkeys{xbmksetup}{#1}% + \ifx\x@bmks@docs\@empty + \PackageInfo{xbmks}{The docbundle key of \string\xbmksetup\space + is empty,\MessageBreak + I will give it a value of `\jobname',\MessageBreak + in hopes this is your intention}% + \def\xbmks@next{\write@xbmks@cfg{docbundle={\jobname},#1}}\else + \def\xbmks@next{\write@xbmks@cfg{#1}}\fi\xbmks@next +} \def\write@xbmks@cfg#1{% \newwrite\xbmks@setup \immediate\openout \xbmks@setup xbmks.cfg \set@display@protect @@ -186,12 +197,8 @@ } \newcommand{\xbmksetupi}[1]{% \setkeys{xbmksetup}{#1}% - \ifx\x@bmks@docs\@empty - \PackageWarning{xbmks}{The docbundle key is empty,\MessageBreak - this key must have a value for cross-document bookmarks\MessageBreak - to be generated}\else \edef\@exp@for{\noexpand\docbundle{\x@bmks@docs}}\expandafter - \@exp@for\fi + \@exp@for \edef\@exp@keys{\noexpand \setkeys{xbmk@colors}{\x@bmks@colors}}\@exp@keys \edef\@exp@keys{\noexpand @@ -518,7 +525,6 @@ bookmark package is not supported;\MessageBreak this package does nothing, as a result}} {\InputIfFileExists{\xbmk@driver}{}{}} - % % \end{macrocode} % \Finale diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def index 5e6634404f9..6f3d50316aa 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def @@ -7,7 +7,7 @@ %% xbmks.dtx (with options: `copyright,luatex') %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% +%% xbmks.sty package, %% %% Copyright (C) 2016--2018 %% %% dpstory@uakron.edu %% %% %% diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def index 953910afe17..d769e3436eb 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def @@ -7,7 +7,7 @@ %% xbmks.dtx (with options: `copyright,pdfmark') %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% +%% xbmks.sty package, %% %% Copyright (C) 2016--2018 %% %% dpstory@uakron.edu %% %% %% diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def index 42f2f79cf65..2adc7f171c6 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def @@ -7,7 +7,7 @@ %% xbmks.dtx (with options: `copyright,pdftex') %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% +%% xbmks.sty package, %% %% Copyright (C) 2016--2018 %% %% dpstory@uakron.edu %% %% %% diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def index 56211641a90..18622b9ee3c 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def @@ -7,7 +7,7 @@ %% xbmks.dtx (with options: `copyright,xetex') %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% +%% xbmks.sty package, %% %% Copyright (C) 2016--2018 %% %% dpstory@uakron.edu %% %% %% diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks.sty b/Master/texmf-dist/tex/latex/xbmks/xbmks.sty index 4185e81eaea..700bd082eeb 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks.sty +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks.sty @@ -7,7 +7,7 @@ %% xbmks.dtx (with options: `copyright,package') %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% +%% xbmks.sty package, %% %% Copyright (C) 2016--2018 %% %% dpstory@uakron.edu %% %% %% @@ -19,25 +19,25 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1997/12/01] \ProvidesPackage{xbmks} - [2018/06/11 v1.0 xbmks: Cross-document bookmarks (dps)] + [2018/06/13 v1.1 xbmks: Cross-document bookmarks (dps)] \RequirePackage{xkeyval} \RequirePackage{ifpdf}[2006/02/20] \RequirePackage{ifxetex}[2006/08/21] -\def\xbmk@driver{bmks-pdfmark.def} -\DeclareOptionX{dvipsone}{\def\xbmk@driver{bmks-pdfmark.def}} +\def\xbmk@driver{xbmks-pdfmark.def} +\DeclareOptionX{dvipsone}{\def\xbmk@driver{xbmks-pdfmark.def}} \DeclareOptionX{dvips}{\def\xbmk@driver{xbmks-pdfmark.def}} \DeclareOptionX{pdftex}{\def\xbmk@driver{xbmks-pdftex.def}} \DeclareOptionX{luatex}{\def\xbmk@driver{xbmks-pdftex.def}} \DeclareOptionX{xetex}{\def\xbmk@driver{xbmks-xetex.def}} \ifpdf\ExecuteOptionsX{pdftex}\else - \ifxetex\ExecuteOptionsX{xetex}\else - \let\ExecuteOptions@SAVE\ExecuteOptions - \let\ExecuteOptions\ExecuteOptionsX - \InputIfFileExists{web.cfg}{} - {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} - {\ExecuteOptionsX{dvipsone}}}% - \let\ExecuteOptions\ExecuteOptions@SAVE - \fi\fi +\ifxetex\ExecuteOptionsX{xetex}\else + \let\ExecuteOptions@SAVE\ExecuteOptions + \let\ExecuteOptions\ExecuteOptionsX + \InputIfFileExists{web.cfg}{} + {\@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} + {\ExecuteOptionsX{dvipsone}}}% + \let\ExecuteOptions\ExecuteOptions@SAVE +\fi\fi \ProcessOptionsX \RequirePackage{hyperref} \define@key{xbmksetup}{docbundle}[]{\def\x@bmks@docs{#1}} @@ -49,22 +49,29 @@ \define@key{xbmk@colors}{intdoc}[]{% \HyColor@BookmarkColor{#1}{\xbmks@intdoc}{xbmks}{intdoc}% \ifx\xbmks@intdoc\@empty\else - \edef\xbmks@intdoc{/C [\xbmks@intdoc]}\fi + \edef\xbmks@intdoc{/C[\xbmks@intdoc]}\fi } \let\xbmks@intdoc\@empty \define@key{xbmk@colors}{extdoc}[]{% \HyColor@BookmarkColor{#1}{\xbmks@extdoc}{xbmks}{extdoc}% \ifx\xbmks@extdoc\@empty\else - \edef\xbmks@extdoc{/C [\xbmks@extdoc]}\fi + \edef\xbmks@extdoc{/C[\xbmks@extdoc]}\fi } \let\xbmks@extdoc\@empty -\let\xbmks@Yes=y -\let\xbmks@No=n +\let\xbmks@Yes=y \let\xbmks@No=n \define@boolkey{xbmk@style}{intbf}[true]{} %\ifKV@xbmk@style@intbf \define@boolkey{xbmk@style}{extbf}[true]{} \define@boolkey{xbmk@style}{intit}[true]{} \define@boolkey{xbmk@style}{extit}[true]{} -\newcommand{\xbmksetup}[1]{\write@xbmks@cfg{#1}} +\newcommand{\xbmksetup}[1]{\setkeys{xbmksetup}{#1}% + \ifx\x@bmks@docs\@empty + \PackageInfo{xbmks}{The docbundle key of \string\xbmksetup\space + is empty,\MessageBreak + I will give it a value of `\jobname',\MessageBreak + in hopes this is your intention}% + \def\xbmks@next{\write@xbmks@cfg{docbundle={\jobname},#1}}\else + \def\xbmks@next{\write@xbmks@cfg{#1}}\fi\xbmks@next +} \def\write@xbmks@cfg#1{% \newwrite\xbmks@setup \immediate\openout \xbmks@setup xbmks.cfg \set@display@protect @@ -74,12 +81,8 @@ } \newcommand{\xbmksetupi}[1]{% \setkeys{xbmksetup}{#1}% - \ifx\x@bmks@docs\@empty - \PackageWarning{xbmks}{The docbundle key is empty,\MessageBreak - this key must have a value for cross-document bookmarks\MessageBreak - to be generated}\else \edef\@exp@for{\noexpand\docbundle{\x@bmks@docs}}\expandafter - \@exp@for\fi + \@exp@for \edef\@exp@keys{\noexpand \setkeys{xbmk@colors}{\x@bmks@colors}}\@exp@keys \edef\@exp@keys{\noexpand @@ -127,7 +130,6 @@ bookmark package is not supported;\MessageBreak this package does nothing, as a result}} {\InputIfFileExists{\xbmk@driver}{}{}} - \endinput %% %% End of file `xbmks.sty'. -- cgit v1.2.3