diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def | 22 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def | 34 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def | 23 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks.sty | 190 |
5 files changed, 198 insertions, 111 deletions
diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def deleted file mode 100644 index 6f3d50316aa..00000000000 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def +++ /dev/null @@ -1,22 +0,0 @@ -%% -%% This is file `xbmks-luatex.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% xbmks.dtx (with options: `copyright,luatex') -%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% xbmks.sty package, %% -%% Copyright (C) 2016--2018 %% -%% dpstory@uakron.edu %% -%% %% -%% This program can redistributed and/or modified under %% -%% the terms of the LaTeX Project Public License %% -%% Distributed from CTAN archives in directory %% -%% macros/latex/base/lppl.txt; either version 1.2 of the %% -%% License, or (at your option) any later version. %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\endinput -%% -%% End of file `xbmks-luatex.def'. diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def index d769e3436eb..4471d3dd5d4 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def @@ -19,7 +19,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\ReadBookmarks{% \pdf@ifdraftmode{}{% - \begingroup + \begingroup\def\\{\@backslashchar\@backslashchar}% dps \def\calc@bm@number##1{% \@tempcnta=\check@bm@number{##1}\relax \advance\@tempcnta by 1 % @@ -53,29 +53,41 @@ \def\@@BOOKMARK[##1][##2]##3##4##5{% \calc@bm@number{##5}% }% + \let\nextAction\@gobbletwo \InputIfFileExists{\xbmk@filename.out}{}{}% \def\@@BOOKMARK[##1][##2]##3##4##5{% \def\Hy@temp{##4}% - \ifx\xbmk@J\xbmk@filename - \pdfmark{% - pdfmark=/OUT,% - Count={##2\check@bm@number{##3}},% - Raw={\xbmks@intdoc\xbmk@intF},% - Dest={##3},% - Title=\expandafter\strip@prefix\meaning\Hy@temp - }% + \xbmkcsarg\ifx{X_##3}\relax + \ifx\xbmk@J\xbmk@filename + \pdfmark{% + pdfmark=/OUT,% + Count={##2\check@bm@number{##3}},% + Raw={\xbmks@intC\xbmk@intF},% + Dest={##3},% + Title=\expandafter\strip@prefix\meaning\Hy@temp + }% + \else + \pdfmark{% + pdfmark=/OUT,% + Count={##2\check@bm@number{##3}},% + Raw={\xbmks@extC\xbmk@extF},% + Action=/GoToR,% + File={\xbmk@filename.pdf},% + Dest={##3},% + Title=\expandafter\strip@prefix\meaning\Hy@temp + }% + \fi \else + \x@rollCFIntoActionBmrk{##3}% \pdfmark{% pdfmark=/OUT,% Count={##2\check@bm@number{##3}},% - Raw={\xbmks@extdoc\xbmk@extF},% - Action=/GoToR,% - File={\xbmk@filename.pdf},% - Dest={##3},% + Raw={/Action<<\@nameuse{X_##3}>>\thisCol\thisF},% Title=\expandafter\strip@prefix\meaning\Hy@temp }% \fi - }% + }% bookmark + \let\nextAction\nextAction@i \InputIfFileExists{\xbmk@filename.out}{}{}% \egroup }% \@whilenum diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def index 2adc7f171c6..9931f2259b3 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def @@ -19,7 +19,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\ReadBookmarks{% \pdf@ifdraftmode{}{% - \begingroup + \begingroup\def\\{\@backslashchar\@backslashchar}% dps \def\calc@bm@number##1{% \@tempcnta=\check@bm@number{##1}\relax \advance\@tempcnta by 1 % @@ -59,26 +59,38 @@ \gdef\@@BOOKMARK[##1][##2]##3##4##5{% \calc@bm@number{##5}% }% + \let\nextAction\@gobbletwo \InputIfFileExists{\xbmk@filename.out}{}{}% \gdef\@@BOOKMARK[##1][##2]##3##4##5{% \def\Hy@temp{##4}% \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}% - \ifx\xbmk@J\xbmk@filename - \Hy@OutlineName{\xbmks@intdoc\xbmk@intF}{<</S/GoTo% - /D(\Hy@pstringName)>>}{% - ##2\check@bm@number{\Hy@pstringName}% - }{% - \expandafter\strip@prefix\meaning\Hy@temp - }% + \xbmkcsarg\ifx{X_##3}\relax + \ifx\xbmk@J\xbmk@filename + \Hy@OutlineName{\xbmks@intC\xbmk@intF}{<</S/GoTo% + /D(\Hy@pstringName)>>}{% + ##2\check@bm@number{\Hy@pstringName}% + }{% + \expandafter\strip@prefix\meaning\Hy@temp + }% + \else + \Hy@OutlineName{\xbmks@extC\xbmk@extF}{<</S/GoToR% + /F(\xbmk@filename.pdf)/D(\Hy@pstringName)>>}{% + ##2\check@bm@number{##3}% + }{% + \expandafter\strip@prefix\meaning\Hy@temp + }% + \fi \else - \Hy@OutlineName{\xbmks@extdoc\xbmk@extF}{<</S/GoToR% - /F(\xbmk@filename.pdf)/D(\Hy@pstringName)>>}{% - ##2\check@bm@number{##3}% + \x@rollCFIntoActionBmrk{##3}% + \Hy@OutlineName{\thisCol\thisF} + {<<\@nameuse{X_##3}>>}{% + ##2\check@bm@number{\Hy@pstringName}% }{% \expandafter\strip@prefix\meaning\Hy@temp }% \fi }% bookmark + \let\nextAction\nextAction@i \InputIfFileExists{\xbmk@filename.out}{}{}% \egroup } % \@whilenum diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def index 18622b9ee3c..eea0df0aae1 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def @@ -19,7 +19,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\ReadBookmarks{% \pdf@ifdraftmode{}{% - \begingroup + \begingroup\def\\{\@backslashchar\@backslashchar}% dps \def\calc@bm@number##1{% \@tempcnta=\check@bm@number{##1}\relax \advance\@tempcnta by 1 % @@ -53,37 +53,38 @@ \def\@@BOOKMARK[##1][##2]##3##4##5{% \calc@bm@number{##5}% }% + \let\nextAction\@gobbletwo \InputIfFileExists{\xbmk@filename.out}{}{}% \def\@@BOOKMARK[##1][##2]##3##4##5{% \def\Hy@temp{##4}% \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}% + \x@rollCFIntoActionBmrk{##3}% \@pdfm@mark{% outline \ifHy@DvipdfmxOutlineOpen - [% - \ifnum##21>\z@ - \else - -% - \fi - ] % - \fi + [\ifnum##21>\z@\else-\fi] \fi ##1<<% - /Title(\expandafter\strip@prefix\meaning\Hy@temp)% + /Title(\expandafter\strip@prefix\meaning\Hy@temp)% + \xbmkcsarg\ifx{X_##3}\relax \ifx\xbmk@J\xbmk@filename /A<<% /S/GoTo% /D(\Hy@pstringName)% >>% - \xbmks@intdoc\xbmk@intF \else /A<<% /S/GoToR/F(\xbmk@filename.pdf)% /D(\Hy@pstringName)% >>% - \xbmks@extdoc\xbmk@extF \fi + \else + /A<<\@nameuse{X_##3}>> + \fi + \thisCol\thisF >>% }% \@pdfm@mark + \let\thisC\@empty\let\thisF\@empty }% bookmark + \let\nextAction\nextAction@i \InputIfFileExists{\xbmk@filename.out}{}{}% \egroup }% \@whilenum diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks.sty b/Master/texmf-dist/tex/latex/xbmks/xbmks.sty index 700bd082eeb..8fa488964e2 100644 --- a/Master/texmf-dist/tex/latex/xbmks/xbmks.sty +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks.sty @@ -19,7 +19,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1997/12/01] \ProvidesPackage{xbmks} - [2018/06/13 v1.1 xbmks: Cross-document bookmarks (dps)] + [2018/06/25 v2.0.1 xbmks: Cross-document bookmarks (dps)] \RequirePackage{xkeyval} \RequirePackage{ifpdf}[2006/02/20] \RequirePackage{ifxetex}[2006/08/21] @@ -44,25 +44,25 @@ \let\x@bmks@docs\@empty \define@key{xbmksetup}{colors}[]{\def\x@bmks@colors{#1}} \let\x@bmks@colors\@empty -\define@key{xbmksetup}{style}[]{\def\x@bmks@style{#1}} -\let\x@bmks@style\@empty -\define@key{xbmk@colors}{intdoc}[]{% - \HyColor@BookmarkColor{#1}{\xbmks@intdoc}{xbmks}{intdoc}% - \ifx\xbmks@intdoc\@empty\else - \edef\xbmks@intdoc{/C[\xbmks@intdoc]}\fi +\define@key{xbmksetup}{styles}[]{\def\x@bmks@styles{#1}} +\let\x@bmks@styles\@empty +\define@key{xbmk@colors}{int}[]{% + \HyColor@BookmarkColor{#1}{\xbmks@intC}{xbmks}{int}% + \ifx\xbmks@intC\@empty\else + \edef\xbmks@intC{/C[\xbmks@intC]}\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 +\let\xbmks@intC\@empty +\define@key{xbmk@colors}{ext}[]{% + \HyColor@BookmarkColor{#1}{\xbmks@extC}{xbmks}{ext}% + \ifx\xbmks@extC\@empty\else + \edef\xbmks@extC{/C[\xbmks@extC]}\fi } -\let\xbmks@extdoc\@empty +\let\xbmks@extC\@empty \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]{} +\define@boolkey{xbmk@styles}{intbf}[true]{} +\define@boolkey{xbmk@styles}{extbf}[true]{} +\define@boolkey{xbmk@styles}{intit}[true]{} +\define@boolkey{xbmk@styles}{extit}[true]{} \newcommand{\xbmksetup}[1]{\setkeys{xbmksetup}{#1}% \ifx\x@bmks@docs\@empty \PackageInfo{xbmks}{The docbundle key of \string\xbmksetup\space @@ -81,50 +81,134 @@ } \newcommand{\xbmksetupi}[1]{% \setkeys{xbmksetup}{#1}% - \edef\@exp@for{\noexpand\docbundle{\x@bmks@docs}}\expandafter - \@exp@for - \edef\@exp@keys{\noexpand - \setkeys{xbmk@colors}{\x@bmks@colors}}\@exp@keys - \edef\@exp@keys{\noexpand - \setkeys{xbmk@style}{\x@bmks@style}}\@exp@keys - \def\xbmk@intF{}% - \ifKV@xbmk@style@intit - \ifKV@xbmk@style@intbf - \def\xbmk@intF{/F 3}% - \else - \def\xbmk@intF{/F 1}% - \fi - \else - \ifKV@xbmk@style@intbf - \def\xbmk@intF{/F 2}% - \fi - \fi - \def\xbmk@extF{}% - \ifKV@xbmk@style@extit - \ifKV@xbmk@style@extbf - \def\xbmk@extF{/F 3}% - \else - \def\xbmk@extF{/F 1}% - \fi - \else - \ifKV@xbmk@style@extbf - \def\xbmk@extF{/F 2}% - \fi - \fi + \edef\x{\noexpand\x@docbundle{\x@bmks@docs}}\x + \edef\x{\noexpand + \setkeys{xbmk@colors}{\x@bmks@colors}}\x + \edef\x{\noexpand + \setkeys{xbmk@styles}{\x@bmks@styles}}\x + \let\xbmk@intF\@empty + \ifKV@xbmk@styles@intit + \ifKV@xbmk@styles@intbf + \def\xbmk@intF{/F 3}\else + \def\xbmk@intF{/F 1}\fi + \else + \ifKV@xbmk@styles@intbf + \def\xbmk@intF{/F 2}\fi + \fi + \let\xbmk@extF\@empty + \ifKV@xbmk@styles@extit + \ifKV@xbmk@styles@extbf + \def\xbmk@extF{/F 3}\else + \def\xbmk@extF{/F 1}\fi + \else + \ifKV@xbmk@styles@extbf + \def\xbmk@extF{/F 2}\fi + \fi } -\def\xbmk@csarg#1#2{\expandafter#1\csname#2\endcsname} +\def\xbmkcsarg#1#2{\expandafter#1\csname#2\endcsname} \xdef\xbmk@cnt{0} -\newcommand{\docbundle}[1]{\bgroup +\newcommand{\x@docbundle}[1]{\bgroup \def\thisDoc{\jobname}\count\z@=0 % \edef\@tmpexp{\noexpand\@for\noexpand\@arg:=#1}% - \@tmpexp\do{% - \advance\count\z@ by 1\relax - \edef\@tmpexp{\noexpand\xbmk@recordDoc{\@arg}}\@tmpexp + \@tmpexp\do{\advance\count\z@ by 1\relax + \edef\x{\noexpand\xbmk@recordDoc{\@arg}}\x + \edef\x{\noexpand\xbmk@docID{\@arg}}\x }% \xdef\xbmk@cnt{\the\count\z@}\egroup } \newcommand{\xbmk@recordDoc}[1]{% - \xbmk@csarg\xdef{xbmk@doc\the\count\z@}{#1}} + \xbmkcsarg\xdef{xbmk@doc\the\count\z@}{#1}} +\newcommand{\xbmk@docID}[1]{% + \xbmkcsarg\xdef{x#1}{x\the\count\z@}} +\xbmkcsarg\xdef{x\jobname}{x0} +\define@key{xbmkskeys}{action}{\def\x@bmks@action{#1}} +\let\x@bmks@action\@empty +\define@key{xbmkskeys}{color}[]{% + \HyColor@BookmarkColor{#1}{\x@bmks@C}{xbmks}{color}% + \ifx\x@bmks@C\@empty\else + \edef\x@bmks@C{/C[\x@bmks@C]}\fi +} +\let\x@bmks@C\@empty +\define@key{xbmkskeys}{style}[]{% + \edef\x{\noexpand\setkeys{xbmks@style}{#1}}\x + \let\x@bmks@F\@empty + \ifKV@xbmks@style@it + \ifKV@xbmks@style@bf + \def\x@bmks@F{/F 3}\else + \def\x@bmks@F{/F 1}\fi + \else + \ifKV@xbmks@style@bf + \def\x@bmks@F{/F 2}\fi + \fi +} +\let\x@bmks@F\@empty +\define@boolkey{xbmks@style}{bf}[true]{} +\define@boolkey{xbmks@style}{it}[true]{} +\def\x@rollCFIntoActionBmrk#1{% + \xbmkcsarg\ifx{X_#1}\relax + \let\x@bmks@C\@empty\let\x@bmks@F\@empty\fi + \ifx\xbmk@J\xbmk@filename + \ifx\x@bmks@C\@empty\let\thisCol\xbmks@intC\else + \let\thisCol\x@bmks@C\fi + \ifx\x@bmks@F\@empty\let\thisF\xbmk@intF\else + \let\thisF\x@bmks@F\fi + \else + \ifx\x@bmks@C\@empty\let\thisCol\xbmks@extC\else + \let\thisCol\x@bmks@C\fi + \ifx\x@bmks@F\@empty\let\thisF\xbmk@extF\else + \let\thisF\x@bmks@F\fi + \fi + \global\let\x@bmks@C\@empty\global\let\x@bmks@F\@empty +} +\newcommand\pdfbookmarkx[2][0]{% + \@ifnextchar[%] + {\pdfbookmarkx@i{#1}{#2}} + {\pdfbookmarkx@i{#1}{#2}[]}} +\def\pdfbookmarkx@i#1#2[#3]#4{% level, title, action, name + \def\x@rgiii{#3}\ifx\x@rgiii\@empty + \Hy@writebookmark{}{#2}{#4.#1}{#1}{toc}% + \hyper@anchorstart{#4.#1}\hyper@anchorend + \else + \protected@write\@outlinefile{}{% + \string\nextAction% assign doc ID + {\@nameuse{x\jobname}#4.#1}{#3}}% + \Hy@writebookmark{}{#2}{\@nameuse{x\jobname}#4.#1}{#1}{toc}% + \fi +} +\newcommand{\currentpdfbookmarkx}[1]{% + \@ifnextchar[%] + {\currentpdfbookmarkx@i{#1}} + {\currentpdfbookmarkx@i{#1}[]}} +\def\currentpdfbookmarkx@i#1[#2]#3{% + \pdfbookmarkx[\Hy@currentbookmarklevel]{#1}[{#2}]{#3}} +\newcommand{\subpdfbookmarkx}[1]{% + \@ifnextchar[%] + {\subpdfbookmarkx@i{#1}} + {\subpdfbookmarkx@i{#1}[]}} +\def\subpdfbookmarkx@i#1[#2]#3{% + \@tempcnta\Hy@currentbookmarklevel + \Hy@StepCount\@tempcnta + \expandafter + \pdfbookmarkx\expandafter[\the\@tempcnta]{#1}[{#2}]{#3}} +\newcommand{\belowpdfbookmarkx}[1]{% + \@ifnextchar[%] + {\belowpdfbookmarkx@i{#1}} + {\belowpdfbookmarkx@i{#1}[]}} +\def\belowpdfbookmarkx@i#1[#2]#3{% + \@tempcnta\Hy@currentbookmarklevel + \Hy@StepCount\@tempcnta + \expandafter + \pdfbookmarkx\expandafter[\the\@tempcnta]{#1}[{#2}]{#3}% + \advance\@tempcnta by -1 % + \xdef\Hy@currentbookmarklevel{\the\@tempcnta}} +\def\nextAction@i#1#2{\@ifundefined{X_#1}{% + \setkeys{xbmkskeys}{#2}% + \xbmkcsarg\xdef{X_#1}{\x@bmks@action}% + }{\global\xbmkcsarg\let{X_#1}\relax + \PackageWarning{xbmks} + {The anchor name `#1' is already defined,\MessageBreak + change this name, the bookmark will be created\MessageBreak + but it will have no associated action}}} \InputIfFileExists{xbmks.cfg}{}{} \@ifpackageloaded{bookmark}{\PackageWarningNoLine{xbmks}{The bookmark package is not supported;\MessageBreak |