diff options
author | Norbert Preining <norbert@preining.info> | 2023-12-11 03:00:59 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-12-11 03:00:59 +0000 |
commit | 2bc01316d114d0fb18dec7c0f6f7b0aba6c21d66 (patch) | |
tree | 790206d4033894e86ea0e939042e78b9b60f2489 /macros/latex/contrib | |
parent | 4d14c5388a9581dee1111261078e6141963ec24f (diff) |
CTAN sync 202312110300
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r-- | macros/latex/contrib/bookmark/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/bookmark/bookmark-frozen.dtx | 1073 | ||||
-rw-r--r-- | macros/latex/contrib/bookmark/bookmark.dtx | 295 | ||||
-rw-r--r-- | macros/latex/contrib/bookmark/bookmark.ins | 123 | ||||
-rw-r--r-- | macros/latex/contrib/bookmark/bookmark.pdf | bin | 503992 -> 494460 bytes |
5 files changed, 216 insertions, 1277 deletions
diff --git a/macros/latex/contrib/bookmark/README.md b/macros/latex/contrib/bookmark/README.md index 6c024a40fa..1ccfb0baa2 100644 --- a/macros/latex/contrib/bookmark/README.md +++ b/macros/latex/contrib/bookmark/README.md @@ -1,6 +1,6 @@ # bookmark package for LaTeX -Version: 2023-12-05 v1.30 +Version: 2023-12-10 v1.31 This package implements a new bookmark (outline) organization for diff --git a/macros/latex/contrib/bookmark/bookmark-frozen.dtx b/macros/latex/contrib/bookmark/bookmark-frozen.dtx deleted file mode 100644 index 0223846a14..0000000000 --- a/macros/latex/contrib/bookmark/bookmark-frozen.dtx +++ /dev/null @@ -1,1073 +0,0 @@ -% \iffalse meta-comment -% -% File: bookmark-frozen.dtx -% Version: 2023-12-05 v1.30 -% Info: PDF bookmarks -% -% Copyright (C) -% 2007-2011 Heiko Oberdiek -% 2016-2023 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-pdftex.def, bkm-vtex.def, -% bkm-dvipdfm-2019-12-03.def, bkm-dvips-2019-12-03.def, -% bkm-pdftex-2019-12-03.def, bkm-vtex-2019-12-03.def, -% bookmark-example.tex. -% -% Distribution: -% CTAN:macros/latex/contrib/bookmark/bookmark.dtx -% CTAN:macros/latex/contrib/bookmark/bookmark-frozen.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-pdftex.def -% TDS:tex/latex/bookmark/bkm-vtex.def -% TDS:tex/latex/bookmark/bkm-dvipdfm-2019-12-03.def -% TDS:tex/latex/bookmark/bkm-dvips-2019-12-03.def -% TDS:tex/latex/bookmark/bkm-pdftex-2019-12-03.def -% TDS:tex/latex/bookmark/bkm-vtex-2019-12-03.def% -% TDS:doc/latex/bookmark/bookmark.pdf -% TDS:doc/latex/bookmark/bookmark-example.tex -% TDS:source/latex/bookmark/bookmark.dtx -% TDS:source/latex/bookmark/bookmark-frozen.dtx -% -% \fi -%<*pdftexfrozen> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-pdftex.def}% - [2019/12/03 v1.28 bookmark driver for pdfTeX (HO)]% -\def\BKM@DO@entry#1#2{% - \begingroup - \kvsetkeys{BKM@DO}{#1}% - \def\BKM@DO@title{#2}% - \ifx\BKM@DO@srcfile\@empty - \else - \BKM@UnescapeHex\BKM@DO@srcfile - \fi - \BKM@UnescapeHex\BKM@DO@title - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@DO@id\endcsname\@empty\@empty - \let\BKM@attr\@empty - \ifx\BKM@DO@flags\@empty - \else - \edef\BKM@attr{\BKM@attr/F \BKM@DO@flags}% - \fi - \ifx\BKM@DO@color\@empty - \else - \edef\BKM@attr{\BKM@attr/C[\BKM@DO@color]}% - \fi - \ifx\BKM@attr\@empty - \else - \edef\BKM@attr{attr{\BKM@attr}}% - \fi - \let\BKM@action\@empty - \ifx\BKM@DO@gotor\@empty - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@named\@empty - \ifx\BKM@DO@rawaction\@empty - \ifx\BKM@DO@uri\@empty - \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{% - Missing action\BKM@SourceLocation - }\@ehc - \edef\BKM@action{goto page1{/Fit}}% - \else - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{goto page\BKM@DO@page{/\BKM@DO@view}}% - \fi - \else - \BKM@UnescapeHex\BKM@DO@uri - \BKM@EscapeString\BKM@DO@uri - \edef\BKM@action{user{<</S/URI/URI(\BKM@DO@uri)>>}}% - \fi - \else - \BKM@UnescapeHex\BKM@DO@rawaction - \edef\BKM@action{% - user{% - <<% - \BKM@DO@rawaction - >>% - }% - }% - \fi - \else - \BKM@EscapeName\BKM@DO@named - \edef\BKM@action{% - user{<</S/Named/N/\BKM@DO@named>>}% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@DefGotoNameAction\BKM@action\BKM@DO@dest - \fi - \else - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@page\@empty - \def\BKM@DO@page{0}% - \else - \BKM@CalcExpr\BKM@DO@page\BKM@DO@page-1% - \fi - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{/D[\BKM@DO@page/\BKM@DO@view]}% - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@EscapeString\BKM@DO@dest - \edef\BKM@action{/D(\BKM@DO@dest)}% - \fi - \BKM@UnescapeHex\BKM@DO@gotor - \BKM@EscapeString\BKM@DO@gotor - \edef\BKM@action{% - user{% - <<% - /S/GoToR% - /F(\BKM@DO@gotor)% - \BKM@action - >>% - }% - }% - \fi - \pdfoutline\BKM@attr\BKM@action - count\ifBKM@DO@open\else-\fi\BKM@x@childs - {\BKM@DO@title}% - \endgroup -} -\def\BKM@DefGotoNameAction#1#2{% - \BKM@EscapeString\BKM@DO@dest - \edef#1{goto name{#2}}% -} -\def\BKM@SourceLocation{% - \ifx\BKM@DO@srcfile\@empty - \ifx\BKM@DO@srcline\@empty - \else - .\MessageBreak - Source: line \BKM@DO@srcline - \fi - \else - \ifx\BKM@DO@srcline\@empty - .\MessageBreak - Source: file `\BKM@DO@srcfile'% - \else - .\MessageBreak - Source: file `\BKM@DO@srcfile', line \BKM@DO@srcline - \fi - \fi -} -\RequirePackage{auxhook} -\AddLineBeginMainAux{% - \string\providecommand\string\BKM@entry[2]{}% -} -\newcount\BKM@id -\BKM@id=\z@ -\@namedef{BKM@0}{000} -\newif\ifBKM@sw -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \BKM@InitSourceLocation - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \ifx\BKM@srcfile\@empty - \else - \BKM@EscapeHex\BKM@srcfile - \fi - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}0% - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}0% - }% - \ifnum\BKM@prev>\z@ - \BKM@CalcExpr\BKM@CalcResult\BKM@x@childs+1% - \expandafter\xdef\csname BKM@\BKM@prev\endcsname{% - {\BKM@x@parent}{\BKM@x@level}{\BKM@CalcResult}% - }% - \fi - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \pdfstringdef\BKM@title{\bookmark@text}% - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \csname BKM@HypDestOptHook\endcsname - \BKM@EscapeHex\BKM@dest - \BKM@EscapeHex\BKM@uri - \BKM@EscapeHex\BKM@gotor - \BKM@EscapeHex\BKM@rawaction - \BKM@EscapeHex\BKM@title - \immediate\write\@mainaux{% - \string\BKM@entry{% - id=\number\BKM@id - \ifBKM@open - \ifnum\BKM@level<\BKM@openlevel - ,open% - \fi - \fi - \BKM@auxentry{dest}% - \BKM@auxentry{named}% - \BKM@auxentry{uri}% - \BKM@auxentry{gotor}% - \BKM@auxentry{page}% - \BKM@auxentry{view}% - \BKM@auxentry{rawaction}% - \BKM@auxentry{color}% - \ifnum\BKM@FLAGS>\z@ - ,flags=\BKM@FLAGS - \fi - \BKM@auxentry{srcline}% - \BKM@auxentry{srcfile}% - }{\BKM@title}% - }% - \endgroup - \fi -} -\def\BKM@getx#1#2#3{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% - \def\BKM@x@childs{#3}% -} -\def\BKM@auxentry#1{% - \expandafter\ifx\csname BKM@#1\endcsname\@empty - \else - ,#1={\csname BKM@#1\endcsname}% - \fi -} -\def\BKM@InitSourceLocation{% - \edef\BKM@srcline{\the\inputlineno}% - \BKM@LuaTeX@InitFile - \ifx\BKM@srcfile\@empty - \ltx@IfUndefined{currfilepath}{}{% - \edef\BKM@srcfile{\currfilepath}% - }% - \fi -} -\ifluatex - \ifnum\luatexversion>36 % - \def\BKM@LuaTeX@InitFile{% - \begingroup - \ltx@LocToksA={}% - \edef\x{\endgroup - \def\noexpand\BKM@srcfile{% - \the\expandafter\ltx@LocToksA - \directlua{% - if status and status.filename then % - tex.settoks('ltx@LocToksA', status.filename)% - end% - }% - }% - }\x - }% - \else - \let\BKM@LuaTeX@InitFile\relax - \fi -\else - \let\BKM@LuaTeX@InitFile\relax -\fi -\SetupKeyvalOptions{family=BKM@DO,prefix=BKM@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@entry\BKM@DO@entry -} -\ifBKM@atend - \AfterLastShipout{% - \BKM@EndHook - }% -\fi -%</pdftexfrozen> -%<*dvipsfrozen> -\def\BKM@SourceLocation{% - \ifx\BKM@DO@srcfile\@empty - \ifx\BKM@DO@srcline\@empty - \else - .\MessageBreak - Source: line \BKM@DO@srcline - \fi - \else - \ifx\BKM@DO@srcline\@empty - .\MessageBreak - Source: file `\BKM@DO@srcfile'% - \else - .\MessageBreak - Source: file `\BKM@DO@srcfile', line \BKM@DO@srcline - \fi - \fi -} -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-dvips.def}% - [2019/12/03 v1.28 bookmark driver for dvips (HO)]% -\def\BKM@PSHeaderFile#1{% - \special{header=#1}% -} -\def\BKM@filename{\jobname.out.ps} -\BKM@PSHeaderFile\BKM@filename -\RequirePackage{atveryend}[2009/12/07] -\AfterLastShipout{\BKM@pdfmark@out} -\def\BKM@pdfmark@out{% - \if@filesw - \newwrite\BKM@file - \immediate\openout\BKM@file=\BKM@filename\relax - \BKM@write{\@percentchar!}% - \BKM@write{/pdfmark where{pop}}% - \BKM@write{% - {% - /globaldict where{pop globaldict}{userdict}ifelse% - /pdfmark/cleartomark load put% - }% - }% - \BKM@write{ifelse}% - \else - \let\BKM@write\@gobble - \let\BKM@DO@entry\@gobbletwo - \fi -} -\def\BKM@write#{% - \immediate\write\BKM@file -} -\def\BKM@DO@entry#1#2{% - \begingroup - \kvsetkeys{BKM@DO}{#1}% - \ifx\BKM@DO@srcfile\@empty - \else - \BKM@UnescapeHex\BKM@DO@srcfile - \fi - \def\BKM@DO@title{#2}% - \BKM@UnescapeHex\BKM@DO@title - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@DO@id\endcsname\@empty\@empty - \let\BKM@attr\@empty - \ifx\BKM@DO@flags\@empty - \else - \edef\BKM@attr{\BKM@attr/F \BKM@DO@flags}% - \fi - \ifx\BKM@DO@color\@empty - \else - \edef\BKM@attr{\BKM@attr/C[\BKM@DO@color]}% - \fi - \let\BKM@action\@empty - \ifx\BKM@DO@gotor\@empty - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@named\@empty - \ifx\BKM@DO@rawaction\@empty - \ifx\BKM@DO@uri\@empty - \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{% - Missing action\BKM@SourceLocation - }\@ehc - \edef\BKM@action{% - /Action/GoTo% - /Page 1% - /View[/Fit]% - }% - \else - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{% - /Action/GoTo% - /Page \BKM@DO@page - /View[/\BKM@DO@view]% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@uri - \BKM@EscapeString\BKM@DO@uri - \edef\BKM@action{% - /Action<<% - /Subtype/URI% - /URI(\BKM@DO@uri)% - >>% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@rawaction - \edef\BKM@action{% - /Action<<% - \BKM@DO@rawaction - >>% - }% - \fi - \else - \BKM@EscapeName\BKM@DO@named - \edef\BKM@action{% - /Action<<% - /Subtype/Named% - /N/\BKM@DO@named - >>% - }% - \fi - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@EscapeString\BKM@DO@dest - \edef\BKM@action{% - /Action/GoTo% - /Dest(\BKM@DO@dest)cvn% - }% - \fi - \else - \ifx\BKM@DO@dest\@empty - \ifx\BKM@DO@page\@empty - \def\BKM@DO@page{1}% - \fi - \ifx\BKM@DO@view\@empty - \def\BKM@DO@view{Fit}% - \fi - \edef\BKM@action{% - /Page \BKM@DO@page - /View[/\BKM@DO@view]% - }% - \else - \BKM@UnescapeHex\BKM@DO@dest - \BKM@EscapeString\BKM@DO@dest - \edef\BKM@action{% - /Dest(\BKM@DO@dest)cvn% - }% - \fi - \BKM@UnescapeHex\BKM@DO@gotor - \BKM@EscapeString\BKM@DO@gotor - \edef\BKM@action{% - /Action/GoToR% - /File(\BKM@DO@gotor)% - \BKM@action - }% - \fi - \BKM@write{[}% - \BKM@write{/Title(\BKM@DO@title)}% - \ifnum\BKM@x@childs>\z@ - \BKM@write{/Count \ifBKM@DO@open\else-\fi\BKM@x@childs}% - \fi - \ifx\BKM@attr\@empty - \else - \BKM@write{\BKM@attr}% - \fi - \BKM@write{\BKM@action}% - \BKM@write{/OUT pdfmark}% - \endgroup -} -\RequirePackage{auxhook} -\AddLineBeginMainAux{% - \string\providecommand\string\BKM@entry[2]{}% -} -\newcount\BKM@id -\BKM@id=\z@ -\@namedef{BKM@0}{000} -\newif\ifBKM@sw -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \BKM@InitSourceLocation - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \ifx\BKM@srcfile\@empty - \else - \BKM@EscapeHex\BKM@srcfile - \fi - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}0% - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}0% - }% - \ifnum\BKM@prev>\z@ - \BKM@CalcExpr\BKM@CalcResult\BKM@x@childs+1% - \expandafter\xdef\csname BKM@\BKM@prev\endcsname{% - {\BKM@x@parent}{\BKM@x@level}{\BKM@CalcResult}% - }% - \fi - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \pdfstringdef\BKM@title{\bookmark@text}% - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \csname BKM@HypDestOptHook\endcsname - \BKM@EscapeHex\BKM@dest - \BKM@EscapeHex\BKM@uri - \BKM@EscapeHex\BKM@gotor - \BKM@EscapeHex\BKM@rawaction - \BKM@EscapeHex\BKM@title - \immediate\write\@mainaux{% - \string\BKM@entry{% - id=\number\BKM@id - \ifBKM@open - \ifnum\BKM@level<\BKM@openlevel - ,open% - \fi - \fi - \BKM@auxentry{dest}% - \BKM@auxentry{named}% - \BKM@auxentry{uri}% - \BKM@auxentry{gotor}% - \BKM@auxentry{page}% - \BKM@auxentry{view}% - \BKM@auxentry{rawaction}% - \BKM@auxentry{color}% - \ifnum\BKM@FLAGS>\z@ - ,flags=\BKM@FLAGS - \fi - \BKM@auxentry{srcline}% - \BKM@auxentry{srcfile}% - }{\BKM@title}% - }% - \endgroup - \fi -} -\def\BKM@getx#1#2#3{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% - \def\BKM@x@childs{#3}% -} -\def\BKM@auxentry#1{% - \expandafter\ifx\csname BKM@#1\endcsname\@empty - \else - ,#1={\csname BKM@#1\endcsname}% - \fi -} -\def\BKM@InitSourceLocation{% - \edef\BKM@srcline{\the\inputlineno}% - \BKM@LuaTeX@InitFile - \ifx\BKM@srcfile\@empty - \ltx@IfUndefined{currfilepath}{}{% - \edef\BKM@srcfile{\currfilepath}% - }% - \fi -} -\ifluatex - \ifnum\luatexversion>36 % - \def\BKM@LuaTeX@InitFile{% - \begingroup - \ltx@LocToksA={}% - \edef\x{\endgroup - \def\noexpand\BKM@srcfile{% - \the\expandafter\ltx@LocToksA - \directlua{% - if status and status.filename then % - tex.settoks('ltx@LocToksA', status.filename)% - end% - }% - }% - }\x - }% - \else - \let\BKM@LuaTeX@InitFile\relax - \fi -\else - \let\BKM@LuaTeX@InitFile\relax -\fi -\SetupKeyvalOptions{family=BKM@DO,prefix=BKM@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@entry\BKM@DO@entry -} -\ifBKM@atend - \AfterLastShipout{% - \BKM@EndHook - }% -\fi -%</dvipsfrozen> -%<*dvipdfmfrozen> -\NeedsTeXFormat{LaTeX2e} -\ProvidesFile{bkm-dvipdfm.def}% - [2019/12/03 v1.28 bookmark driver for dvipdfm (HO)]% -\newcount\BKM@id -\BKM@id=\z@ -\@namedef{BKM@0}{000} -\newif\ifBKM@sw -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \def\BKM@abslevel{1}% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}\BKM@abslevel - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \BKM@CalcExpr\BKM@abslevel\BKM@x@abslevel+1% - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}\BKM@abslevel - }% - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \csname HyPsd@XeTeXBigCharstrue\endcsname - \pdfstringdef\BKM@title{\bookmark@text}% - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \let\BKM@action\@empty - \ifx\BKM@gotor\@empty - \ifx\BKM@dest\@empty - \ifx\BKM@named\@empty - \ifx\BKM@rawaction\@empty - \ifx\BKM@uri\@empty - \ifx\BKM@page\@empty - \PackageError{bookmark}{Missing action}\@ehc - \edef\BKM@action{/Dest[@page1/Fit]}% - \else - \ifx\BKM@view\@empty - \def\BKM@view{Fit}% - \fi - \edef\BKM@action{/Dest[@page\BKM@page/\BKM@view]}% - \fi - \else - \BKM@EscapeString\BKM@uri - \edef\BKM@action{% - /A<<% - /S/URI% - /URI(\BKM@uri)% - >>% - }% - \fi - \else - \edef\BKM@action{/A<<\BKM@rawaction>>}% - \fi - \else - \BKM@EscapeName\BKM@named - \edef\BKM@action{% - /A<</S/Named/N/\BKM@named>>% - }% - \fi - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{% - /A<<% - /S/GoTo% - /D(\BKM@dest)% - >>% - }% - \fi - \else - \ifx\BKM@dest\@empty - \ifx\BKM@page\@empty - \def\BKM@page{0}% - \else - \BKM@CalcExpr\BKM@page\BKM@page-1% - \fi - \ifx\BKM@view\@empty - \def\BKM@view{Fit}% - \fi - \edef\BKM@action{/D[\BKM@page/\BKM@view]}% - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{/D(\BKM@dest)}% - \fi - \BKM@EscapeString\BKM@gotor - \edef\BKM@action{% - /A<<% - /S/GoToR% - /F(\BKM@gotor)% - \BKM@action - >>% - }% - \fi - \special{pdf:% - out \ifBKM@DvipdfmxOutlineOpen - [% - \ifBKM@open - \ifnum\BKM@level<% - \expandafter\ltx@firstofone\expandafter - {\number\BKM@openlevel} % - \else - -% - \fi - \else - -% - \fi - ] % - \fi - \BKM@abslevel - <<% - /Title(\BKM@title)% - \ifx\BKM@color\@empty - \else - /C[\BKM@color]% - \fi - \ifnum\BKM@FLAGS>\z@ - /F \BKM@FLAGS - \fi - \BKM@action - >>% - }% - \endgroup - \fi -} -\def\BKM@getx#1#2#3{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% - \def\BKM@x@abslevel{#3}% -} -\ifBKM@atend - \RequirePackage{atenddvi}% - \AtEndDvi{\BKM@EndHook}% -\fi -%</dvipdfmfrozen> -%<*vtexfrozen> -\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@id -\BKM@id=\z@ -\@namedef{BKM@0}{00} -\newif\ifBKM@sw -\newcommand*{\bookmark}[2][]{% - \if@filesw - \begingroup - \def\bookmark@text{#2}% - \BKM@setup{#1}% - \edef\BKM@prev{\the\BKM@id}% - \global\advance\BKM@id\@ne - \BKM@swtrue - \@whilesw\ifBKM@sw\fi{% - \ifnum\ifBKM@startatroot\z@\else\BKM@prev\fi=\z@ - \BKM@startatrootfalse - \def\BKM@parent{0}% - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - 0{\BKM@level}% - }% - \BKM@swfalse - \else - \expandafter\expandafter\expandafter\BKM@getx - \csname BKM@\BKM@prev\endcsname - \ifnum\BKM@level>\BKM@x@level\relax - \let\BKM@parent\BKM@prev - \expandafter\xdef\csname BKM@\the\BKM@id\endcsname{% - {\BKM@prev}{\BKM@level}% - }% - \BKM@swfalse - \else - \let\BKM@prev\BKM@x@parent - \fi - \fi - }% - \pdfstringdef\BKM@title{\bookmark@text}% - \BKM@vtex@title - \edef\BKM@FLAGS{\BKM@PrintStyle}% - \let\BKM@action\@empty - \ifx\BKM@gotor\@empty - \ifx\BKM@dest\@empty - \ifx\BKM@named\@empty - \ifx\BKM@rawaction\@empty - \ifx\BKM@uri\@empty - \ifx\BKM@page\@empty - \PackageError{bookmark}{Missing action}\@ehc - \def\BKM@action{!1}% - \else - \edef\BKM@action{!\BKM@page}% - \fi - \else - \BKM@EscapeString\BKM@uri - \edef\BKM@action{% - <u=% - /S/URI% - /URI(\BKM@uri)% - >% - }% - \fi - \else - \edef\BKM@action{<u=\BKM@rawaction>}% - \fi - \else - \BKM@EscapeName\BKM@named - \edef\BKM@action{% - <u=% - /S/Named% - /N/\BKM@named - >% - }% - \fi - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{\BKM@dest}% - \fi - \else - \ifx\BKM@dest\@empty - \ifx\BKM@page\@empty - \def\BKM@page{1}% - \fi - \ifx\BKM@view\@empty - \def\BKM@view{Fit}% - \fi - \edef\BKM@action{/D[\BKM@page/\BKM@view]}% - \else - \BKM@EscapeString\BKM@dest - \edef\BKM@action{/D(\BKM@dest)}% - \fi - \BKM@EscapeString\BKM@gotor - \edef\BKM@action{% - <u=% - /S/GoToR% - /F(\BKM@gotor)% - \BKM@action - >>% - }% - \fi - \ifx\BKM@color\@empty - \let\BKM@RGBcolor\@empty - \else - \expandafter\BKM@toRGB\BKM@color\@nil - \fi - \special{% - !outline \BKM@action;% - p=\BKM@parent,% - i=\number\BKM@id,% - s=% - \ifBKM@open - \ifnum\BKM@level<\BKM@openlevel - o% - \else - c% - \fi - \else - c% - \fi,% - \ifx\BKM@RGBcolor\@empty - \else - c=\BKM@RGBcolor,% - \fi - \ifnum\BKM@FLAGS>\z@ - f=\BKM@FLAGS,% - \fi - t=\BKM@title - }% - \endgroup - \fi -} -\def\BKM@getx#1#2{% - \def\BKM@x@parent{#1}% - \def\BKM@x@level{#2}% -} -\def\BKM@toRGB#1 #2 #3\@nil{% - \let\BKM@RGBcolor\@empty - \BKM@toRGBComponent{#1}% - \BKM@toRGBComponent{#2}% - \BKM@toRGBComponent{#3}% -} -\def\BKM@toRGBComponent#1{% - \dimen@=#1pt\relax - \ifdim\dimen@>\z@ - \ifdim\dimen@<\p@ - \dimen@=255\dimen@ - \advance\dimen@ by 32768sp\relax - \divide\dimen@ by 65536\relax - \dimen@ii=\dimen@ - \divide\dimen@ii by 16\relax - \edef\BKM@RGBcolor{% - \BKM@RGBcolor - \BKM@toHexDigit\dimen@ii - }% - \dimen@ii=16\dimen@ii - \advance\dimen@-\dimen@ii - \edef\BKM@RGBcolor{% - \BKM@RGBcolor - \BKM@toHexDigit\dimen@ - }% - \else - \edef\BKM@RGBcolor{\BKM@RGBcolor FF}% - \fi - \else - \edef\BKM@RGBcolor{\BKM@RGBcolor00}% - \fi -} -\def\BKM@toHexDigit#1{% - \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@vtex@title{% - |@onelevel@sanitize|BKM@title - |edef|BKM@title{|expandafter|BKM@vtex@leftparen|BKM@title\(|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@rightparen|BKM@title\)|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@zero|BKM@title\0|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@one|BKM@title\1|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@two|BKM@title\2|@nil}% - |edef|BKM@title{|expandafter|BKM@vtex@three|BKM@title\3|@nil}% - }% - |gdef|BKM@vtex@leftparen#1\(#2|@nil{% - #1% - |ifx||#2||% - |else - (% - |ltx@ReturnAfterFi{% - |BKM@vtex@leftparen#2|@nil - }% - |fi - }% - |gdef|BKM@vtex@rightparen#1\)#2|@nil{% - #1% - |ifx||#2||% - |else - )% - |ltx@ReturnAfterFi{% - |BKM@vtex@rightparen#2|@nil - }% - |fi - }% - |gdef|BKM@vtex@zero#1\0#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char0% - |ltx@ReturnAfterFi{% - |BKM@vtex@zero#2|@nil - }% - |fi - }% - |gdef|BKM@vtex@one#1\1#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char1% - |ltx@ReturnAfterFi{% - |BKM@vtex@one#2|@nil - }% - |fi - }% - |gdef|BKM@vtex@two#1\2#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char2% - |ltx@ReturnAfterFi{% - |BKM@vtex@two#2|@nil - }% - |fi - }% - |gdef|BKM@vtex@three#1\3#2|@nil{% - #1% - |ifx||#2||% - |else - |noexpand|hv@pdf@char3% - |ltx@ReturnAfterFi{% - |BKM@vtex@three#2|@nil - }% - |fi - }% -|endgroup -\ifBKM@atend - \RequirePackage{atenddvi}% - \AtEndDvi{\BKM@EndHook}% -\fi -%</vtexfrozen> diff --git a/macros/latex/contrib/bookmark/bookmark.dtx b/macros/latex/contrib/bookmark/bookmark.dtx index 9ead2a0c9a..0374aaeae9 100644 --- a/macros/latex/contrib/bookmark/bookmark.dtx +++ b/macros/latex/contrib/bookmark/bookmark.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: bookmark.dtx -% Version: 2023-12-05 v1.30 +% Version: 2023-12-10 v1.31 % Info: PDF bookmarks % % Copyright (C) @@ -25,40 +25,30 @@ % 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, +% This work consists of the main source files bookmark.dtx, +% and bookmark.ins and the derived files +% bookmark.sty, bookmark.pdf, % bkm-dvipdfm.def, bkm-dvips.def, % bkm-pdftex.def, bkm-vtex.def, -% bkm-dvipdfm-2019-12-03.def, bkm-dvips-2019-12-03.def, -% bkm-pdftex-2019-12-03.def, bkm-vtex-2019-12-03.def, % bookmark-example.tex. % % Distribution: % CTAN:macros/latex/contrib/bookmark/bookmark.dtx -% CTAN:macros/latex/contrib/bookmark/bookmark-frozen.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) +% tex/pdftex/pdflatex bookmark.ins % % Documentation: -% (a) If bookmark.drv is present: -% latex bookmark.drv -% (b) Without bookmark.drv: -% latex bookmark.dtx; ... +% +% (pdf)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): +% Program calls to get the documentation (example): % pdflatex bookmark.dtx % makeindex -s gind.ist bookmark.idx % pdflatex bookmark.dtx @@ -71,121 +61,14 @@ % TDS:tex/latex/bookmark/bkm-dvips.def % TDS:tex/latex/bookmark/bkm-pdftex.def % TDS:tex/latex/bookmark/bkm-vtex.def -% TDS:tex/latex/bookmark/bkm-dvipdfm-2019-12-03.def -% TDS:tex/latex/bookmark/bkm-dvips-2019-12-03.def -% TDS:tex/latex/bookmark/bkm-pdftex-2019-12-03.def -% TDS:tex/latex/bookmark/bkm-vtex-2019-12-03.def% % TDS:doc/latex/bookmark/bookmark.pdf % TDS:doc/latex/bookmark/bookmark-example.tex % TDS:source/latex/bookmark/bookmark.dtx -% TDS:source/latex/bookmark/bookmark-frozen.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 2023-12-05 v1.30 PDF bookmarks (HO)} -\Msg{************************************************************************} - -\keepsilent -\askforoverwritefalse - -\let\MetaPrefix\relax -\preamble - -This is a generated file. - -Project: bookmark -Version: 2023-12-05 v1.30 - -Copyright (C) - 2007-2011 Heiko Oberdiek - 2016-2023 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 bookmark-frozen.dtx -and the derived files - bookmark.sty, bookmark.pdf, bookmark.ins, bookmark.drv, - bkm-dvipdfm.def, bkm-dvips.def, bkm-pdftex.def, bkm-vtex.def, - bkm-dvipdfm-2019-12-03.def, bkm-dvips-2019-12-03.def, - bkm-pdftex-2019-12-03.def, bkm-vtex-2019-12-03.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-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}}% - \file{bkm-pdftex-2019-12-03.def}{\from{bookmark-frozen.dtx}{pdftexfrozen}}% - \file{bkm-dvips-2019-12-03.def}{\from{bookmark-frozen.dtx}{dvipsfrozen}}% - \file{bkm-vtex-2019-12-03.def}{\from{bookmark-frozen.dtx}{vtexfrozen}}% - \file{bkm-dvipdfm-2019-12-03.def}{\from{bookmark-frozen.dtx}{dvipdfmfrozen}}% -} - -\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-pdftex.def, bkm-vtex.def, bkm-dvipdfm-2019-12-03.def,} -\Msg{* bkm-dvips-2019-12-03.def, bkm-pdftex-2019-12-03.def,} -\Msg{* and bkm-vtex-2019-12-03.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}% - [2023-12-05 v1.30 PDF bookmarks (HO)]% + [2023-12-10 v1.31 PDF bookmarks (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/11/22] \begin{document} @@ -195,11 +78,8 @@ and the derived files % \fi % % -% -% \GetFileInfo{bookmark.drv} -% % \title{The \xpackage{bookmark} package} -% \date{2023-12-05 v1.30} +% \date{2023-12-10 v1.31} % \author{Heiko Oberdiek\thanks % {Please report any issues at \url{https://github.com/ho-tex/bookmark/issues}}} % @@ -307,10 +187,9 @@ and the derived files % \begin{quote} % |\def\BookmarkDriverDefault{dvipdfm}| % \end{quote} -% The current versions of the drivers uses new \LaTeX-hooks. If an -% older format than 2020-10-01 is detected frozen versions of -% the previous drivers are used as fallback. -% +% The current versions of the drivers uses new \LaTeX-hooks and tests if the PDF management +% is active and so requires a format newer than 2022-06-01. +% % \paragraph{Open bookmarks with dvipdfmx.} Older version of % the package had an option \xoption{dvipdfmx-outline-open} % to activate code which allows to specify the open @@ -406,7 +285,7 @@ and the derived files % unhappily the file name is a secret. The package supports % some ways to get the file name: % \begin{itemize} -% \item If \hologo{LuaTeX} (independently from DVI or PDF modus) +% \item If \hologo{LuaTeX} (independently from DVI or PDF modes) % 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 @@ -773,7 +652,7 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bookmark}% - [2023-12-05 v1.30 PDF bookmarks (HO)]% + [2023-12-10 v1.31 PDF bookmarks (HO)]% % \end{macrocode} % % \subsubsection{Requirements} @@ -843,6 +722,26 @@ and the derived files % \end{macrocode} % \end{macro} % +% \paragraph{Some helper commands} +% Replaces some commands from ltxcmds: +% +% \begin{macro}{\BKM@ReturnAfterFi} +% \begin{macro}{\BKM@space} +% \begin{macro}{\BKM@GlobalAppendToMacro} +% \begin{macro}{\BKM@LocalAppendToMacro} +% \begin{macrocode} +\ExplSyntaxOn +\let\BKM@LocalAppendToMacro\tl_put_right:Nn +\let\BKM@GlobalAppendToMacro\tl_gput_right:Nn +\ExplSyntaxOff +\def\BKM@space{ } +\long\def\BKM@ReturnAfterFi#1\fi{\fi#1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \paragraph{Packages.} % % Don't load packages loaded by xpackage{hyperref} @@ -889,7 +788,7 @@ and the derived files % \begin{macrocode} \def\BKM@setup#1{% \bookmarksetup{#1}% - \ifx\BKM@HookNext\ltx@empty + \ifx\BKM@HookNext\@empty \else \expandafter\bookmarksetup\expandafter{\BKM@HookNext}% \BKM@HookNextClear @@ -906,7 +805,7 @@ and the derived files % \begin{macro}{\bookmarksetupnext} % \begin{macrocode} \newcommand*{\bookmarksetupnext}[1]{% - \ltx@GlobalAppendToMacro\BKM@HookNext{,#1}% + \BKM@GlobalAppendToMacro\BKM@HookNext{,#1}% } % \end{macrocode} % \end{macro} @@ -917,7 +816,7 @@ and the derived files % \begin{macro}{\BKM@HookNextClear} % \begin{macrocode} \def\BKM@HookNextClear{% - \global\let\BKM@HookNext\ltx@empty + \global\let\BKM@HookNext\@empty } % \end{macrocode} % \end{macro} @@ -947,7 +846,7 @@ and the derived files % \begin{macro}{\bookmark@open} % \begin{macrocode} \def\bookmark@open{% - \ifBKM@open\ltx@one\else\ltx@zero\fi + \ifBKM@open\@ne\else\z@\fi } % \end{macrocode} % \end{macro} @@ -961,7 +860,7 @@ and the derived files % \end{macro} % \begin{macrocode} %\DeclareStringOption[\c@tocdepth]{depth} -\ltx@IfUndefined{Hy@bookmarksdepth}{% +\@ifundefined{Hy@bookmarksdepth}{% \def\BKM@depth{\c@tocdepth}% }{% \let\BKM@depth\Hy@bookmarksdepth @@ -971,7 +870,7 @@ and the derived files \ifx\BKM@param\@empty \def\BKM@depth{\c@tocdepth}% \else - \ltx@IfUndefined{toclevel@\BKM@param}{% + \@ifundefined{toclevel@\BKM@param}{% \@onelevel@sanitize\BKM@param \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% \ifcase 0\expandafter\ifx\BKM@temp-1\fi @@ -1021,7 +920,7 @@ and the derived files \ifx\BKM@param\BKM@MacroCurrentLevel \let\BKM@level\BKM@param \else - \ltx@IfUndefined{toclevel@\BKM@param}{% + \@ifundefined{toclevel@\BKM@param}{% \@onelevel@sanitize\BKM@param \edef\BKM@temp{\expandafter\@car\BKM@param\@nil}% \ifcase 0\expandafter\ifx\BKM@temp-1\fi @@ -1106,7 +1005,7 @@ and the derived files % \begin{macro}{\bookmark@numbered} % \begin{macrocode} \def\bookmark@numbered{% - \ifBKM@numbered\ltx@one\else\ltx@zero\fi + \ifBKM@numbered\@ne\else\z@\fi } % \end{macrocode} % \end{macro} @@ -1167,14 +1066,14 @@ and the derived files % \begin{macro}{\bookmark@italic} % \begin{macrocode} \def\bookmark@italic{% - \ifnum\bitsetGet{BKM@FontStyle}{0}=1 \ltx@one\else\ltx@zero\fi + \ifnum\bitsetGet{BKM@FontStyle}{0}=1 \@ne\else\z@\fi } % \end{macrocode} % \end{macro} % \begin{macro}{\bookmark@bold} % \begin{macrocode} \def\bookmark@bold{% - \ifnum\bitsetGet{BKM@FontStyle}{1}=1 \ltx@one\else\ltx@zero\fi + \ifnum\bitsetGet{BKM@FontStyle}{1}=1 \@ne\else\z@\fi } % \end{macrocode} % \end{macro} @@ -1605,7 +1504,7 @@ and the derived files % \end{macro} % \begin{macrocode} \define@key{BKM}{addtohook}{% - \ltx@LocalAppendToMacro\BKM@hook{#1}% + \BKM@LocalAppendToMacro\BKM@hook{#1}% } % \end{macrocode} % @@ -1613,10 +1512,10 @@ and the derived files % \begin{macrocode} \newcommand*{\bookmarkget}[1]{% \romannumeral0% - \ltx@ifundefined{bookmark@#1}{% - \ltx@space + \@ifundefined{bookmark@#1}{% + \BKM@space }{% - \expandafter\expandafter\expandafter\ltx@space + \expandafter\expandafter\expandafter\BKM@space \csname bookmark@#1\endcsname }% } @@ -1700,19 +1599,19 @@ and the derived files % \begin{macrocode} \ifBKM@draft \PackageWarningNoLine{bookmark}{Draft mode on}% - \let\bookmarksetup\ltx@gobble - \let\BookmarkAtEnd\ltx@gobble - \let\bookmarkdefinestyle\ltx@gobbletwo - \let\bookmarkget\ltx@gobble - \let\pdfbookmark\ltx@undefined + \let\bookmarksetup\@gobble + \let\BookmarkAtEnd\@gobble + \let\bookmarkdefinestyle\@gobbletwo + \let\bookmarkget\@gobble + \let\pdfbookmark\@undefined \newcommand*{\pdfbookmark}[3][]{}% - \let\currentpdfbookmark\ltx@gobbletwo - \let\subpdfbookmark\ltx@gobbletwo - \let\belowpdfbookmark\ltx@gobbletwo + \let\currentpdfbookmark\@gobbletwo + \let\subpdfbookmark\@gobbletwo + \let\belowpdfbookmark\@gobbletwo \newcommand*{\bookmark}[2][]{}% \renewcommand*{\Hy@writebookmark}[5]{}% \let\ReadBookmarks\relax - \let\BKM@DefGotoNameAction\ltx@gobbletwo % package `hypdestopt' + \let\BKM@DefGotoNameAction\@gobbletwo % package `hypdestopt' \expandafter\endinput \fi % \end{macrocode} @@ -1773,8 +1672,6 @@ and the derived files \fi \fi \fi -\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} -\IfFormatAtLeastTF{2020/10/01}{}{\edef\BKM@driver{\BKM@driver-2019-12-03}} \InputIfFileExists{bkm-\BKM@driver.def}{}{% \PackageError{bookmark}{% Unsupported driver `\BKM@driver'.\MessageBreak @@ -1788,7 +1685,7 @@ and the derived files % % \begin{macro}{\pdfbookmark} % \begin{macrocode} -\let\pdfbookmark\ltx@undefined +\let\pdfbookmark\@undefined \newcommand*{\pdfbookmark}[3][0]{% \bookmark[level=#1,dest={#3.#1}]{#2}% \hyper@anchorstart{#3.#1}\hyper@anchorend @@ -1864,7 +1761,7 @@ and the derived files %<*dvipdfm> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvipdfm.def}% - [2023-12-05 v1.30 bookmark driver for dvipdfm (HO)]% + [2023-12-10 v1.31 bookmark driver for dvipdfm (HO)]% % \end{macrocode} % % \begin{macro}{\BKM@id} @@ -2009,7 +1906,7 @@ and the derived files [% \ifBKM@open \ifnum\BKM@level<% - \expandafter\ltx@firstofone\expandafter + \expandafter\@firstofone\expandafter {\number\BKM@openlevel} % \else -% @@ -2056,7 +1953,7 @@ and the derived files %<*vtex> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-vtex.def}% - [2023-12-05 v1.30 bookmark driver for VTeX (HO)]% + [2023-12-10 v1.31 bookmark driver for VTeX (HO)]% % \end{macrocode} % % \begin{macrocode} @@ -2296,7 +2193,7 @@ and the derived files |ifx||#2||% |else (% - |ltx@ReturnAfterFi{% + |BKM@ReturnAfterFi{% |BKM@vtex@leftparen#2|@nil }% |fi @@ -2310,7 +2207,7 @@ and the derived files |ifx||#2||% |else )% - |ltx@ReturnAfterFi{% + |BKM@ReturnAfterFi{% |BKM@vtex@rightparen#2|@nil }% |fi @@ -2324,7 +2221,7 @@ and the derived files |ifx||#2||% |else |noexpand|hv@pdf@char0% - |ltx@ReturnAfterFi{% + |BKM@ReturnAfterFi{% |BKM@vtex@zero#2|@nil }% |fi @@ -2338,7 +2235,7 @@ and the derived files |ifx||#2||% |else |noexpand|hv@pdf@char1% - |ltx@ReturnAfterFi{% + |BKM@ReturnAfterFi{% |BKM@vtex@one#2|@nil }% |fi @@ -2352,7 +2249,7 @@ and the derived files |ifx||#2||% |else |noexpand|hv@pdf@char2% - |ltx@ReturnAfterFi{% + |BKM@ReturnAfterFi{% |BKM@vtex@two#2|@nil }% |fi @@ -2366,7 +2263,7 @@ and the derived files |ifx||#2||% |else |noexpand|hv@pdf@char3% - |ltx@ReturnAfterFi{% + |BKM@ReturnAfterFi{% |BKM@vtex@three#2|@nil }% |fi @@ -2387,7 +2284,7 @@ and the derived files %<*pdftex> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-pdftex.def}% - [2023-12-05 v1.30 bookmark driver for pdfTeX and luaTeX (HO)]% + [2023-12-10 v1.31 bookmark driver for pdfTeX and luaTeX (HO)]% % \end{macrocode} % % \begin{macro}{\BKM@DO@entry} @@ -2562,7 +2459,7 @@ and the derived files %<*dvips> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvips.def}% - [2023-12-05 v1.30 bookmark driver for dvips (HO)]% + [2023-12-10 v1.31 bookmark driver for dvips (HO)]% % \end{macrocode} % \begin{macro}{\BKM@PSHeaderFile} % \begin{macrocode} @@ -2889,7 +2786,7 @@ and the derived files \edef\BKM@srcline{\the\inputlineno}% \BKM@LuaTeX@InitFile \ifx\BKM@srcfile\@empty - \ltx@IfUndefined{currfilepath}{}{% + \@ifundefined{currfilepath}{}{% \edef\BKM@srcfile{\currfilepath}% }% \fi @@ -2901,13 +2798,13 @@ and the derived files \ifluatex \def\BKM@LuaTeX@InitFile{% \begingroup - \ltx@LocToksA={}% + \toks@={}% \edef\x{\endgroup \def\noexpand\BKM@srcfile{% - \the\expandafter\ltx@LocToksA + \the\expandafter\toks@ \directlua{% if status and status.filename then % - tex.settoks('ltx@LocToksA', status.filename)% + tex.settoks('toks@', status.filename)% end% }% }% @@ -3038,16 +2935,20 @@ and the derived files % CTAN\footnote{\CTANpkg{bookmark}}: % \begin{description} % \item[\CTAN{macros/latex/contrib/bookmark/bookmark.dtx}] The source file. +% \item[\CTAN{macros/latex/contrib/bookmark/bookmark.ins}] Installation driver. % \item[\CTAN{macros/latex/contrib/bookmark/bookmark.pdf}] Documentation. % \end{description} % % \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: +% The easiest is to use the package manager from your TeX system. If +% you want to install manually: +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is +% \docstrip\ archive. The files are extracted from the \xfile{.dtx} +% by compiling the file with some TeX program. % \begin{quote} -% \verb|tex bookmark.dtx| +% \verb|pdflatex bookmark.dtx| % \end{quote} % % \paragraph{TDS.} Now the different files must be moved into @@ -3140,25 +3041,8 @@ and the derived files % 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 +% You can use the \xfile{.dtx} 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: @@ -3405,9 +3289,7 @@ and the derived files % \item Adapted the dvips to avoid a clash with pgf. % https://github.com/pgf-tikz/pgf/issues/944 % \item All drivers now use the new LaTeX hooks -% and so require a format 2020-10-01 or newer. The older -% drivers are provided as frozen versions and are used if an older -% format is detected. +% and so require a format 2020-10-01 or newer. % \item Added support for destlabel option of hyperref, https://github.com/ho-tex/bookmark/issues/1 % \item Removed the \xoption{dvipsone} and \xoption{textures} driver. % \item Removed the code for option \xoption{dvipdfmx-outline-open} @@ -3419,6 +3301,13 @@ and the derived files % \xpackage{hyperref}, https://github.com/ho-tex/bookmark/issues/4 % \item Added support for structure destinations, https://github.com/ho-tex/bookmark/issues/7 % \end{Version} +% \begin{Version}{2023-12-10 v1.31} +% \item Simplified the \xfile{.dtx}. It is no longer a self-extracting archive +% instead the newly added \xfile{.ins} should be used for installation. +% https://github.com/ho-tex/bookmark/issues/7 +% \item Removed the now outdated frozen drivers. +% \item Removed the dependency to ltxcmds. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/macros/latex/contrib/bookmark/bookmark.ins b/macros/latex/contrib/bookmark/bookmark.ins new file mode 100644 index 0000000000..85772d00f4 --- /dev/null +++ b/macros/latex/contrib/bookmark/bookmark.ins @@ -0,0 +1,123 @@ +\iffalse meta-comment + File `bookmark.ins', + + + Project: bookmark + Version: 2023-12-10 v1.31 + + Copyright (C) + 2007-2011 Heiko Oberdiek + 2016-2023 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 file is part of the "bookmark bundle" (The Work in LPPL) + and all files in that bundle must be distributed together. + + The released version of this bundle is available from CTAN. + + This work consists of the main source files bookmark.dtx, + and bookmark.ins and the derived files + bookmark.sty, bookmark.pdf, + bkm-dvipdfm.def, bkm-dvips.def, bkm-pdftex.def, bkm-vtex.def, + bookmark-example.tex. +% +\fi +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: bookmark 2023-12-10 v1.31 PDF bookmarks (HO)} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +Project: bookmark +Version: 2023-12-10 v1.31 + +Copyright (C) + 2007-2011 Heiko Oberdiek + 2016-2023 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 file is part of the "bookmark bundle" (The Work in LPPL) + and all files in that bundle must be distributed together. + + The released version of this bundle is available from CTAN. + + This work consists of the main source files bookmark.dtx + and bookmark.ins and the derived files + bookmark.sty, bookmark.pdf, + bkm-dvipdfm.def, bkm-dvips.def, bkm-pdftex.def, bkm-vtex.def, + bookmark-example.tex. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \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-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-pdftex.def and bkm-vtex.def} +\Msg{*} +\Msg{* To produce the documentation run the file `bookmark.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile + +\endinput +%% +%% End of file `bookmark.ins'. diff --git a/macros/latex/contrib/bookmark/bookmark.pdf b/macros/latex/contrib/bookmark/bookmark.pdf Binary files differindex a298e3e76c..06da46ddfb 100644 --- a/macros/latex/contrib/bookmark/bookmark.pdf +++ b/macros/latex/contrib/bookmark/bookmark.pdf |