diff options
author | Karl Berry <karl@freefriends.org> | 2018-06-11 22:22:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-06-11 22:22:36 +0000 |
commit | f986f34bcdb3eadcd5c99c415ec92109e2fb423e (patch) | |
tree | 75ae09e6b95d3c0c533c374ee9070c7f9a55c890 /Master/texmf-dist/tex/latex | |
parent | d250c96cb182d3df2332b196e3a5b040e9fd50ad (diff) |
xbmks (11jun18)
git-svn-id: svn://tug.org/texlive/trunk@47991 c570f23f-e606-0410-a88d-b1316a301751
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 | 98 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def | 101 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def | 107 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xbmks/xbmks.sty | 133 |
5 files changed, 461 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def new file mode 100644 index 00000000000..5e6634404f9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-luatex.def @@ -0,0 +1,22 @@ +%% +%% 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 new file mode 100644 index 00000000000..953910afe17 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdfmark.def @@ -0,0 +1,98 @@ +%% +%% This is file `xbmks-pdfmark.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xbmks.dtx (with options: `copyright,pdfmark') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\ReadBookmarks{% + \pdf@ifdraftmode{}{% + \begingroup + \def\calc@bm@number##1{% + \@tempcnta=\check@bm@number{##1}\relax + \advance\@tempcnta by 1 % + \expandafter\edef\csname B_##1\endcsname{\the\@tempcnta}% + }% + \def\do##1{% + \ifnum\catcode`##1=\active + \@makeother##1% + \else + \ifnum\catcode`##1=6 % + \@makeother##1% + \fi + \fi + }% + \dospecials + \Hy@safe@activestrue + \escapechar=`\\% + \ifx\WriteBookmarks\relax + \global\let\WriteBookmarks\relax + \fi + \begingroup + \def\WriteBookmarks{0}% + \count\z@=0\relax + \edef\xbmk@J{\jobname}% + \@whilenum \count\z@<\xbmk@cnt\relax\do{% + \advance\count\z@ by 1 % + \edef\xbmk@thisdoc{xbmk@doc\the\count\z@}% + \edef\xbmk@filename{\@nameuse{\xbmk@thisdoc}}% + \@onelevel@sanitize\xbmk@filename + \bgroup + \def\@@BOOKMARK[##1][##2]##3##4##5{% + \calc@bm@number{##5}% + }% + \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 + }% + \else + \pdfmark{% + pdfmark=/OUT,% + Count={##2\check@bm@number{##3}},% + Raw={\xbmks@extdoc\xbmk@extF},% + Action=/GoToR,% + File={\xbmk@filename.pdf},% + Dest={##3},% + Title=\expandafter\strip@prefix\meaning\Hy@temp + }% + \fi + }% + \InputIfFileExists{\xbmk@filename.out}{}{}% + \egroup + }% \@whilenum + \endgroup + \endgroup + }% + \ifx\WriteBookmarks\relax\else + \if@filesw + \newwrite\@outlinefile + \Hy@OutlineRerunCheck + \immediate\openout\@outlinefile=\jobname.out\relax + \ifHy@typexml + \immediate\write\@outlinefile{<relaxxml>\relax}% + \fi + \fi + \fi +} +\endinput +%% +%% End of file `xbmks-pdfmark.def'. diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def new file mode 100644 index 00000000000..42f2f79cf65 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def @@ -0,0 +1,101 @@ +%% +%% This is file `xbmks-pdftex.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xbmks.dtx (with options: `copyright,pdftex') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\ReadBookmarks{% + \pdf@ifdraftmode{}{% + \begingroup + \def\calc@bm@number##1{% + \@tempcnta=\check@bm@number{##1}\relax + \advance\@tempcnta by 1 % + \expandafter\edef\csname B_##1\endcsname{\the\@tempcnta}% + }% + \def\Hy@OutlineName##1##2##3##4{\def\@rgi{##1}% + \expandafter\pdfoutline\ifx\@rgi\@empty\else + attr {##1} \fi + user {##2} count##3{##4}% + % goto name{#2} count#3{#4}% + }% + \def\do##1{% + \ifnum\catcode`##1=\active + \@makeother##1% + \else + \ifnum\catcode`##1=6 % + \@makeother##1% + \fi + \fi + }% + \dospecials + \Hy@safe@activestrue + \escapechar=`\\% + \ifx\WriteBookmarks\relax + \global\let\WriteBookmarks\relax + \fi + \begingroup + \def\WriteBookmarks{0}% + \count\z@=0\relax + \edef\xbmk@J{\jobname}% + \@whilenum \count\z@<\xbmk@cnt\relax\do{% + \advance\count\z@ by 1 % + \edef\xbmk@thisdoc{xbmk@doc\the\count\z@}% + \edef\xbmk@filename{\@nameuse{\xbmk@thisdoc}}% + \@onelevel@sanitize\xbmk@filename + \bgroup + \gdef\@@BOOKMARK[##1][##2]##3##4##5{% + \calc@bm@number{##5}% + }% + \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 + }% + \else + \Hy@OutlineName{\xbmks@extdoc\xbmk@extF}{<</S/GoToR% + /F(\xbmk@filename.pdf)/D(\Hy@pstringName)>>}{% + ##2\check@bm@number{##3}% + }{% + \expandafter\strip@prefix\meaning\Hy@temp + }% + \fi + }% bookmark + \InputIfFileExists{\xbmk@filename.out}{}{}% + \egroup + } % \@whilenum + \endgroup + }% + \ifx\WriteBookmarks\relax + \else + \if@filesw + \newwrite\@outlinefile + \Hy@OutlineRerunCheck + \immediate\openout\@outlinefile=\jobname.out\relax + \ifHy@typexml + \immediate\write\@outlinefile{<relaxxml>\relax}% + \fi + \fi + \fi +} +\endinput +%% +%% End of file `xbmks-pdftex.def'. diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def b/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def new file mode 100644 index 00000000000..56211641a90 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks-xetex.def @@ -0,0 +1,107 @@ +%% +%% This is file `xbmks-xetex.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xbmks.dtx (with options: `copyright,xetex') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\ReadBookmarks{% + \pdf@ifdraftmode{}{% + \begingroup + \def\calc@bm@number##1{% + \@tempcnta=\check@bm@number{##1}\relax + \advance\@tempcnta by 1 % + \expandafter\edef\csname B_##1\endcsname{\the\@tempcnta}% + }% + \def\do##1{% + \ifnum\catcode`##1=\active + \@makeother##1% + \else + \ifnum\catcode`##1=6 % + \@makeother##1% + \fi + \fi + }% + \dospecials + \Hy@safe@activestrue + \escapechar=`\\% + \ifx\WriteBookmarks\relax + \global\let\WriteBookmarks\relax + \fi + \begingroup + \def\WriteBookmarks{0}% + \count\z@=0\relax + \edef\xbmk@J{\jobname}% + \@whilenum \count\z@<\xbmk@cnt\relax\do{% + \advance\count\z@ by 1 % + \edef\xbmk@thisdoc{xbmk@doc\the\count\z@}% + \edef\xbmk@filename{\@nameuse{\xbmk@thisdoc}}% + \@onelevel@sanitize\xbmk@filename + \bgroup + \def\@@BOOKMARK[##1][##2]##3##4##5{% + \calc@bm@number{##5}% + }% + \InputIfFileExists{\xbmk@filename.out}{}{}% + \def\@@BOOKMARK[##1][##2]##3##4##5{% + \def\Hy@temp{##4}% + \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}% + \@pdfm@mark{% + outline \ifHy@DvipdfmxOutlineOpen + [% + \ifnum##21>\z@ + \else + -% + \fi + ] % + \fi + ##1<<% + /Title(\expandafter\strip@prefix\meaning\Hy@temp)% + \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 + >>% + }% \@pdfm@mark + }% bookmark + \InputIfFileExists{\xbmk@filename.out}{}{}% + \egroup + }% \@whilenum + \endgroup + \endgroup + }% + \ifx\WriteBookmarks\relax + \else + \if@filesw + \newwrite\@outlinefile + \Hy@OutlineRerunCheck + \immediate\openout\@outlinefile=\jobname.out\relax + \ifHy@typexml + \immediate\write\@outlinefile{<relaxxml>\relax}% + \fi + \fi + \fi +} +\endinput +%% +%% End of file `xbmks-xetex.def'. diff --git a/Master/texmf-dist/tex/latex/xbmks/xbmks.sty b/Master/texmf-dist/tex/latex/xbmks/xbmks.sty new file mode 100644 index 00000000000..4185e81eaea --- /dev/null +++ b/Master/texmf-dist/tex/latex/xbmks/xbmks.sty @@ -0,0 +1,133 @@ +%% +%% This is file `xbmks.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xbmks.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}[1997/12/01] +\ProvidesPackage{xbmks} + [2018/06/11 v1.0 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}} +\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 +\ProcessOptionsX +\RequirePackage{hyperref} +\define@key{xbmksetup}{docbundle}[]{\def\x@bmks@docs{#1}} +\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 +} +\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@extdoc\@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]{} +\newcommand{\xbmksetup}[1]{\write@xbmks@cfg{#1}} +\def\write@xbmks@cfg#1{% + \newwrite\xbmks@setup \immediate\openout \xbmks@setup xbmks.cfg + \set@display@protect + \immediate\write\xbmks@setup{\protect\xbmksetupi{#1}} + \set@typeset@protect + \immediate\closeout\xbmks@setup +} +\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 + \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 +} +\def\xbmk@csarg#1#2{\expandafter#1\csname#2\endcsname} +\xdef\xbmk@cnt{0} +\newcommand{\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 + }% + \xdef\xbmk@cnt{\the\count\z@}\egroup +} +\newcommand{\xbmk@recordDoc}[1]{% + \xbmk@csarg\xdef{xbmk@doc\the\count\z@}{#1}} +\InputIfFileExists{xbmks.cfg}{}{} +\@ifpackageloaded{bookmark}{\PackageWarningNoLine{xbmks}{The + bookmark package is not supported;\MessageBreak + this package does nothing, as a result}} +{\InputIfFileExists{\xbmk@driver}{}{}} + +\endinput +%% +%% End of file `xbmks.sty'. |