texlive[74772] Master: pdftoolbox (28mar25)
commits+karl at tug.org
commits+karl at tug.org
Fri Mar 28 22:30:24 CET 2025
Revision: 74772
https://tug.org/svn/texlive?view=revision&revision=74772
Author: karl
Date: 2025-03-28 22:30:24 +0100 (Fri, 28 Mar 2025)
Log Message:
-----------
pdftoolbox (28mar25)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/pdftoolbox/
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/acknowledgments.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/introduction.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.pdf
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-internal-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdstruct-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-internal-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdftoolbox-utils-docs.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/preamble.tex
trunk/Master/texmf-dist/doc/latex/pdftoolbox/README.md
trunk/Master/texmf-dist/tex/plain/pdftoolbox/
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-arrays.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-counters.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-dictionaries.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-key-value.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-math.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-mergesort.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-stack.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-fonts.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hooks.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hyperlinks.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-index.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-layout.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-lists.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-tableofcontents.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colorboxes.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colors.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw-utils.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-syntax-hi.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfToolbox.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfData.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfDstruct.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfGraphics.tex
trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-utils.tex
trunk/Master/tlpkg/tlpsrc/pdftoolbox.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/acknowledgments.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/acknowledgments.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/acknowledgments.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,13 @@
+Many thanks to my family: my two brothers, my mother and father, and my sister.
+Thank you for your eternal and unwavering support throughout my life, both in the good and the bad.
+
+Thank you to plante (\url{https://github.com/plante3}{github}) for the guidance and mentoring in the way of \TeX.
+Many of the macros in this project are due to, or inspired by, him.
+
+Thank you to the Mathematics Discord server (\url{https://discord.com/invite/math}{invite}) for fostering a welcoming community where anyone can learn math, and for first introducing me to the world of \TeX.
+
+Thank you to all my friends for their continued support and interest.
+
+Thank you to my dogs, past and present.
+I adore you both, and will forever.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/acknowledgments.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/introduction.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/introduction.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,31 @@
+\pdftoolbox{} offers a variety of tools for creating documents in plain \TeX.
+These include packages for structuring documents, coloring documents, etc.
+\pdftoolbox{} is a collection of packages intended to be used with plain \TeX.
+It is intended to be self-contained and does not promise compatibility with other packages.
+
+\bwarning
+
+ \pdftoolbox{} is still experimental and may be subject to breaking changes.
+ If you have an important document relying on it, the author advises keeping
+
+\eppbox
+
+\bwarning
+
+ \pdftoolbox{} is known to not interact with the {\tt color}, {\tt xcolor}, {\tt tikz} and all related packages.
+ This may or may not be changed in the future.
+
+\eppbox
+
+This documentation is split into sections corresponding to the different collections in \pdftoolbox.
+These are:
+\benum
+ \item Data manipulation: counters, dictionaries, etc.
+ \item Document structure: layouts, table of contents, indices, etc.
+ \item Graphics: colors, diagrams, colored boxes, etc.
+\eenum
+
+\pdftoolbox{} depends only on the \url{https://ctan.org/pkg/apnum?lang=en}{apnum} package.
+
+\pdftoolbox{} is provided as opensource free software under the MIT license.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/introduction.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.pdf 2025-03-28 21:25:19 UTC (rev 74771)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.pdf 2025-03-28 21:30:24 UTC (rev 74772)
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,89 @@
+\input pdfToolbox
+\input preamble
+
+\setlayout{horizontal margin=2cm, vertical margin=2cm}
+\parindent=0pt
+\parskip=3pt plus 2pt minus 2pt
+
+\footline={}
+
+\headline={\pageborder{rgb{.5 .5 1}}{rgb{0 0 .4}}{5}}
+
+\color rgb{.1 0 .8}
+
+\hbox to \dimexpr\hsize-\_actual_curve_buf\relax{\hfill Version \pdfToolboxversion}
+\kern-5pt
+{\def\boxshadowcolor{rgb{.3 .3 .8}}
+\bppbox{rgb{.6 .6 1}}{rgb{0 0 .4}}{rgb{.1 0 .4}}
+
+ \centerline{\pdftoolbox[35pt]}
+ \smallskip
+ \centerline{ari.feiglin at gmail.com}
+
+\eppbox
+
+\bigskip
+
+\bppbox{rgb{.6 .6 1}}{rgb{0 0 .4}}{rgb{.1 0 .4}}
+
+ \input introduction
+
+\eppbox
+
+\bppbox{rgb{.6 .6 1}}{rgb{0 0 .4}}{rgb{.1 0 .4}}
+ \section*{Contents}
+
+ \tableofcontents
+\eppbox
+
+}
+
+\eject
+\color{black}
+
+\pageno=1
+\newif\ifpageodd
+\pageoddtrue
+\headline={%
+ \hbox to \hsize{\color{black}%
+ \ifpageodd\hfil{\it\currsection\quad\bf\folio}\global\pageoddfalse%
+ \else{\bf\folio\quad\it\currsection}\hfil\global\pageoddtrue\fi%
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\part{pdfToolbox in brief}
+
+\section{pdfData}
+
+\input pdfdata-docs
+
+\section{pdfDstruct}
+
+\input pdfdstruct-docs
+
+\section{pdfGraphics}
+
+\input pdfgraphics-docs
+
+\part{pdfToolbox internals}
+
+\section{Utilities}
+
+\input pdftoolbox-utils-docs
+
+\section{pdfData Internals}
+
+\input pdfdata-internal-docs
+
+\section{pdfGraphics Internals}
+
+\input pdfgraphics-internal-docs
+
+\part{Acknowledgments}
+
+\input acknowledgments
+
+\bye
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfToolbox-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,365 @@
+The pdfData section of the \pdftoolbox{} toolbox is meant for creating instances of and manipulating datatypes.
+
+\subsection{Arrays}
+
+In the {\tt pdfData/arrays} file, \pdftoolbox{} defines various macros for creating and manipulating arrays.
+There are two types of arrays, which are different in the macros used for them and the way they are stored internally.
+\blist
+ \item (Normal) arrays: these arrays are stored in the traditional way: an array $[1;2;3]$ is stored in a macro whose meaning is equivalent to \inlinecode|\X{1}\X{2}\X{3}|.
+ Manipulation of the array is done by defining \macro\X, and then executing the array macro.
+ \item Macro arrays: these arrays are stored in a collection of macros: each element is stored in its own indexed macro.
+ So an array $[1;2;3]$ will be stored in three macros, whose values are $1$, $2$, $3$ respectively.
+\elist
+
+\bnote
+
+ All arrays are zero-indexed.
+
+\eppbox
+
+\subsubsection{Normal Arrays}
+
+\macroexp{\createarray {<name>}}
+creates an (normal) array whose name is {\it name}.
+\emacroexp
+
+\macroexp{\ensurearray {<name>}}
+ensures that an array by the name of {\it name} exists.
+\emacroexp
+
+\macroexp{\localizearray {<name>}}
+localizes (see \gotoanchor{localization}{localization}) the array named by {\it name}.
+\emacroexp
+
+\macroexp{\appendarray {<name>}{<value>}}
+appends {\it value} to the end of the array array named by {\it name}.
+{\it value} is inserted according to \gotomacro\currdef.
+\emacroexp
+
+\macroexp{\prependarray {<name>}{<value>}}
+prepends {\it value} to the end of the array array named by {\it name}.
+{\it value} is inserted according to \gotomacro\currdef.
+\emacroexp
+
+\macroexp{\appendarraymany {<name>}{{<value1>}{<value2>}...{<valueN>}}}
+appends {\it value1} through {\it valueN} to the end of the array array named by {\it name}.
+Each {\it value} is inserted according to \gotomacro\currdef.
+\emacroexp
+
+\macroexp{\arraylen {<name>}}
+expands to the length of the array specified by {\it name}.
+\emacroexp
+
+\macroexp{\getarraylen {<name>}<macro>}
+inserts the length of the array specified by {\it name} into the macro {\it macro}.
+\emacroexp
+
+\macroexp{\arraymap {<name>}<macro>}
+if the array specified by {\it name} is equivalent to $\tt [x0;\dots;xN]$ then doing \inlinecode|\arraymap{name}\X| will execute \inlinecode|\X{x1}{0}...\X{xN}{N}|.
+\emacroexp
+
+\macroexp{\indexarray {<name>}{<i>}<macro>}
+Puts the $i$th element in the array specified by {\it name} into the macro {\it macro}.
+\emacroexp
+
+\macroexp{\removearray {<name>}{<i>}<macro>}
+Removes the $i$th element in the array specified by {\it name} and places it into the macro {\it macro}.
+\emacroexp
+
+\macroexp{\removeitemarray {<name>}{<value>}}
+Removes all instances of {\it value} from the array specifed by {\it name} (comparison is done using \macro\ifx{} on macros containing {\it value} and the current index).
+\emacroexp
+
+\macroexp{\printarray {<name>}}
+Prints the array specified by {\it name}.
+\emacroexp
+
+\macroexp{\copyarray {<src>}{<dest>}}
+Copies the array {\it src} into {\it dest}.
+\emacroexp
+
+\macroexp{\concatenatearrays {<arr1>}{<arr2>}{<dest>}}
+Concatenates the arrays {\it arr1} and {\it arr2} and places the result into a new array {\it dest}.
+\emacroexp
+
+\macroexp{\initarray {<name>}{<x1>,...,<xN>}}
+Creates a new array by the name of {\it name} equivalent to $\tt[x1;\dots;xN]$.
+\emacroexp
+
+\macroexp{\findarray {<name>}{<value>}}
+Checks if the value {\it value} exists in the array {\it name} (checking is done via \macro\ifx).
+If the value exists, the value \macro\True{} is placed into \macro\@return at value, otherwise it is equal to \macro\False.
+\emacroexp
+
+\macroexp{\uniqueappendarray {<name>}{<value>}}
+Appends {\it value} to the array {\it name} only if it does not already exist in {\it name} (\macro\@return at value{} is set accordingly).
+\emacroexp
+
+\macroexp{\convertarray {<src>}{<dest>}}
+Converts a normal array {\it src} to a macro array {\it dest}.
+\emacroexp
+
+\macroexp{\mergesort {<src>}{<dest>}}
+Sorts the array {\it src} and places the result in {\it dest}.
+\emacroexp
+
+\subsubsection{Macro Arrays}
+
+\macroexp{\createmarray {<name>}}
+Creates a macro array by the name of {\it name}.
+\emacroexp
+
+\macroexp{\localizemarray {<name>}}
+Localizes (see \gotoanchor{localization}{localization}) the macro array specified by {\it name}.
+\emacroexp
+
+\macroexp{\appendmarray {<name>}{<value>}}
+Appends {\it value} to the macro array specified by {\it name}.
+\emacroexp
+
+\macroexp{\printmarray {<name>}}
+Prints the macro array specifed by {\it name}.
+\emacroexp
+
+\macroexp{\convertmarray {<src>}{<dest>}}
+Converts the macro array {\it src} into a normal array {\it dest}.
+\emacroexp
+
+\macroexp{\copymarray {<src>}{<dest>}}
+Copies the macro array {\it src} into {\it dest}.
+\emacroexp
+
+\macroexp{\initmarray {<name>}{<x1>,...,<xN>}}
+Creates a macro array {\it name} whose value is equivalent to $\tt[x1,\dots,xN]$.
+\emacroexp
+
+\macroexp{\findmarray {<name>}{<value>}<macro>}
+Searches for {\it value} in the macro array {\it name}.
+If found, sets \macro\@return at value{} to \macro\True{} and {\it macro} to the index where {\it value} was found.
+Otherwise \macro\@return at value{} is set to \macro\False.
+\emacroexp
+
+\subsection{Stacks}
+
+In the {\tt pdfData/stacks.tex} file, \pdftoolbox{} offers macros for creating and manipulating stack data structures.
+There are two types of stacks, which differ in how they store their data.
+They are generally used for different purposes:
+
+\blist
+ \item Normal stacks: these are normal stacks which store just the values given.
+ \item Macro stacks: these stacks are meant to store only macros: they store both the definition and name of the macro.
+\elist
+
+\subsubsection{Normal Stacks}
+
+\macroexp{\createstack {<name>}}
+Creates a normal stack by the name of {\it name}.
+\emacroexp
+
+\macroexp{\stackpush {<name>}{<value>}}
+Pushes the value {\it value} onto the stack specified by {\it name}.
+\emacroexp
+
+\macroexp{\stackdecrement {<name>}}
+Pops from the top of the stack specified by {\it name} (deleting the value).
+\emacroexp
+
+\macroexp{\stackpop {<name>}<macro>}
+Pops from the top of the stack specified by {\it name} into {\it macro}.
+\emacroexp
+
+\macroexp{\stacktop {<name>}<macro>}
+Places the top of the stack specified by {\it name} into the macro {\it macro} without popping.
+\emacroexp
+
+\subsubsection{Macro Stacks} \anchor{macro stacks}
+
+Macro stacks store macros, as opposed to values.
+When pushing a macro \macro\X{} onto the stack, not only is the meaning of \macro\X{} stored, but so is its name.
+
+\macroexp{\createmacrostack {<name>}}
+Creates a macro stack by the name of {\it name}.
+\emacroexp
+
+\macroexp{\macrostackpush {<name>}<macro>}
+Pushes the macro {\it macro} onto the macro stack specified by {\it name}.
+\emacroexp
+
+\macroexp{\macrostackdecrement {<name>}}
+Pops from the top of the macro stack specified by {\it name} (deleting the value).
+\emacroexp
+
+\macroexp{\macrostackset {<name>}}
+If the top of the macro stack specified by {\it name} has name \macro\X{} and value {\tt value}, sets \macro\X{} to {\tt value}.
+\emacroexp
+
+\macroexp{\macrostackpop {<name>}}
+Pops from the top of the macro stack specified by {\it name} (same as \macro\macrostackset, but also pops the value off of the stack).
+\emacroexp
+
+\macroexp{\macrostackpeek {<name>}<macro1><macro2>}
+If the top of the macro stack specified by {\it name} is $(\macro\X,{\tt value})$, then \macro\X{} is placed into {\it macro1}, and {\tt value} into {\it macro2}.
+\emacroexp
+
+\subsection{Localization} \anchor{localization}
+
+Using \gotoanchor{macro stacks}{macro stacks}, \pdftoolbox{} allows for {\it localization}.
+This gives the user the ability to create block scopes (as opposed to just plain-ol` \TeX{} groups).
+The usage is simple and as follows:
+\benum
+ \item The user enters a scope using \macro\beginscope.
+ \item The user {\it localizes} a macro \macro\X{} by doing \inlinecode|\localize\X|.
+ \item The user exits the scope using \macro\endscope.
+ Once the scope is exited, the previous definition of localized macros is restored.
+\eenum
+So for example,
+
+\beginhi \color{white}
+\def\X{0}
+\beginscope
+ \localize\X
+ \def\X{1}
+ \X
+ \beginscope
+ \def\X{2}
+ \X
+ \endscope
+ \X
+\endscope
+\X
+\endhi
+
+Will output 1 2 2 0.
+As opposed to
+
+\beginhi \color{white}
+\def\X{0}
+\bgroup
+ \def\X{1}
+ \X
+ \bgroup
+ \def\X{2}
+ \X
+ \egroup
+ \X
+\egroup
+\X
+\endhi
+
+Which will output 1 2 1 0.
+
+\subsection{Counters}
+
+In the {\tt pdfData/counters.tex}, \pdftoolbox{} implements counters.
+Counters are simple wrappers over plain-\TeX{} counters.
+They hold integer values, are mutable, and can be made dependent on one another so that when one is altered another is set to zero.
+
+\macroexp{\createcounter {<name>}[<c1>,...,<cN>]}
+Creates a counter by the name {\it name} dependent on counters {\it c1,\dots,cN}.
+\emacroexp
+
+\macroexp{\adddependentcounter {<secondary>}{<primary>}}
+Makes the {\it secondary} counter dependent on the {\it primary} one; whenever {\it primary} is (non-independently; see e.g. \gotomacro\seticounter) altered, {\it secondary} is set to zero.
+\emacroexp
+
+\macroexp{\zerodependents {<primary>}}
+Sets to zero all counters dependent on {\it primary}.
+\emacroexp
+
+\macroexp{\setcounter {<counter>}{<amount>}}
+Sets {\it counter} to {\it amount} (zeroing all counters dependent on {\it counter}).
+\emacroexp
+
+\macroexp{\advancecounter {<counter>}{<amount>}}
+Advances {\it counter} by {\it amount} (zeroing all counters dependent on {\it counter}).
+\emacroexp
+
+\macroexp{\seticounter {<counter>}{<amount>}}
+Sets {\it counter} to {\it amount} ({\it without} zeroing all counters dependent on {\it counter}).
+\emacroexp
+
+\macroexp{\advanceicounter {<counter>}{<amount>}}
+Advances {\it counter} by {\it amount} ({\it without} zeroing all counters dependent on {\it counter}).
+\emacroexp
+
+\macroexp{\counter {<name>}}
+Returns the \TeX{} counter corresponding to the \pdftoolbox{} counter {\it name}.
+Useful for example when printing the value of a counter: simply do \inlinecode|\the\counter{name}|.
+\emacroexp
+
+\subsection{Dictionaries}
+
+In the {\tt pdfData/dictionaries.tex} file, \pdftoolbox{} implements dictionaries (also colloquially known as ``hashmaps'' or ``maps'').
+These are simple maps between keys and values.
+
+\macroexp{\createdict {<name>}}
+Creates a dictionary by the name {\it name}.
+\emacroexp
+
+\macroexp{\adddict {<name>}{<key>}{<value>}}
+Adds the $({\it key}:{\it value})$ key-value pair to the dictionary specified by {\it name}.
+\emacroexp
+
+\macroexp{\indexdict {<name>}{<key>}}
+Expands to the value of {\it key} in the dictionary {\it name}.
+\emacroexp
+
+\macroexp{\keyindict {<name>}{<key>}}
+Sets \macro\@return at value{} according to if {\it key} is found in the dictionary {\it name}.
+\emacroexp
+
+\subsection{Mappings}
+
+In {\tt pdfData/key-value.tex}, \pdftoolbox{} implements the ability to pass key-value parameters to macros.
+
+\macroexp{\mapkeys {<options>}{<input>}}
+Maps the key-value pairs given in {\it input} according to {\it options}.
+{\it options} is itself a set of key-value pairs, where the value of each key is an array which may contain:
+\blist
+ \item {\tt name} (required): the name of the macro to give the value of the key;
+ \item {\tt required}: added if the key is required;
+ \item {\tt definition}: what definition macro to use for defining the value (e.g. \macro\def, \macro\edef);
+ \item {\tt mapping}: how to map the input to the value: the input is defined relative to {\tt definition} into a macro wrapped with {\tt mapping};
+ \item {\tt default}: the default value of the key.
+\elist
+Or the value may be empty (no array), which means it is {\it valueless} and acts as a boolean flag.
+\emacroexp
+
+So for example, you may have a macro defined like so:
+
+\beginhi \color{white}
+\def\puthi#1{Hello (#1)}
+
+\def\getinput#1{%
+ \mapkeys{
+ first={
+ name=fst,
+ required,
+ definition=\edef,
+ mapping=\puthi%
+ },
+ second={
+ name=snd,
+ default=S. Lurp%
+ }%
+ }{#1}%
+}
+
+\getinput{first=pdftoolbox}
+(\fst) (\snd)
+\endhi
+
+This will output {\tt (Hello (pdftoolbox)) (S. Lurp)}.
+
+\macroexp{\keyexists {<key>}<macro>\lastkeys}
+This is an internal command, added to this documentation only due to its usefulness.
+Given a key name {\it key}, this macro checks if it exists in the map corresponding to the last call to \macro\mapkeys{} (the macro itself is more versatile, but we restrict it to this case).
+If the key does not exist, then {\it macro} is set to \macro\_nul.
+This is useful with valueless keys.
+\emacroexp
+
+\bwarning
+ \macro\mapkeys{} is a bit finnicky when it comes to spaces and commas, but the rule is simple: place a comment at the end of each list.
+ That means that within each key's array, you must place a comment at the end (otherwise an extraneous space is added to the value), and after the last key's array you must place a comment.
+\eppbox
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-internal-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-internal-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-internal-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,78 @@
+Due to the nature of its use, most of the macros defined in the pdfData section have already been explained.
+The only part of pdfData which requires explanation regarding its internals is mappings, which offers richer features than already explained.
+
+\subsection{Mappings}
+
+Mappings are stored in two places: a {\it key list}, which is simply a macro consisting of pairs of the form \inlinecode|{key}{value}|, and macros \inlinecode|\key at k| (the second {\tt k} is variable in the name) whose definition
+is {\tt v}.
+
+Essentially, the major macro in this part is \macro\_mapkeys_with_setter\anchormacro\_mapkeys_with_setter.
+Its usage is
+
+\getmacrousage{\_mapkeys_with_setter <mapkey macro><key macro>{<map>}}
+where {\it mapkey macro} is the macro which manages the creation of a key-value pair (explained below), {\it key macro} is a macro to store
+the list of keys, and {\it map} is a map of key-value pairs.
+
+What happens is \macro\_mapkeys_with_setter{} will iterate over {\it map} and for every key-value pair $({\tt k,v})$ if the setter {\it mapkey macro} is \macro\M{} and {\it key macro} is \macro\K{}, it calls
+\inlinecode|\M \K{k}{v}|.
+This should (if \macro\M{} is defined properly) update \macro\K{} to include the pair $({\tt k,v})$.
+Furthermore, it should store the value {\tt v} in the macro \inlinecode|\key at k| (the second {\tt k} is variable in the name).
+
+The macro \macro\_update_lastkeys{} is provided for the former: to update \macro\K{}.
+Simply pass \inlinecode|\_update_lastkeys \K{k}{v}|.
+The simplest setter ({\it mapkey macro}) is \macro\_vanilla_mapkey\anchormacro\_vanilla_mapkey, which does exactly what was described and nothing more.
+Its definition is simply:
+
+\begincode
+\def\_vanilla_mapkey#1#2#3{%
+ \_xp\def\csname key@\_id#2\endcsname{#3}%
+ \_update_lastkeys{#1}{#2}{#3}%
+}
+/endcode
+
+You can use the macro \macro\getvalue\anchormacro\getvalue{} to get the value of a key: its definition is simply
+
+\begincode
+\def\getvalue#1{%
+ \csname key@#1\endcsname%
+}
+/endcode
+
+Another macro is \macro\keyexists{} whose use is
+
+\getmacrousage{\keyexists {<key>}<macro><key list>}
+It checks if the key {\it key} is in {\it key list}, and if it is, defines {\it macro} to be equal to the key.
+Otherwise {\it macro} is defined to be \macro\_nul.
+For this reason, if you'd like a key to have no value, it is advised to use the \macro\novalue{} macro (whose definition is just \macro\novalue).
+
+Another setter is \macro\_vardef_mapkey\anchormacro\_vardef_mapkey, whose only difference from \macro\_vanilla_mapkey{} is that instead of \macro\def ing \inlinecode|\key at k| to be equal to {\tt v}, \macro\_vardef_mapkey{} uses
+\macro\_vardef{} instead of \macro\def{} (which can be set before calling \macro\_vardef_mapkey), and \macro\_vardef s \inlinecode|\key at k| to be the (once) expansion of \inlinecode|\_varmap{v}| (where \macro\_varmap) can also be
+set before calling (\macro\_vardef_mapkey).
+
+\macro\mapkeys{} is defined as follows:
+
+\begincode
+\def\mapkeys#1#2{%
+ \_mapkeys_with_setter\_vanilla_mapkey\_keymappings{#1}%
+ \_xp\_setdefaults\_xp{\_keymappings}%
+ \_mapkeys_with_setter\_protected_mapkey\lastkeys{#2}%
+ \_check_required_supplied%
+}
+/endcode
+
+So first it gets the key-value pairs in {\it options} (\inlinecode|#1|) using \macro\_vanilla_mapkey; it places the results in \macro\_keymappings.
+Then it sets the default values (this is what \macro\_setdefaults{} does; as well as figuring out which keys are required).
+Then \macro\mapkeys{} calls \gotomacro\_mapkeys_with_setter{} using the setter \gotomacro\_protected_mapkey{} on {\it input} (\inlinecode|#2|).
+It stores the results in \macro\lastkeys\anchormacro\lastkeys.
+Then it checks that the required keys have been supplied (\macro\_check_required_supplied).
+
+The setter \macro\_protected_mapkey\anchormacro\_protected_mapkey{} is more complicated than the previously-discussed setters.
+Its use, like all setters, is
+
+\getmacrousage{\_protected_mapkey <key list>{<key>}{<value>}}
+
+But in this case, {\it key} has a value also in \macro\_keymappings{} as well; this value corresponds to another map containing the settings of {\it key} ({\tt name}, {\tt default}, {\tt required}, etc.).
+So now \macro\_protected_mapkey{} will find the settings of {\it key}, and get the values of each field (via \macro\_mapkeys_with_setter).
+Then it calls \macro\_vardef_mapkey{} with {\it key} and {\it value}, using the definitions of \macro\_vardef{} and \macro\_varmap{} according to the settings.
+Finally it sets the macro {\tt name} (if provided in the settings) to be equal to the value.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdata-internal-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdstruct-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdstruct-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdstruct-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,261 @@
+The pdfDstruct section of the \pdftoolbox{} toolbox is for managing the structure of your documents.
+
+\subsection{Layout}
+
+In {\tt pdfDstruct/layout.tex}, \pdftoolbox{} provides a macro \macro\setlayout\anchormacro\setlayout{} for setting up the layout of the document.
+The use is
+
+\macrousage\setlayout {[page width=<wd>,] [page height=<ht>,] [horizontal margin=<mwd>,]
+[vertical margin=<vwd>]}/emacrousage
+
+\subsection{Hyperlinks}
+
+In {\tt pdfDstruct/hyperlinks.tex}, \pdftoolbox{} provides macros for creating and managing hyperlinks.
+
+\macroexp{\anchor [<type>]{<name>}}
+Creates an anchor (a reference, if you will) to the current point in the document.
+\emacroexp
+
+\macroexp{\gotoanchor [<type>]{<name>}{<material>}}
+Creates a clickable field containing {\it material} which, when clicked, will go to the anchor labeled with the type {\it type} and name {\it name}.
+\emacroexp
+
+\macroexp{\url {<url>}{<material>}}
+Creates a clickable field containing {\it material} which, when clicked, will redirect to the url {\it url}.
+\emacroexp
+
+\macroexp{\createbordertype {<type>}{<color>}{<wd>}}
+Sets the border type of anchor type {\it type} to be of color {\it color} and width {\it wd}.
+Urls have border type {\tt url}.
+If a type doesn't have a specified border type, the {\tt default} one is used.
+\emacroexp
+
+\subsection{Fonts}
+
+In {\tt pdfDstruct/fonts.tex}, \pdftoolbox{} provides macros for accessing and controlling fonts.
+
+\macroexp{\addfont {<name>}{<sizes>}}
+This will add a font by the name {\it name} so that it is accessible by \pdftoolbox.
+{\it sizes} is a key-value dictionary which specifies the font codes for different sizes of the font.
+For example, in {\tt pdfDstruct/fonts.tex} is the usage:
+
+\beginhi \color{white}
+\addfont{rm}{%
+ default=cmr10,
+ 5pt=cmr5,
+ 6pt=cmr6,
+ 7pt=cmr7,
+ 8pt=cmr8,
+ 9pt=cmr9,
+ 10pt=cmr10,
+ 12pt=cmr12,
+ 17pt=cmr17
+}
+\endhi
+
+So now \pdftoolbox{} has access to the computer modern roman font ({\tt cmr}) at the sizes specified.
+The purpose of the default size is for when a size is not available.
+For example, requesting the {\tt rm} font at size $13$ will give you {\tt cmr10 at 13pt}.
+The default size is required.
+
+\pdftoolbox{} provides the following fonts:
+
+\emacroexp
+
+\quitvmode\vbox{\tabskip=.5cm\halign{&\hfil#:\tabskip=0pt&\ \tt#\hfil\tabskip=.5cm\cr
+rm&cmr&it&cmti&bf&cmbx&sc&cmcsc&mi&cmmi&sy&cmsy&ex&cmex&sl&cmsl\cr
+ss&cmss&tt&cmtt&msam&msam&msbm&msbm&eufm&eufm&rsfs&rsfs\cr
+}}
+
+\macroexp{\applyfontcode <font code>}
+Applies the font specified by {\it font code}.
+For example, \inlinecode|\applyfontcode cmr10| will set the font to {\tt cmr10}.
+\emacroexp
+
+\macroexp{\setfontfamily {<font>}{<family>}}
+Sets math font family {\it family} to the font {\it font} (which is specified by \gotomacro\addfont).
+For example, \inlinecode|\setfontfamily{rm}{0}| sets the alpha-numeric font family to {\tt rm}.
+\emacroexp
+
+\macroexp{\setfont {<font>}}
+Sets the current font to {\it font}.
+The current font is stored in the macro \macro\currfont\anchormacro\currfont.
+\emacroexp
+
+\macroexp{\setscale {<scale>}}
+Sets the current font scale to {\it scale}.
+The current font scale is stored in the macro \macro\currscale\anchormacro\currscale.
+\emacroexp
+
+\macroexp{\setfontandscale {<font>}{<scale>}}
+Sets the current font to {\it font} and scale to {\it scale}.
+\emacroexp
+
+\pdftoolbox{} also provides the following font switches (which are simple wrappers around \macro\setfont{} which also set \macro\fam):
+
+\hbox to\hsize{\hfil\inlinecode|\bf, \it, \bb, \sf, \sl, \frak, \scr|\hfil}
+
+\macroexp{\mathfonttable {<family>}[<offset>]{<table>}}
+The \macro\mathfonttable{} macro's purpose is to define multiple mathematical characters for the same family.
+{\it table} consists of a sequence of macros followed by numbers (e.g. \inlinecode|\square0|) which correspond to the name of the macro and the math type (in this case $0$: ordinary/\macro\mathord).
+\macro\mathfonttable{} will iterate over {\it table} and \macro\mathchardef{} the macro to be equal to the character at the current position in family {\it family} of the type specified.
+If {\it offset} is specified, it will start iterating over the family starting from the offset.
+
+More explicitly, if {\it family} is {\tt X} and the $\tt i$th index in the table is \inlinecode|\X N|, then the macro does essentially
+
+\hbox to\hsize{\hfil\inlinecode|\mathchardef\X = XNi|\hfil}
+
+To skip over an index, simply write \macro\__{}.
+\emacroexp
+
+Using \macro\mathfonttable, \pdftoolbox{} defines the following:
+
+{\tabskip=2pt\halign{&\hfil\def\X{#}\_xp\macro\X: $\X$\hfil\cr
+ \boxdot&\boxplus&\boxtimes&\square\cr
+ \blacksquare&\diamond&\blackdiamond&\rotateclockwise\cr
+ \rotatecounterclockwise&\rightleftharpoons&\leftrightharpoons&\boxminus\cr
+ \Vdash&\Vvdash&\vDash&\twoheadrightarrow\cr
+ \twoheadleftarrow&\leftleftarrows&\rightrightarrows&\upuparrows\cr
+ \downdownarrows&\uprightharpoon&\downrightharpoon&\upleftharppon\cr
+ \downleftharpoon&\rightarrowtail&\leftarrowtail&\leftrightarrows\cr
+ \rightleftarrows&\Lsh&\Rsh&\rightsquigarrow\cr
+ \leftrightsquigarrow&\looparrowleft&\looparrowright&\circeq\cr
+ \succsim&\gtrsim&\gtrapprox&\multimap\cr
+ \therefore&\because&\Doteq&\triangleq\cr
+ \precsim&\lesssim&\lessapprox\cr
+}}
+
+\subsection{Hooks}
+
+\pdftoolbox{} provides a tool, inspired by \LaTeX, called {\it hooks} (source in {\tt pdfDstruct/hooks.tex}).
+Hooks are simply snippets of code that can be inserted into macros and then altered later.
+An example is given at the end of this section.
+
+\macroexp{\createhook {<name>}}
+Creates a hook by the name of {\it name}.
+\emacroexp
+
+\macroexp{\appendtohook {<name>}{<code>}}
+Appends {\it code} to the hook specified by {\it name}.
+\emacroexp
+
+\macroexp{\prependtohook {<name>}{<code>}}
+Prepends {\it code} to the hook specified by {\it name}.
+\emacroexp
+
+\macroexp{\callhook {<name>}}
+Calls the hook specified by {\it name}.
+\emacroexp
+
+\pdftoolbox{} provides a builtin hook called {\tt end} which is executed by \macro\bye.
+Throughout the document, you can add macros to an array called {\tt document data}, then all these definitions are written to the file \inlinecode|\jobname.data| by the {\tt end} hook.
+
+Specifically, you can use the \macro\docdata\anchormacro\docdata{} macro to add a macro to the document's data, e.g. if you have a macro \macro\name{} which has the author's name (say, S. Lurp), you can do
+\inlinecode|\docdata\name|, and this will write the line \inlinecode|\gdef\name{S. Lurp}| to the data file.
+Then at the beginning of the document next compilation, you can load all definitions in the data file.
+
+\subsection{Indices}
+
+In {\tt pdfDstruct/index.tex}, \pdftoolbox{} provides macros for creating an index.
+The index is organized into {\it categories} and {\it items} within each category, and an associated {\it value}.
+A category may be something like ``manifolds'' and an item within this category may be ``topological'' which has a value corresponding to the page number where topological manifolds are defined.
+
+\macroexp{\indexize {<options>}}
+Adds an item to the index, specified by options, which has fields:
+\benum
+ \item {\tt category} (required): the category of the item;
+ \item {\tt item}: the item of the item;
+ \item {\tt value} (required): the value of the item;
+ \item {\tt expand value} (valueless): added if {\tt value} should be expanded (e.g. if {\tt value} is a macro corresponding to the page number, it needs to be expanded);
+ \item {\tt add hyperlink} (valueless): whether or not the item's values should be hyperlinked.
+\eenum
+\emacroexp
+
+\macroexp{\seealso {<options>}}
+Adds a ``see also'' item to the index: one which redirects to another index item.
+{\it options} is a map which has fields:
+\benum
+ \item {\tt category} (required): the category of the item;
+ \item {\tt item}: the item of the item;
+ \item {\tt dest} (required): the destination of the ``see also'' (e.g. if the item is ``wedge product'', you may want to also see ``exterior product'', and so the destination may be ``exterior product'');
+ \item {\tt hyperlink}: an anchor to link to;
+ \item {\tt index link} (valueless): a flag of whether or not the anchor is within the index.
+\eenum
+To link to an item within the index, suppose of category {\tt C} and item {\tt I}, set {\tt hyperlink} to {\tt C:I} (or just {\tt C:} if {\tt I} is empty), and set {\tt index link}.
+\emacroexp
+
+\macroexp{\index}
+Prints the index.
+\emacroexp
+
+\macroexp{\addtoindex {<category>}[<item>]}
+Adds an item to the index of category {\it category} and item {\it item}.
+Its value is \macro\@defaultindexval{} (by default \inlinecode|\the\pageno|), and {\tt expand value} and {\tt add hyperlink} are set.
+\emacroexp
+
+\subsection{Lists}
+
+In {\tt pdfDstruct/lists.tex}, \pdftoolbox{} provides macros for creating lists of text.
+
+There are two types of lists: unenumerated and enumerated.
+Unenumerated lists start with \macro\blist\anchormacro\blist{} and end with \macro\elist\anchormacro\elist.
+Each item begins with \macro\item\anchormacro\item.
+The symbol used for each bullet point is determined by the nested depth of the list.
+For a depth of $N$, the symbol used is stored in the macro \macro\liststyleN\anchormacro\liststyle.
+
+Similarly enumerated lists start with \macro\benum\anchormacro\benum{} and end with \macro\elist\anchormacro\eenum.
+Each item begins with \macro\item, and the style for the enumeration is determined by the depth of the list.
+For a depth of $N$, the $n$th element is styled with \inlinecode|\enumstyleN{n}|.
+
+To add text in between items (not as part of the list), you can use \macro\mtext\anchormacro\mtext.
+
+\subsection{Table of Contents}
+
+In {\tt pdfDstruct/tableofcontents.tex}, \pdftoolbox{} provides macros for creating and displaying tables of content.
+
+\macroexp{\addtoccontent {<marker>}{<title>}{<value>}{<depth>}{<anchor>}}
+Adds content to the table of contents.
+The marker is {\it marker} (e.g. $1.1$; this is printed to the left of the title), title is {\it title} (e.g. chapter name), value is {\it value} (e.g. page number), depth is {\it depth},
+and is linked to the anchor {\it anchor}.
+The depth {\it depth} determines the style used in the table (see \gotomacro\settocdepthformat).
+\emacroexp
+
+\macroexp{\tableofcontents}
+Prints the table of contents.
+\emacroexp
+
+\macroexp{\settocdepthformat {<depth>}{<options>}}
+Sets the format of the table of contents at the depth {\it depth}.
+{\it options} is a map with the following fields:
+\blist
+ \item {\tt marker}: the style for the marker (default is \inlinecode|\setfont{rm}|; the marker is passed as a parameter to {\tt marker});
+ \item {\tt marker buffer}: the buffer between the title and marker (default is {\tt.25cm});
+ \item {\tt title}: the style for the title (default is \inlinecode|\setfont{rm}|; the title is passed as a parameter to {\tt title});
+ \item {\tt value}: the style for the value (default is \inlinecode|\setfont{rm}|; the value is passed as a parameter to {\tt value});
+ \item {\tt leader}: the leader to add between the title and value (default is nothing);
+ \item {\tt indent}: the amount to indent the line (default is 0pt);
+ \item {\tt buffer}: the amount of buffer to add around the line (default is 0pt).
+\elist
+\emacroexp
+
+\pdftoolbox{} provides four types of sectioning: parts, sections, subsections, and subsubsections.
+Each has a counter in its name (e.g. {\tt section}), and a macro with the current section name (e.g. \macro\currsection).
+
+\macroexp{\section (*){<title>}}
+Adds a section to the document.
+If the asterisk is added, the section is a ``pseudosection'': the section counter is not incremented and not displayed, and the section is not added to the table of contents.
+Otherwise the section counter is incremented and displayed, and the section is added to the table of contents.
+\emacroexp
+
+\macroexp{\subsection (*){<title>}}
+Adds a subsection to the document.
+If the asterisk is added, the subsection is a ``pseudosubsection'': the subsection counter is not incremented and not displayed, and the subsection is not added to the table of contents.
+Otherwise the subsection counter is incremented and displayed, and the subsection is added to the table of contents.
+\emacroexp
+
+\macroexp{\subsubsection (*){<title>}}
+Adds a subsubsection to the document.
+If the asterisk is added, the subsubsection is a ``pseudosubsubsection'': the subsubsection counter is not incremented and not displayed, and the subsubsection is not added to the table of contents.
+Otherwise the subsubsection counter is incremented and displayed, but the subsubsection is still not added to the table of contents.
+\emacroexp
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfdstruct-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,214 @@
+The pdfGraphics section of the \pdftoolbox{} toolbox is for pdf-specific graphics macros.
+You can use it to create colorful documents with illustrations, etc.
+
+\subsection{Colors}
+
+In {\tt pdfGraphics/colors.tex}, \pdftoolbox{} provides macros for coloring text and areas of your document.
+
+\macroexp{\color <color space>{<code>}/cr\color {<name>}}
+Switches the color of the document.
+In its first form, {\it color space} corresponds to either {\tt rgb} or {\tt cmyk}, and {\it code} is either an rgb or cmyk code.
+In its second form, if {\it name} is a predefined color name (see \gotomacro\definecolor), the color is switched to it.
+\emacroexp
+
+\macroexp{\localcolor <color space>{<code>}{<text>}/cr\localcolor {<name>}{<text>}}
+Switches the color of {\it text}, according to the options provided (see \gotomacro\color).
+\emacroexp
+
+\macroexp{\definecolor {<name>}{<color space>}{<code>}}
+Defines a color of name {\it name} whose space is {\it color space} (either {\tt rgb} or {\tt cmyk}) of code {\it code} (either an rgb or cmyk code).
+\emacroexp
+
+\macroexp{\letcolor {<new name>}{<name>}}
+Defines a color of name {\it new name} to be equal to the existing color of name {\it name}.
+\emacroexp
+
+\macroexp{\definecolormacro {<name>}{<color space>}{<code>}}
+Calls \gotomacro\definecolor, and also defines a macro of name {\it name} which is equivalent to \inlinecode|\localcolor <color space>{<code>}{#1}|.
+
+The following colors are defined:
+
+\centerline{\red{red} \blue{blue} \green{green} \yellow{yellow} \orange{orange} \purple{purple} \highlightbox{black}{\white{white}} \black{black} \darkgreen{darkgreen} \grey{grey}}
+\emacroexp
+
+\macroexp{\highlightbox <color space>{<code>}{<material>}/cr
+\highlightbox {<name>}{<material>}}
+Colors the background of the material {\it material} according to the color provided.
+For example \inlinecode|\highlightbox {red}{pdfToolbox}| will yield \highlightbox{red}{pdfToolbox}.
+\emacroexp
+
+\macroexp{\coloredbox <color space>{<code>}{<material>}/cr
+\coloredbox {<name>}{<material>}}
+Like \gotomacro\highlightbox{} but adds a buffer of space around {\it material} in accordance with \macro\bufferwidth\anchormacro\bufferwidth{} and \macro\bufferheight\anchormacro\bufferheight.
+For example the following code: \inlinecode|\coloredbox {red}{pdfToolbox}|; will yield \coloredbox{red}{pdfToolbox}.
+\emacroexp
+
+\macroexp{\framecoloredbox <color space>{<code>}{<material>}/cr
+\framecoloredbox {<name>}{<material>}}
+Like \gotomacro\coloredbox{} but adds a frame around {\it material} of width \macro\framewidth.
+For example \inlinecode|\framecoloredbox {red}{pdfToolbox}| will yield \framecoloredbox{red}{pdfToolbox}.
+\emacroexp
+
+\macroexp{\framebox {<material>}}
+Adds a frame around {\it material} with a buffer of \macro\bufferwidth{} and \macro\bufferheight{} of width \macro\framewidth.
+\emacroexp
+
+\macroexp{\curvedcolorbox {<stroke color>}{<bg color>}{<material>}{<curve control>}}
+Creates a curved color framed box around {\it material} with frame color {\it stroke color} and background color {\it bg color} (which may be names or of the form \inlinecode|<color space>{<code>}|.
+The curve's stroke width is determined by \macro\curvewidth, and the buffer around the material is determined by \macro\curvebuffer.
+{\it control} is a sequence of $4$ symbols (either {\tt .} or {\tt X}) which determine whether a corner is curved or not.
+A {\tt .} corresponds to a curve and a {\tt X} corresponds to a right corner.
+A shadow of color \macro\boxshadowcolor{} is added to to the box, at an x and y offset of \macro\shadowxoff{} and \macro\shadowyoff{} respectively.
+
+So for example:
+
+\displaycode{%
+\curvedcolorbox{blue}{red}{\color{white}pdfToolbox}{....}&\cr
+\curvedcolorbox{blue}{red}{\color{white}pdfToolbox}{X...}&\cr
+\curvedcolorbox{blue}{red}{\color{white}pdfToolbox}{.X..}&\cr
+\curvedcolorbox{blue}{red}{\color{white}pdfToolbox}{..X.}&\cr
+\curvedcolorbox{blue}{red}{\color{white}pdfToolbox}{...X}&}
+\emacroexp
+
+\macroexp{\fakebold {<material>}}
+Bolds the material {\it material} (essentially just thickening the stroke width according to \macro\fakeboldwidth).
+\emacroexp
+
+\macroexp{\flip {<material>}}
+\quitvmode\flip{flips} {\it material} about its vertical axis.
+\emacroexp
+
+\subsection{Colorboxes}
+
+In {\tt pdfGraphics/colorboxes.tex}, \pdftoolbox{} provides macros for pretty printing textboxes (ppboxes).
+These are simply colored textboxes which can split across pages.
+There are two kinds of pretty textboxes: {\tt ppbox}es and {\tt linedppbox}es.
+
+\macroexp{\bppbox {<bg color>}{<stroke color>}{<fg color>}[<curve control>] ... \eppbox}
+This creates a {\tt ppbox}, which is just a wrapper around \gotomacro\curvedcolorbox.
+\emacroexp
+
+\macroexp{\blinedppbox {<bg color>}{<stroke color>}{<fg color>} ... \elinedppbox}
+This creates a colored textbox with a rule down the left side.
+For example:
+
+\blinedppbox{red}{black}{white}
+This is a {\tt linedppbox} with a red background, black stroke, and white text.
+\elinedppbox
+
+The width of the rule is determined by \macro\pprulewd, the vertical buffer within the box (around the text) is determined by \macro\pprulevbuf, and the horizontal buffer on the left is \macro\pprulehbuf.
+\emacroexp
+
+\subsection{Illustrating}
+
+In {\tt pdfGraphics/pdfdraw.tex}, \pdftoolbox{} provides macros for creating illustrations.
+
+\bwarning
+This feature scares me.
+Its implementation is a mess and I am scared to change it; but I will need to at some point.
+\eppbox
+
+\macroexp{\bdrawing...\edrawing}
+Begin a drawing environment.
+The drawing environment is a plane as large as the drawings within it.
+$(0,0)$ corresponds to the bottom left corner.
+\emacroexp
+
+\macroexp{\addnode {<text>}{<x>}{<y>}{<name>}}
+Creates a node by the name of {\it name} with text {\it text} at coordinate $(x,y)$.
+You can access the following values (called node-relative coordinates): {\tt<name>.left}, {\tt<name>.top}, {\tt<name>.right}, {\tt<name>.bottom}, {\tt<name>.xcenter}, {\tt<name>.ycenter}.
+\emacroexp
+
+\macroexp{\drawpath {<start x>}{<start y>}{<end x>}{<end y>}{<x off>}{<y off>}{<start cap>}{<end cap>}{<color>}}\hfill\break
+Draws a line from $(\hbox{\it start x},\hbox{\it start y})$ to $(\hbox{\it end x},\hbox{\it end y})$.
+This is offset by {\it off x} on the $x$-axis and {\it off y} on the $y$-axis (these are dimensions).
+{\it start cap} is the linecap used at the starting point, and {\it end cap} is the linecap used at the end point (see \gotomacro\definelinecap).
+The line is drawn in the color {\it color}.
+
+The coordinates may be numeric values or node-relative coordinates (see \gotomacro\addnode).
+\emacroexp
+
+\macroexp{\drawbezier {<start x>}{<start y>}{<end x>}{<end y>}{<off>}{<curvature>}{<start cap>}{<end cap>}{<color>}}\hfill\break
+Draws a curve from $(\hbox{\it start x},\hbox{\it start y})$ to $(\hbox{\it end x},\hbox{\it end y})$ with curvature {\it curvature}.
+This is offset by {\it off}, which must be a pair of the form \inlinecode|{<x off>}{<y off>}| corresponding to the $x$-axis offset and $y$-axis offset respectively (dimensions).
+{\it start cap} is the linecap used at the starting point, and {\it end cap} is the linecap used at the end point (see \gotomacro\definelinecap).
+The line is drawn in the color {\it color}.
+
+The coordinates may be numeric values or node-relative coordinates (see \gotomacro\addnode).
+\emacroexp
+
+\macroexp{\definelinecap {<name>}{<code>}{<width>}}
+Defines a linecap by the name of {\it name}.
+{\it code} is the code which draws the linecap (see \gotoanchor{internal-pdfdraw}{Internals of pdfDraw}), and {\it width} is the width of the linecap.
+
+The provided linecaps are:
+
+\def\drawlinecap#1{$\vcenter{\hbox to\csname linecap@#1 at wd\endcsname pt{\pdfliteral{q \_pdfdraw_nattrans, 1 j 1 J \_pdfdraw_strokewidth\_space w \csname linecap@#1\endcsname\_space Q}\hfil}}$}
+\centerline{\vbox{\tabskip=.5cm\halign{&\hfil\gdef\@@{#}{\tt\@@}: \tabskip=\z@&\_gobble{#}\drawlinecap\@@\tabskip=.5cm\cr
+>&&<&&|-&&-|&&>>&&<<&&o&\cr
+}}}
+
+There is also an empty linecap {\tt-}.
+\emacroexp
+
+Outside of drawing environments, \pdftoolbox{} provides a macro to make diagrams, \macro\drawdiagram.
+Its usage is \getmacrousageB{\drawdiagram {<table>}{<arrows>}}.
+{\it table} is a normal \TeX{} alignment table (similar format as \macro\halign{}, without the preamble).
+{\it arrows} is a collection of \gotomacro\diagarrow{} macro calls.
+
+\macroexp{\diagarrow {<options>}}
+Draws an arrow in a \macro\drawdiagram{} diagram.
+{\it options} contains the following keys:
+\blist
+ \item {\tt from} (required): the cell from which to start the arrow.
+ Cells start indexing at \inlinecode|{1,1}| for the top left cell where the first number is the row and the second the column;
+ \item {\tt to} (required): the cell to end the arrow;
+ \item {\tt left cap} (default {\tt-}): the start linecap;
+ \item {\tt right cap} (default {\tt>}): the end linecap;
+ \item {\tt color} (default {\tt black}): the color to draw the arrow in;
+ \item {\tt x off} (default {\tt0pt}): the $x$-axis offset;
+ \item {\tt y off} (default {\tt0pt}): the $y$-axis offset;
+ \item {\tt text}: the text to add on the arrow;
+ \item {\tt x distance} (default {\tt0pt}): the amount to move the text on the $x$-axis;
+ \item {\tt y distance} (default {\tt0pt}): the amount to move the text on the $y$-axis;
+ \item {\tt slide} (default {\tt.5}): where to place the text relative to the arrow;
+ \item {\tt curve}: the amount to curve the arrow;
+ \item {\tt dashed} (valueless): add to make the arrow line dashed;
+ \item {\tt dotted} (valueless): add to make the arrow line dotted;
+ \item {\tt origin orient}: the placement of the start of the arrow relative to the origin\hfill\break (a pair like \inlinecode|{left,bottom}|);
+ \item {\tt dest orient}: the placement of the end of the arrow relative to the destination\hfill\break (a pair like \inlinecode|{left,bottom}|).
+\elist
+\emacroexp
+
+So for example,
+
+\bgroup\parindent=\z@
+\beginhi \color{white}
+\drawdiagram{
+ A&B\cr
+ C&D
+}{
+ \diagarrow{from={1,1}, to={1,2}, left cap=<<}
+ \diagarrow{from={1,2}, to={2,2}, color=rgb{1 0 0}, text={hello}, x distance=.5cm}
+ \diagarrow{from={2,2}, to={2,1}, curve=10pt, origin orient={xcenter,bottom}, dest orient={xcenter,bottom}}
+ \diagarrow{from={2,1}, to={1,1}, dashed, left cap=o, right cap=o}
+}
+\endhi
+\egroup
+
+Will yield
+
+\centerline{\drawdiagram{
+ A&B\cr
+ C&D
+}{
+ \diagarrow{from={1,1}, to={1,2}, left cap=<<}
+ \diagarrow{from={1,2}, to={2,2}, color=rgb{1 0 0}, text={hello}, x distance=.5cm}
+ \diagarrow{from={2,2}, to={2,1}, curve=10pt, origin orient={xcenter,bottom}, dest orient={xcenter,bottom}}
+ \diagarrow{from={2,1}, to={1,1}, dashed, left cap=o, right cap=o}
+}}
+
+Between each row of the diagram, space of width \macro\diagrowbuf{} is added.
+Between each column, \macro\diagcolbuf.
+The height of each row is at least \macro\diagrowheight{} and the width of each column is at least \macro\diagcolwidth.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-internal-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-internal-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-internal-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,111 @@
+\subsection{Colors}
+
+There are some useful macros in the {\tt pdfGraphics/colors.tex}, here we describe them.
+
+\bwarning
+These macros and file require a clean-up.
+Unfortunately many other macros are dependent on them, and I am scared to significantly alter anything.
+One day, though.
+\eppbox
+
+\macroexp{\_rgb_encode {<rgb code>}/cr
+\_rgb_encodebg {<rgb code>}/cr
+\_rgb_encodefg {<rgb code>}/cr
+\_cmyk_encode {<cmyk code>}/cr
+\_cmyk_encodebg {<cmyk code>}/cr
+\_cmyk_encodefg {<cmyk code>}}
+Gets the code for the specified color for the foreground or background or both.
+\emacroexp
+
+\macroexp{\_setcolor_code {<pdf code>}}
+Sets the current color using {\it pdf code} (which can be obtained using one of the above macros).
+Essentially just pushing {\it pdf code} onto the color stack.
+After the current group, calls \gotomacro\_pdfcolor_restore.
+\emacroexp
+
+\macroexp{\_pdfcolor_restore}
+Restores the color (pops from the color stack).
+\emacroexp
+
+\macroexp{\_color_set {<color space>}{<color code>}/cr
+\_colorbg_set {<color space>}{<color code>}/cr
+\_colorfg_set {<color space>}{<color code>}}
+Sets the current color using {\it color code} according to {\it color space} (either {\tt rgb} or {\tt cmyk}).
+\emacroexp
+
+\macroexp{\_color_defined {<name>}/cr
+\_colorbg_defined {<name>}/cr
+\_colorfg_defined {<name>}}
+Sets the current color according to the color {\it name} (see \gotomacro\definecolor).
+\emacroexp
+
+\macroexp{\_getcolorparam <macro>{<place>}<color>}
+Gets the pdf code for {\it color} (which may be of the form \inlinecode|rgb{...}|, \inlinecode|cmyk{...}|, or \inlinecode|{name}|), and calls {\it macro} with it as a parameter.
+{\it place} is either {\tt fg}, {\tt bg}, or left empty.
+\emacroexp
+
+\macroexp{\_setcolor {<place>}{<color>}}
+Sets the current color according to {\it place} and {\it color}.
+{\it place} is either {\tt fg}, {\tt bg}, or left empty.
+\emacroexp
+
+\macroexp{\_getcolor {<place>}{<color>}}
+Expands to the pdf code for {\it color} ({\it place} is either {\tt fg}, {\tt bg}, or left empty).
+\emacroexp
+
+\section{Colorboxes}
+
+\pdftoolbox{} provides a relatively simple interface for creating colorboxes like \macro\bppbox.
+The main macro is \macro\_splitcontentbox\anchormacro\_splitcontentbox, whose usage is
+
+\getmacrousage{\_splitcontentbox {<buffer>}<macro>}
+
+Which repetitively splits the box \macro\_contentbox\anchormacro\_contentbox{} into \macro\_splitbox{} to fill the remaining material on a page or in the box itself.
+Then the split box is passed to {\it macro} for pretty formatting.
+{\it buffer} is the total amount of vertical buffering that {\it macro} adds to the box it prints.
+
+So to create your own prettyprint-box (ppbox), you create two macros, say \macro\beginpp{} and \macro\endpp.
+In \macro\beginpp{} you add the code which should go before the ppbox and starts getting content for \macro\_contentbox.
+For example, it could be as simple as:
+
+\begincode
+\def\beginpp#1#2{%
+ \def\_colorcontentbox{%
+ \hbox{\coloredbox{#1}{\_setcolor{}{#2}\box\_splitbox}}%
+ }%
+ \par\kern.5cm\null\par%
+ \setbox\_contentbox=\vbox\bgroup
+ \hsize=\dimexpr\hsize-\bufferwidth * 2\relax%
+}
+
+\def\endpp{%
+ \egroup%
+ \_splitcontentbox{\bufferwidth * 2}\_colorcontentbox%
+ \kern.5cm\relax%
+}
+/endcode
+
+This creates a ppbox which is simply a wrapper around \gotomacro\coloredbox.
+It colors the background in \inlinecode|#1| and the foreground in \inlinecode|#2|.
+
+In depth, here's how it works:
+\benum
+ \item First, \macro\beginpp{} defines \macro\_colorcontentbox{} to simply place \macro\_splitbox{} into a \macro\coloredbox{} of color \inlinecode|#1|, and sets the foreground color to \inlinecode|#2|.
+ \item Then it adds some space before the start of the first ppbox.
+ The reason for the \inlinecode|\null\par| is to move the kern from the list of recent contributions to the main vertical list (see, e.g. the \TeX book for more information on \TeX's output routines).
+ \item Then \macro\beginpp{} begins reading content for \macro\_contentbox.
+ It alters \macro\hsize{} to compensate for the buffer added by \macro\coloredbox.
+ \item When \macro\endpp{} is called, it first stops the capture of \macro\_contentbox{} with \macro\egroup.
+ \item Then it calls \inlinecode|\_splitcontentbox{\bufferwidth * 2}\_colorcontentbox|, which splits the captured material (in \macro\_contentbox) and places each \macro\_splitbox{} in \macro\_colorcontentbox, which was
+ defined in \macro\beginpp.
+ \inlinecode|\bufferwidth * 2| corresponds to the amount of vertical buffering \macro\_colorcontentbox{} adds to \macro\_splitbox.
+ \item \macro\endpp{} adds buffering after the final ppbox.
+\eenum
+
+\subsection{Illustrating} \anchor{internal-pdfdraw}
+
+\bwarning
+This is a complicated and messy part of \pdftoolbox.
+Documentation will be added once it is cleaned up.
+\eppbox
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdfgraphics-internal-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdftoolbox-utils-docs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdftoolbox-utils-docs.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdftoolbox-utils-docs.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,91 @@
+In {\tt pdfToolbox-utils.tex}, \pdftoolbox{} provides various useful utilities for a variety of (relatively) simple tasks.
+
+\subsection{Simple Macros}
+
+\macroexp{\_checkloaded {<name>}}
+Place this at the beginning of a package or a file in a package to ensure you don't include the same file multiple times.
+It will check if {\it name} has already been loaded: if it has been, it stops input; otherwise it remembers that {\it name} has been loaded and continues inputting it.
+\emacroexp
+
+A few useful short macros:
+\blist
+ \item \macro\_xp: shorthand for \macro\expandafter;
+ \item \macro\_nul: defined to be \macro\_nul; useful as a marker (used, for example, to mark the end of something);
+ \item \macro\_id: defined as \inlinecode|\def\_id#1{#1}|;
+ \item \macro\_gobble: gobbles the next parameter;
+ \item \macro\_gobbletilnul: gobbles until it sees \macro\_nul{} (definition is \inlinecode|\def\_gobbletilnul#1\_nul{}|);
+ \item \macro\_mstrip: given a control sequence, returns its name without the escape character;
+ \item \macro\True: defined to be \macro\True; used when returning a value;
+ \item \macro\False: defined to be \macro\False; used when returning a value;
+ \item \macro\glet: \inlinecode|\global\let|;
+ \item \macro\_xplet: takes two inputs {\tt A} and {\tt B}, suppose they expand to {\tt X} and {\tt Y} respectively.
+ Then \inlinecode|\_xplet{A}{B}| is equivalent to \inlinecode|\let XY|;
+ \item \macro\_afterfi: within an \inlinecode|\if...\fi| construct, placing code inside \macro\_afterfi{} will execute it (if the condition matches) after the \macro\fi;
+ \item \macro\say{}: prints the input on the terminal (on its own line).
+\elist
+
+\macroexp{\_ifnextchar <char>{<first>}{<second>}
+\@ifnextchar <char>{<first>}{<second>}}
+Inspired by \LaTeX.
+Looks at the following character, if it is equal to {\it char}, executes {\it first} and otherwise executes {\it second}.
+The following character is left in the input stream.
+\emacroexp
+
+\macroexp{\_ifstar {<first>}{<second>}
+\@ifstar {<first>}{<second>}}
+Inspired by \LaTeX.
+Looks at the following character, if it is an asterisk, executes {\it first} and otherwise executes {\it second}.
+The asterisk is removed from the stream.
+\emacroexp
+
+\macroexp{\_nopt {<dim expression>}}
+Expands to the computation of {\it dim expression} (a dimension expression) without the trailing {\tt pt}.
+\emacroexp
+
+\macroexp{\_noptfloor {<dim expression>}}
+Expands to the whole part of the computation of {\it dim expression} (a dimension expression) without the trailing {\tt pt}.
+\emacroexp
+
+\macroexp{\literal <macro definition>}
+Equivalent to \inlinecode|\def\X<macro definition>\X|.
+\emacroexp
+
+\macroexp{\_getline <macro>}
+Reads until a linebreak and then passes that to {\it macro} as its parameter.
+\emacroexp
+
+\macroexp{\reverse <macro>{<list>}}
+Reverses {\it list} and puts the result in {\it macro}.
+\emacroexp
+
+\subsection{Setters}
+
+\pdftoolbox{} has a concept of {\it setters}: these are the macros used for defining things.
+There are four three: \inlinecode|\currlet, \currdef, \curredef, \currset|\anchormacro\currdef.
+These generally alternate between \inlinecode|\let, \def, \edef, \empty| and \inlinecode|\glet, \gdef, \xdef, \global|.
+You can change the definitions via the two macros \macro\localsetters\anchormacro\localsetters{} and \macro\globalsetters\anchormacro\globalsetters.
+
+So for example, if you'd like to use an array and make the changes global, you'd first execute \macro\globalsetters.
+
+\subsection{Repeating Macros}
+
+\macroexp{\commap <macro>{<list>}}
+If {\it list} is a comma-separated list of the form {\tt x1,\dots,xN} and {\it macro} is \macro\X, this will execute \inlinecode|\X{x1}...\X{xN}|.
+\emacroexp
+
+\macroexp{\map <macro>{<list>}}
+If {\it list} is a list of the form \inlinecode|x1\dots xN| where each {\tt xI} is a group or a single token, and {\it macro} is \macro\X, this will execute \inlinecode|\X{x1}...\X{xN}|.
+\emacroexp
+
+\macroexp{\_repeat {<times>}{<code>}}
+Executes {\it code} {\it times} times.
+\emacroexp
+
+\macroexp{\_prepeat {<times>}<macro>}
+If {\it times} is {\tt N} and {\it macro} \macro\X, executes \inlinecode|\X{1}...\X{N}|.
+\emacroexp
+
+\macroexp{\_varrepeat {<start>}{<stop>}{<step>}<comparison><macro>}
+If {\it macro} is \macro\X, {\it start} is {\tt i}, step is {\tt d}, and stop is {\tt f}: executes \inlinecode|\X{i}\X{i+d}\X{i+2d}...\X{i+Nd}| until the condition (\inlinecode|i+Nd /it comparison /tt f|) is satisfied.
+\emacroexp
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/pdftoolbox-utils-docs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/preamble.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/preamble.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/preamble.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,97 @@
+\catcode`@=11
+\catcode`_=11
+
+\def\bwarning{\bppbox{rgb{1 .6 .6}}{rgb{.4 0 0}}{rgb{.4 0 0}}}
+\def\bnote{\bppbox{rgb{1 1 .6}}{rgb{.4 .4 0}}{rgb{.4 .4 0}}}
+
+\def\LaTeX{L\kern-.36em{\setbox0=\hbox{T}\vbox to\ht0{\hbox{\sevenrm A}\vss}}\kern-.15em\TeX}
+
+\chardef\fslash=`\/
+{\catcode`\^^M=\active%
+\gdef\begincode{%
+ \bgroup\everypar={}%
+ \medskip%
+ \setbox0=\vbox\bgroup%
+ \global\dimen69=0pt%
+ \tt%
+ \catcode`\^^M=\active%
+ \def^^M{\egroup\ifnum\wd1>\dimen69 \global\dimen69=\wd1\fi\copy1\setbox1=\hbox\bgroup}%
+ \catcode`\ =\active%
+ \catcode`\{=12%
+ \catcode`\}=12%
+ \catcode`\/=0%
+ \catcode`\$=12%
+ \catcode`\\=12%
+ \catcode`\#=12%
+ \catcode`\%=12 \setbox1=\hbox\bgroup}}
+\def\endcode{%
+ \egroup\egroup%
+ \hfil\hbox to \dimen69{\box0}\hfil\par%
+ \medskip%
+ %\let\@par=\par%
+ \egroup%
+}
+
+\def\setupverb{%
+ \catcode`\ =\active%
+ \catcode`\{=12%
+ \catcode`\}=12%
+ \catcode`\/=0%
+ \catcode`\$=12%
+ \catcode`\\=12%
+ \catcode`\#=12%
+ \catcode`\%=12%
+ \catcode`\_=12%
+}
+
+\def\inlinecode#1{
+ \bgroup%
+ \setupverb%
+ \catcode`#1=2%
+ \tt%
+}
+
+\def\macro#1{{\tt\string#1}}
+
+{\catcode`\<=\active
+\catcode`\^^M=\active%
+\gdef\_macrousage#1{%
+ \bgroup%
+ \catcode`\ =\active%
+ \catcode`\/=0%
+ \catcode`\{=12%
+ \catcode`\}=12%
+ \catcode`\$=12%
+ \catcode`\\=12%
+ \catcode`\<=\active%
+ \catcode`\^^M=\active%
+ \def<##1>{$\langle${\it ##1}$\rangle$}%
+ \def^^M{\crcr}%
+ \ifx.#1.%
+ \_afterfi{\setbox0=\vbox\bgroup\halign\bgroup\tt\hfil##\crcr}%
+ \else%
+ \_afterfi{\setbox0=\vbox\bgroup\halign\bgroup\tt##\hfil\crcr}%
+ \fi%
+}}
+\def\macrousage{\_macrousage{}}
+\def\emacrousage{\crcr\egroup\egroup\par\smallskip\centerline{\box0}\egroup\par\smallskip}
+\def\emacrousageB{\crcr\egroup\egroup\box0\egroup}
+
+\def\getmacrousage#1{{\_macrousage*\scantokens{#1}\emacrousage}}
+\def\getmacrousageB#1{{\_macrousage*\scantokens{#1}\emacrousageB}}
+
+\def\macroname#1{{\tt\string#1}}
+
+\chardef\lbrace="7B
+\chardef\rbrace="7D
+
+\def\_anchormacro#1#2\_nul{\anchor{\string#1}}
+\def\anchormacro#1{\anchor{\string#1}}
+
+\def\macroexp#1{\par\smallskip\bgroup\ifcsname inmacroexp\endcsname\errmessage{Already in macroexp}\fi\def\inmacroexp{}\leftskip=1cm\leavevmode\_anchormacro#1\_nul\kern-1cm\getmacrousageB{#1}:}
+\def\emacroexp{\par\egroup\smallskip}
+
+\def\gotomacro#1{\gotoanchor{\string#1}{{\tt\string#1}}}
+
+
+\def\displaycode#1{\centerline{\vbox{\def\cr{\crcr\relax}\halign{\hfil\gdef\@@{##}{\setupverb\tt\scantokens\_xp\_xp\_xp{\_xp\_gobble\@@}}: &\_gobble{##}\@@\hfil\crcr\relax#1\crcr}}}}
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/Documentation/preamble.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/pdftoolbox/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdftoolbox/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pdftoolbox/README.md 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,14 @@
+# pdfToolbox v0.1
+## Ari Feiglin -- ari.feiglin at gmail.com
+
+pdfToolbox is a toolbox of various "subpackages" intended for programming and creating beautiful plain-pdfTeX documents.
+It is an amalgamation of the following "subpackages" (in the future there will be an ability to access each one by itself):
+1. pdfData - for storing and manipulating data;
+2. pdfDstruct - for managing the layout and structure of your document;
+3. pdfGraphics - for adding some color and illustrations to your document.
+
+pdfToolbox currently on works with pdfTeX.
+It is not compatible with any form of LaTeX, and currently does not work with XeTeX or LuaTeX (though hopefully LuaTeX support will be added in the future).
+
+pdfToolbox is free to use under the MIT license.
+
Property changes on: trunk/Master/texmf-dist/doc/latex/pdftoolbox/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-arrays.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-arrays.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-arrays.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,256 @@
+\input ptb-utils
+\_checkloaded{arrays}
+\input pdfData/ptb-stack
+
+\def\createarray#1{%
+ \_xp\currdef\csname arr@#1\endcsname{}%
+ \_xp\currdef\csname arr@#1 at len\endcsname{0}%
+}
+
+\def\arrayexists#1{%
+ \ifcsname arr@#1\endcsname%
+ \let\@return at value=\True%
+ \else%
+ \let\@return at value=\False%
+ \fi%
+}
+
+\def\ensurearray#1{%
+ \unless\ifcsname arr@#1\endcsname%
+ \createarray{#1}%
+ \fi%
+}
+
+\def\localizearray#1{%
+ \_xp\localize\csname arr@#1\endcsname%
+ \_xp\localize\csname arr@#1 at len\endcsname%
+}
+
+\long\def\appendarray#1#2{%
+ \def\_uregA{\_xp\currdef\csname arr@#1\endcsname}%
+ \_xp\_xp\_xp\_uregA\_xp\_xp\_xp{\csname arr@#1\endcsname\_arr_index{#2}}%
+ \_xp\curredef\csname arr@#1 at len\endcsname{\the\numexpr\csname arr@#1 at len\endcsname+1\relax}%
+}
+
+\long\def\prependarray#1#2{%
+ \def\_uregA{\_xp\currdef\csname arr@#1\endcsname}%
+ \def\_uregB{\_arr_index{#2}}%
+ \_xp\_xp\_xp\_xp\_xp\_xp\_xp\_uregA\_xp\_xp\_xp\_xp\_xp\_xp\_xp{\_xp\_xp\_xp\_uregB\csname arr@#1\endcsname}%
+ \_xp\curredef\csname arr@#1 at len\endcsname{\the\numexpr\csname arr@#1 at len\endcsname+1\relax}%
+}
+
+\long\def\appendarraymany#1#2{%
+ \map{\appendarray{#1}}{#2}%
+}
+
+\long\def\_appendarrayvalue#1#2#3{\appendarray{#1}{{#3}{#2}}}
+\long\def\appendarraymanyvalued#1#2#3{\map{\_appendarrayvalue{#1}{#2}}{#3}}
+
+\def\arraylen#1{%
+ \csname arr@#1 at len\endcsname%
+}
+
+\def\getarraylen#1#2{%
+ \_xp\let\_xp#2\csname arr@#1 at len\endcsname%
+}
+
+\def\executearray#1{\csname arr@#1\endcsname}
+
+\def\arraymap#1#2{%
+ \def\_mac_arr_cnt{0}%
+ \beginscope%
+ \localize\_arr_index%
+ \long\def\_arr_index##1{%
+ \beginscope%
+ \localize\_mac_arr_cnt%
+ #2{##1}{\_mac_arr_cnt}%
+ \edef\_mac_arr_cnt{\the\numexpr\_mac_arr_cnt+1\relax}%
+ \endscope%
+ }%
+ \csname arr@#1\endcsname%
+ \endscope%
+}
+
+\newcount\_arr_cnt
+\newcount\_arr_cntB
+\def\indexarray#1#2#3{%
+ \let#3=\_nul%
+ \long\def\_arr_index##1{%
+ \ifnum\_arr_cnt=#2 %
+ \def#3{##1}
+ \fi%
+ \advance\_arr_cnt by 1 %
+ }
+ \csname arr@#1\endcsname%
+}
+
+\def\removearray#1#2#3{%
+ \_arr_cnt=0 %
+ \let#3=\_nul%
+ \_xp\let\_xp\_regA\csname arr@#1\endcsname%
+ \createarray{#1}%
+ \def\_arr_index##1{%
+ \ifnum\_arr_cnt=#2 %
+ \def#3{##1}%
+ \else%
+ \appendarray{#1}{##1}%
+ \fi
+ \advance\_arr_cnt by 1 %
+ }%
+ \_regA%
+}
+
+\def\removeitemarray#1#2{%
+ \def\_temp{#2}%
+ \_xp\let\_xp\_regA\csname arr@#1\endcsname%
+ \createarray{#1}%
+ \def\_arr_index##1{%
+ \def\_tempA{##1}%
+ \unless\ifx\_temp\_tempA%
+ \appendarray{#1}{##1}%
+ \fi%
+ }%
+ \_regA%
+}
+
+\long\def\__printarray#1#2#3{%
+ #1{#2}%
+ \unless\ifnum\_arr_cnt=\_temp%
+ ,
+ \fi%
+}
+
+\def\_printarray#1[#2]{%
+ \getarraylen{#1}\_temp%
+ \edef\_temp{\the\numexpr \_temp-1\relax}%
+ \arraymap{#1}{\__printarray{#2}}%
+}
+
+\def\printarray#1{\_ifnextchar[ {\_printarray{#1}}{\_printarray{#1}[\relax]}}
+
+\def\copyarray#1#2{%
+ \def\_temp{\csname arr@#2\endcsname}%
+ \_xp\_xp\_xp\_xp\_xp\_xp\_xp\let\_xp\_temp\csname arr@#1\endcsname%
+ \def\_temp{\csname arr@#2 at len\endcsname}%
+ \_xp\_xp\_xp\_xp\_xp\_xp\_xp\let\_xp\_temp\csname arr@#1 at len\endcsname%
+}
+
+\def\_concatenatearray#1#2#3#4#5{%
+ \_xp\currdef\csname arr@#5\endcsname{#1#2}%
+ \_xp\curredef\csname arr@#5 at len\endcsname{\the\numexpr\csname arr@#3 at len\endcsname + \csname arr@#4 at len\endcsname\relax}%
+}
+
+\def\concatenatearrays#1#2#3{%
+ \def\_temp{\csname arr@#1\endcsname}%
+ \_xp\_xp\_xp\_concatenatearray\_xp\_xp\_xp{\_xp\_temp\_xp}\_xp{\csname arr@#2\endcsname}{#1}{#2}{#3}%
+}
+
+\def\createmarray#1{\_xp\currdef\csname marr@#1 at len\endcsname{0}}
+
+\def\localizemarray#1{%
+ \_xp\localize\csname marr@#1 at len\endcsname%
+ \_arr_cnt=0 %
+ \loop\ifnum\_arr_cnt < \csname marr@#1 at len\endcsname %
+ \_xp\localize\csname marr@#1 at idx@\the\_arr_cnt\endcsname%
+ \advance\_arr_cnt by 1 %
+ \repeat%
+}
+
+\def\appendmarray#1#2{%
+ \_xp\currdef\csname marr@#1 at idx@\csname marr@#1 at len\endcsname\endcsname{#2}%
+ \_xp\curredef\csname marr@#1 at len\endcsname{\the\numexpr\csname marr@#1 at len\endcsname + 1\relax}%
+}
+
+\def\_rappendmarray#1#2{\appendmarray{#2}{#1}}
+\def\_rappendarray#1#2{\appendarray{#2}{#1}}
+
+\def\printmarray#1{%
+ \_arr_cnt=0 %
+ \loop\ifnum\_arr_cnt < \csname marr@#1 at len\endcsname %
+ (\csname marr@#1 at idx@\the\_arr_cnt\endcsname)%
+ \advance\_arr_cnt by 1 %
+ \ifnum\_arr_cnt < \csname marr@#1 at len\endcsname %
+ , %
+ \fi%
+ \repeat%
+}
+
+\def\convertarray#1#2{%
+ \createmarray{#2}%
+ \_xp\curredef\csname marr@#2 at len\endcsname{\csname arr@#1 at len\endcsname}%
+ \_arr_cnt=0 %
+ \def\_arr_index##1{%
+ \_xp\currdef\csname marr@#2 at idx@\the\_arr_cnt\endcsname{##1}%
+ \advance\_arr_cnt by 1 %
+ }%
+ \csname arr@#1\endcsname%
+}
+
+\def\convertmarray#1#2{%
+ \createarray{#2}%
+ %\_xp\edef\csname arr@#2 at len\endcsname{\csname marr@#1 at len\endcsname}%
+ \_arr_cnt=0 %
+ \loop\ifnum\_arr_cnt < \csname marr@#1 at len\endcsname %
+ \_xp\_rappendarray\_xp{\csname marr@#1 at idx@\the\_arr_cnt\endcsname}{#2}%
+ \advance\_arr_cnt by 1 %
+ \repeat%
+}
+
+\def\copymarray#1#2{%
+ \createmarray{#2}%
+ \_arr_cnt=0 %
+ \loop\ifnum\_arr_cnt < \csname marr@#1 at len\endcsname %
+ \_xp\_xp\_xp\_rappendmarray\_xp\_xp\_xp{\csname marr@#1 at idx@\the\_arr_cnt\endcsname}{#2}%
+ \advance\_arr_cnt by 1 %
+ \repeat%
+}
+
+% #1: name of array
+% #2: text to initialize array to
+% #3: macro for creating array
+% #4: macro for appending to array
+\def\_init_array#1#2#3#4{%
+ #3{#1}%
+ \commap{#4{#1}}{#2}%
+}
+
+\def\initarray#1#2{%
+ \_init_array{#1}{#2}\createarray\appendarray%
+}
+
+\def\initmarray#1#2{%
+ \_init_array{#1}{#2}\createmarray\appendmarray%
+}
+
+\def\findarray#1#2{%
+ \def\_regA{#2}%
+ \let\@return at value=\False%
+ \def\_arr_index##1{%
+ \def\_regB{##1}%
+ \ifx\_regA\_regB%
+ \let\@return at value=\True%
+ \fi%
+ }%
+ \csname arr@#1\endcsname%
+}
+
+\def\uniqueappendarray#1#2{%
+ \findarray{#1}{#2}%
+ \ifx\@return at value\False%
+ \appendarray{#1}{#2}%
+ \fi%
+}
+
+\def\findmarray#1#2#3{%
+ \def\_regA{#2}
+ \let\@return at value=\False%
+ \_arr_cnt=0 %
+ \loop\ifnum\_arr_cnt < \csname arr@#1 at len\endcsname %
+ \ifx\_regA\csname arr@#1 at idx@\the\_arr_cnt\endcsname%
+ \let\@return at value=\True%
+ \_xp\let\_xp#3\csname arr@#1 at idx@\the\_arr_cnt\endcsname%
+ \fi%
+ \advance\_arr_cnt by 1 %
+ \repeat%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-arrays.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-counters.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-counters.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-counters.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,58 @@
+\input ptb-utils
+
+\_checkloaded{counters}
+
+\input ptb-arrays
+
+% Makes counter #1 dependent on #2
+\def\adddependentcounter#1#2{%
+ \def\_regA{#1}\def\_regB{#2}%
+ \ifx\_regA\_regB%
+ \errhelp={Making a counter dependent on itself will result in an infinite loop whenever it is altered}%
+ \errmessage{A counter cannot be dependent on itself}%
+ \fi%
+ \appendarray{count@#2 at dependents}{#1}%
+}
+
+\def\_createcounter#1[#2]{%
+ \commap{\adddependentcounter{#1}}{#2}%
+}
+
+\def\createcounter#1{%
+ \_xp\newcount\csname count@#1\endcsname%
+ \currset\csname count@#1\endcsname=0\relax%
+ \createarray{count@#1 at dependents}%
+ \_ifnextchar[ {\_createcounter{#1}}{}%
+}
+
+\def\_zerocounter#1#2{%
+ \currset\csname count@#1\endcsname=\z@%
+ \zerodependents{#1}%
+}
+
+\def\zerodependents#1{%
+ \arraymap{count@#1 at dependents}\_zerocounter%
+}
+
+\def\setcounter#1#2{%
+ \currset\csname count@#1\endcsname=#2\relax%
+ \zerodependents{#1}%
+}
+
+\def\advancecounter#1#2{%
+ \currset\advance\csname count@#1\endcsname by #2\relax%
+ \zerodependents{#1}%
+}
+
+\def\advanceicounter#1#2{%
+ \currset\advance\count\csname count@#1\endcsname by #2\relax%
+}
+
+\def\seticounter#1#2{%
+ \currset\count\csname count@#1\endcsname=#2\relax%
+}
+
+\def\counter#1{%
+ \csname count@#1\endcsname%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-counters.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-dictionaries.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-dictionaries.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-dictionaries.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,26 @@
+\input ptb-utils
+
+\_checkloaded{dictionaries}
+
+\input pdfData/ptb-arrays
+
+\def\createdict#1{%
+ \createarray{dict@#1 at keys}%
+}
+
+\def\adddict#1#2#3{%
+ \_xp\def\csname dict@#1 at key@#2\endcsname{#3}%
+ \findarray{dict@#1 at keys}{#2}{\_regC}%
+ \ifx\@return at value\False%
+ \appendarray{dict@#1 at keys}{#2}%
+ \fi%
+}
+
+\def\indexdict#1#2{%
+ \csname dict@#1 at key@#2\endcsname%
+}
+
+\def\keyindict#1#2{%
+ \findarray{dict@#1 at keys}{#2}{\_regC}%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-dictionaries.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-key-value.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-key-value.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-key-value.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,170 @@
+\input ptb-utils
+
+\_checkloaded{key-value}
+
+\def\novalue{\novalue}
+
+\def\_update_lastkeys#1#2#3{%
+ \_xp\_xp\_xp\def\_xp\_xp\_xp#1\_xp\_xp\_xp{\_xp#1\_xp{\_xp{\_id#2}{#3}}}%
+}
+
+% #1: lastkeys, #2: key name, #3: key value
+\def\_vanilla_mapkey#1#2#3{%
+ \_xp\def\csname key@\_id#2\endcsname{#3}%
+ \_update_lastkeys{#1}{#2}{#3}%
+}
+
+\def\__mapkeys#1#2#3=#4=#5,{%
+ \def\_temp{#3}%
+ \ifx\_nul\_temp%
+ \else%
+ \_xp#1\_xp{\_xp#2\_xp}\_xp{\_id#3}{#4}%
+ \_afterfi{\_mapkeys{#1}{#2}}%
+ \fi%
+}
+
+\def\_mapkeys#1#2#3,{%
+ \__mapkeys{#1}{#2}#3==,%
+}
+
+% #1: setter, #2: lastkeys, #3: map
+\def\_mapkeys_with_setter#1#2#3{%
+ \def#2{}%
+ \def\_temp{#3}%
+ \ifx\_temp\empty%
+ \else%
+ \_afterfi{\_mapkeys{#1}{#2}#3,\_nul=,}%
+ \fi%
+}
+
+\def\getvalue#1{%
+ \csname key@#1\endcsname%
+}
+
+\def\__keyexists#1#2#3#4{%
+ \bgroup%
+ \def\_regA{#1}\def\_regB{#3}%
+ \ifx\_regA\_regB%
+ \egroup\def#2{#4}%
+ \else%
+ \egroup%
+ \fi%
+}
+
+\def\_keyexists#1#2#3{%
+ \ifx\_nul#3%
+ \else%
+ \__keyexists{#1}{#2}#3%
+ \_afterfi{\_keyexists{#1}{#2}}%
+ \fi%
+}
+
+\def\keyexists#1#2#3{%
+ \let#2=\_nul%
+ \def\_temp{\_keyexists{#1}{#2}}%
+ \_xp\_temp#3\_nul%
+}
+
+\def\ifkeyexists#1{%
+ \unless\ifx\_nul#1%
+}
+
+\def\_letnamedmacro#1#2{%
+ \_xp\let\csname #1\endcsname=#2%
+}
+
+\def\___setdefault#1#2{%
+ \def\_temp{#2}%
+ \unless\ifx\_temp\empty%
+ \_mapkeys_with_setter\_vanilla_mapkey\_settings{#2}%
+ \keyexists{default}\_keydefault\_settings%
+ \unless\ifx\_nul\_keydefault%
+ \def\_temp{\_xp\def\csname key@#1\endcsname}%
+ \_xp\_temp\_xp{\_keydefault}%
+ \keyexists{name}\_keyname\_settings%
+ \unless\ifx\_nul\_keyname%
+ \_xp\_xp\_xp\_letnamedmacro\_xp\_xp\_xp{\_xp\_keyname\_xp}\_xp{\csname key@#1\endcsname}%
+ %\_xp\_xp\_xp\let\_xp\_keyname\csname key@#1\endcsname%
+ \fi%
+ \else%
+ \keyexists{required}\_keyrequired\_settings%
+ \unless\ifx\_nul\_keyrequired%
+ \_xp\def\_xp\_requiredkeys\_xp{\_requiredkeys{#1}}%
+ \_xp\let\csname required@#1\endcsname=\_nul%
+ \fi%
+ \fi%
+ \fi%
+}
+
+\def\__setdefault#1{%
+ \ifx\_nul#1%
+ \else%
+ \___setdefault#1%
+ \_xp\__setdefault%
+ \fi%
+}
+
+\def\_setdefaults#1{%
+ \def\_requiredkeys{}%
+ \__setdefault#1\_nul%
+}
+
+\def\_vardef_mapkey#1#2#3{%
+ \def\_tempdef{\_xp\_vardef\csname key@\_id#2\endcsname}%
+ \_xp\_tempdef\_xp{\_varmap{#3}}%
+ \_update_lastkeys{#1}{#2}{#3}%
+}
+
+\def\_protected_mapkey#1#2#3{%
+ \keyexists{#2}\_keysettings\_keymappings%
+ \unless\ifx\_nul\_keysettings%
+ \let\_varmap=\_id%
+ \def\_vardef{\def}%
+ \let\_keyname=\_nul%
+ \unless\ifx\_keysettings\empty%
+ \_xp\_mapkeys_with_setter\_xp\_vanilla_mapkey\_xp\_settings\_xp{\_keysettings}%
+ \keyexists{mapping}\_varmap\_settings%
+ \ifx\_nul\_varmap%
+ \let\_varmap=\_id%
+ \fi%
+ \keyexists{definition}\_vardef\_settings%
+ \ifx\_nul\_vardef%
+ \def\_vardef{\def}%
+ \fi%
+ \keyexists{name}\_keyname\_settings%
+ \fi%
+ \_vardef_mapkey{#1}{#2}{#3}%
+ \_xp\let\csname required@#2\endcsname=\undefined%
+ \unless\ifx\_nul\_keyname%
+ %\_xp\_xp\_xp\let\_xp\_keyname\_xp=\csname key@#2\endcsname%
+ \_xp\_xp\_xp\_letnamedmacro\_xp\_xp\_xp{\_xp\_keyname\_xp}\_xp{\csname key@#2\endcsname}%
+ \fi%
+ \else%
+ \errhelp={Key `#2' supplied, but not present in key list}%
+ \errmessage{Invalid key supplied}%
+ \fi%
+}
+
+\def\_check_required#1{%
+ \def\_temp{#1}%
+ \unless\ifx\_nul\_temp%
+ \ifcsname required@#1\endcsname%
+ \errhelp={Key `#1' was required by the key list, but not supplied}%
+ \errmessage{Required key not defined}%
+ \fi%
+ \_xp\_check_required%
+ \fi%
+}
+
+
+\def\_check_required_supplied{%
+ \_xp\_check_required\_requiredkeys\_nul%
+}
+
+\def\mapkeys#1#2{%
+ \_mapkeys_with_setter\_vanilla_mapkey\_keymappings{#1}%
+ \_xp\_setdefaults\_xp{\_keymappings}%
+ \_mapkeys_with_setter\_protected_mapkey\lastkeys{#2}%
+ \_check_required_supplied%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-key-value.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-math.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-math.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-math.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,44 @@
+\input ptb-utils
+
+\_checkloaded{math}
+
+\newcount\_mathcountA \newcount\_mathcountB
+
+\def\newnumber#1{%
+ \_xp\def\csname num@#1\endcsname{{0}}%
+ \_xp\def\csname num@#1 at exp\endcsname{0}%
+}
+
+\def\__setnumber#1#2#3#4#5{%
+ \let\_next=\_gobbletilnul%
+ \ifx\relax#2%
+ \else\ifx\relax#3%
+ \_xp\edef\csname num@#1\endcsname{\csname num@#1\endcsname{#2}}%
+ \else\ifx\relax#4%
+ \_xp\edef\csname num@#1\endcsname{\csname num@#1\endcsname{#3#2}}%
+ \else\ifx\relax#5%
+ \_xp\edef\csname num@#1\endcsname{\csname num@#1\endcsname{#4#3#2}}%
+ \else
+ \_xp\edef\csname num@#1\endcsname{\csname num@#1\endcsname{#5#4#3#2}}%
+ \def\_next{\__setnumber{#1}}%
+ \fi\fi\fi\fi%
+ \_next%
+}
+
+\def\_setnumber#1#2.#3.#4\_nul{%
+ \reverse\_regA{#2#3}%
+ \def\_regB{\__setnumber{#1}}%
+ \_xp\_regB\_regA\relax\relax\relax\relax\_nul%
+}
+
+\def\setnumber#1#2{%
+ \_xp\def\csname num@#1\endcsname{}%
+ \_setnumber{#1}#2..\_nul%
+}
+
+\newnumber{test}
+\setnumber{test}{1234567890.69420}
+
+\say{\meaning\num at test}
+
+\bye
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-math.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-mergesort.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-mergesort.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-mergesort.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,137 @@
+\input ptb-utils
+
+\_checkloaded{mergesort}
+
+\input pdfData/ptb-arrays
+
+\def\splitmarray#1#2#3{%
+ \edef\_arr_half_len{\the\numexpr\csname marr@#1 at len\endcsname / 2}%
+ \_arr_cnt=0 %
+ \createmarray{#2}%
+ \createmarray{#3}%
+ \loop\ifnum\_arr_cnt < \csname marr@#1 at len\endcsname %
+ \ifnum\_arr_cnt < \_arr_half_len%
+ \_xp\_xp\_xp\_rappendmarray\_xp\_xp\_xp{\csname marr@#1 at idx@\the\_arr_cnt\endcsname}{#2}%
+ \else%
+ \_xp\_xp\_xp\_rappendmarray\_xp\_xp\_xp{\csname marr@#1 at idx@\the\_arr_cnt\endcsname}{#3}%
+ \fi%
+ \advance\_arr_cnt by 1 %
+ \repeat%
+}
+
+
+\def\findmin#1#2#3{%
+ \let\_regA=\_nul%
+ \let#3=\_nul%
+ \_arr_cnt=0 %
+ \def\_arr_index##1{%
+ \ifx\_regA\_nul%
+ \def\_regA{##1}%
+ \def#3{0}%
+ \else%
+ \_xp#2\_xp{\_regA}{##1}%
+ \unless\ifnum\_return_val=-1 %
+ \def\_regA{##1}%
+ \_xp\def\_xp#3\_xp{\the\_arr_cnt}%
+ \fi%
+ \fi%
+ \advance\_arr_cnt by 1 %
+ }%
+ \csname arr@#1\endcsname%
+}
+
+\def\_sortarr#1#2#3{%
+ \findmin{#1}{#3}\_regB%
+ \unless\ifx\_regB\_nul%
+ \removearray{#1}\_regB\_regC%
+ \_xp\_rappendarray\_xp{\_regC}{#2}%
+ \_afterfi{\_sortarr{#1}{#2}{#3}}%
+ \fi%
+}
+
+\def\sortarr#1#2#3{%
+ \copyarray{#1}{_orig}%
+ \createarray{#2}%
+ \_sortarr{_orig}{#2}{#3}%
+}
+
+\def\merge#1#2#3#4{%
+ \createmarray{#1}%
+ \edef\_min_len{\min{\csname marr@#2 at len\endcsname}{\csname marr@#3 at len\endcsname}}%
+ \_arr_cnt=0 %
+ \_arr_cntB=0 %
+ \def\_temp{\appendmarray{#1}}
+%
+ \loop%
+ \let\_tempA=\_nul%
+ \ifnum\_arr_cnt < \csname marr@#2 at len\endcsname
+ \ifnum\_arr_cntB < \csname marr@#3 at len\endcsname
+ \_xp\let\_xp\_first\csname marr@#2 at idx@\the\_arr_cnt\endcsname%
+ \_xp\let\_xp\_second\csname marr@#3 at idx@\the\_arr_cntB\endcsname%
+ #4\_first\_second%
+ \ifnum\_return_val=-1 %
+ \_xp\_temp\_xp{\_first}%
+ \advance\_arr_cnt by 1 %
+ \else%
+ \_xp\_temp\_xp{\_second}%
+ \advance\_arr_cntB by 1 %
+ \fi%
+ \let\_tempA=\empty%
+ \fi\fi
+ \ifx\_tempA\empty%
+ \repeat%
+%
+ \loop%
+ \ifnum\_arr_cnt < \csname marr@#2 at len\endcsname %
+ \_xp\let\_xp\_first\csname marr@#2 at idx@\the\_arr_cnt\endcsname%
+ \_xp\_temp\_xp{\_first}%
+ \advance\_arr_cnt by 1 %
+ \repeat%
+ \loop%
+ \ifnum\_arr_cntB < \csname marr@#3 at len\endcsname %
+ \_xp\let\_xp\_first\csname marr@#3 at idx@\the\_arr_cntB\endcsname%
+ \_xp\_temp\_xp{\_first}%
+ \advance\_arr_cntB by 1 %
+ \repeat%
+}
+
+\def\_mergesort#1#2{%
+ \ifnum\csname marr@#1 at len\endcsname>1 %
+ \_afterfi{%
+ \beginscope%
+ \def\_regA{#1}%
+ \def\_regB{_m1}%
+ \def\_regC{_m2}%
+ \unless\ifx\_regA\_regB%
+ \localizemarray{_m1}%
+ \fi
+ \unless\ifx\_regA\_regC%
+ \localizemarray{_m2}%
+ \fi
+ \copymarray{#1}{_m}%
+ \splitmarray{_m}{_m1}{_m2}%
+ \_mergesort{_m1}{#2}%
+ \_mergesort{_m2}{#2}%
+ \merge{_m}{_m1}{_m2}{#2}%
+ \copymarray{_m}{#1}%
+ \endscope%
+ }%
+ \fi%
+}
+
+\def\mergesort#1#2{%
+ \convertarray{#1}{_orig}%
+ \createmarray{_m1}%
+ \createmarray{_m2}%
+ \_mergesort{_orig}{#2}%
+ \convertmarray{_orig}{#1}%
+}
+
+\def\_cmp_num#1#2{%
+ \edef\_return_val{\ifnum#1=#2 0\else\ifnum #1<#2 -1\else 1\fi\fi}
+}
+
+\def\_cmp_str#1#2{%
+ \edef\_return_val{\pdfstrcmp{#1}{#2}}
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-mergesort.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-stack.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-stack.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-stack.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,104 @@
+\input ptb-utils
+\_checkloaded{stacks}
+
+% Creates a macro stack, a stack which stores the definition of macros.
+% #1: The name of the stack.
+\def\createmacrostack#1{\_xp\def\csname mstack@#1 at sp\endcsname{0}}
+
+% Gets the current pointer on a macro stack.
+% #1: The name of the stack.
+\def\macrostackpointer#1{\csname mstack@#1 at sp\endcsname}
+
+% Pushes a macro onto a macro stack.
+% #1: The name of the stack.
+% #2: The control sequence to push onto the stack.
+\def\macrostackpush#1#2{%
+ \_xp\edef\csname mstack@#1 at sp\endcsname{\the\numexpr \csname mstack@#1 at sp\endcsname + 1\relax}%
+ \_xp\let\csname mstack@#1 at def@\csname mstack@#1 at sp\endcsname\endcsname=#2%
+ \_xp\edef\csname mstack@#1 at name@\csname mstack@#1 at sp\endcsname\endcsname{\_mstrip#2}%
+}
+
+% Gets a macro on a stack.
+% #1: The name of the stack
+% #2: The index on the stack
+\def\macrostackget#1#2{%
+ \csname mstack@#1 at def@#2\endcsname%
+}
+
+% Decrements the stack pointer of a macrostack without restoring the definition of the control sequence.
+% #1: The name of the stack.
+\def\macrostackdecrement#1{%
+ \_xp\let\csname mstack@#1 at name@\csname mstack@#1 at sp\endcsname\endcsname=\undefined%
+ \_xp\let\csname mstack@#1 at def@\csname mstack@#1 at sp\endcsname\endcsname=\undefined%
+ \_xp\edef\csname mstack@#1 at sp\endcsname{\the\numexpr \csname mstack@#1 at sp\endcsname - 1\relax}%
+}
+
+% Sets the control sequence from the top of the stack, without popping it.
+% #1: The name of the stack
+\def\macrostackset#1{%
+ \_xplet{\csname\csname mstack@#1 at name@\csname mstack@#1 at sp\endcsname\endcsname\endcsname}{\csname mstack@#1 at def@\csname mstack@#1 at sp\endcsname\endcsname}%
+}
+
+% Pops a control sequence off of the top of the stack.
+% This restores the definition of the control sequence.
+% #1: The name of the stack.
+\def\macrostackpop#1{%
+ \macrostackset{#1}%
+ \macrostackdecrement{#1}%
+}
+
+% Peeks at the top of a macro stack.
+% #1: The name of the stack.
+% #2: A control sequence to put the definition of the control sequence at the top of the stack into.
+% #3: A control sequence to put the name of the control sequence at the top of the stack into.
+\def\macrostackpeek#1#2#3{%
+ \_xp\let#2\csname mstack@#1 at def@\csname mstack@#1 at sp\endcsname\endcsname%
+ \_xp\let#3\csname mstack@#1 at name@\csname mstack@#1 at sp\endcsname\endcsname%
+}
+
+\def\createstack#1{\_xp\def\csname stack@#1 at sp\endcsname{0}}
+
+\def\stackpush#1#2{%
+ \_xp\edef\csname stack@#1 at sp\endcsname{\the\numexpr \csname stack@#1 at sp\endcsname + 1\relax}%
+ \_xp\def\csname stack@#1@\csname stack@#1 at sp\endcsname\endcsname{#2}%
+}
+
+\def\stackdecrement#1{%
+ \_xp\let\csname stack@#1@\csname stack@#1 at sp\endcsname\endcsname=\undefined%
+ \_xp\edef\csname stack@#1 at sp\endcsname{\the\numexpr \csname stack@#1 at sp\endcsname - 1\relax}%
+}
+
+\def\stackpop#1#2{%
+ \stacktop{#1}{#2}%
+ \stackdecrement{#1}%
+}
+
+\def\stacktop#1#2{%
+ \_xp\let\_xp#2\csname stack@#1@\csname stack@#1 at sp\endcsname\endcsname%
+}
+
+\def\_rstackpush#1#2{\stackpush{#2}{#1}}
+\def\_rstackpop#1#2{\stackpop{#2}{#1}}
+
+\createmacrostack{macro_stack}
+\createstack{macro_stack_ptr}
+
+\def\macro_stack_ptr{0}
+\def\beginscope{%
+ \_xp\_rstackpush\_xp{\macro_stack_ptr}{macro_stack_ptr}%
+}
+
+\def\endscope{%
+ \stackpop{macro_stack_ptr}\_uregB%
+ \loop\ifnum\macro_stack_ptr>\_uregB%
+ \macrostackpop{macro_stack}%
+ \edef\macro_stack_ptr{\the\numexpr \macro_stack_ptr - 1\relax}%
+ \repeat%
+}
+
+\def\localize#1{%
+ \macrostackpush{macro_stack}{#1}%
+ \edef\macro_stack_ptr{\the\numexpr \macro_stack_ptr + 1\relax}%
+}
+
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfData/ptb-stack.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-fonts.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-fonts.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,306 @@
+\input ptb-utils
+\input ptb-pdfData
+
+\createarray{available fonts}
+
+\def\___setfontsizes#1#2#3{%
+ \def\_temp{#2}%
+ \def\_tempA{default}%
+ \font\@@=#3\relax%
+ \ifx\_temp\_tempA%
+ \_xp\edef\csname #1 default\endcsname{#3}%
+ \else%
+ \_xp\edef\csname #1 at #2\endcsname{#3}%
+ \fi%
+}
+
+\def\__setfontsizes#1#2{%
+ \ifx\_nul#2%
+ \else%
+ \___setfontsizes{#1}#2%
+ \_afterfi{\__setfontsizes{#1}}%
+ \fi%
+}
+
+\def\_setfontsizes#1#2{%
+ \def\_temp{\__setfontsizes{#1}}%
+ \_xp\_temp#2\_nul%
+}
+
+\def\addfont#1#2{%
+ \_mapkeys_with_setter\_vanilla_mapkey\lastkeys{#2}%
+ \keyexists{default}\_defaultcode\lastkeys%
+ \ifx\_defaultcode\_nul%
+ {\newlinechar=`^^J
+ \errhelp={Default codes are used for when a specific font size is not specified but requested, in which case the default code is scaled up to the requested font size.^^J%
+ For example, if the font name is `rm', the default code may be `cmr10'.^^J%
+ If a font size of 20 is requested, but not specified, then the font `cmr10 at 20pt' will be utilized.}%
+ \errmessage{Default code was not specified}%
+ }%
+ \fi%
+ \_setfontsizes{#1}\lastkeys%
+ \appendarray{available fonts}{#1}%
+}
+
+\def\applyfontcode{\afterassignment\@@ \font\@@}
+
+\def\getfontcode#1#2{%
+ \ifcsname #1 at #2\endcsname%
+ \csname #1 at #2\endcsname%
+ \else%
+ \csname #1 default\endcsname\_space at #2
+ \fi%
+}
+
+\def\textfontcalc#1{\def\fontsize{#1}}
+\def\scriptfontcalc#1{\edef\fontsize{\the\dimexpr #1 * 7 / 10\relax}}
+\def\scriptscriptfontcalc#1{\edef\fontsize{\the\dimexpr #1 / 2\relax}}
+
+% #1: Family
+% #2: Font
+\def\_setfontfamily#1#2{%
+ \textfontcalc{\currscale}%
+ \expanded{\noexpand\font\noexpand\@@=\getfontcode{#2}{\fontsize}}%
+ \textfont#1=\@@%
+ \scriptfontcalc{\currscale}%
+ \expanded{\noexpand\font\noexpand\@@=\getfontcode{#2}{\fontsize}}%
+ \scriptfont#1=\@@%
+ \scriptscriptfontcalc{\currscale}%
+ \expanded{\noexpand\font\noexpand\@@=\getfontcode{#2}{\fontsize}}%
+ \scriptscriptfont#1=\@@%
+}
+
+\def\_rsetfontfamily#1#2#3{\_setfontfamily{#2}{#1}}
+
+\createarray{math at fonts}
+
+\def\setfontfamily#1#2{%
+ \ifcsname family@#1 at font\endcsname%
+ \removeitemarray{font@\csname family@#1 at font\endcsname @family}{#1}%
+ \fi%
+ \_setfontfamily{#1}{#2}%
+ \_xp\def\csname family@#1 at font\endcsname{#2}%
+ \ensurearray{font@#2 at family}%
+ \appendarray{font@#2 at family}{#1}%
+ \appendarray{math at fonts}{#2}%
+}
+
+\def\_updatefontfamily#1#2{%
+ \arraymap{font@#1 at family}{\_rsetfontfamily{#1}}%
+}
+
+\def\updatefontfamilies{%
+ \arraymap{math at fonts}\_updatefontfamily%
+}
+
+\def\_setfont_and_scale#1#2{%
+ \applyfontcode\getfontcode{#1}{#2}\relax%
+}
+
+\protected\def\setfont#1{%
+ \edef\currfont{#1}%
+ \_setfont_and_scale\currfont\currscale%
+}
+
+\protected\def\setscale#1{%
+ \edef\currscale{\the\dimexpr#1\relax}%
+ \_setfont_and_scale\currfont\currscale%
+ \updatefontfamilies%
+}
+
+\protected\def\setfontandscale#1#2{%
+ \edef\currfont{#1}%
+ \edef\currscale{\the\dimexpr#2\relax}%
+ \_setfont_and_scale\currfont\currscale%
+ \updatefontfamilies%
+}
+
+\addfont{rm}{%
+ default=cmr10,
+ 5pt=cmr5,
+ 6pt=cmr6,
+ 7pt=cmr7,
+ 8pt=cmr8,
+ 9pt=cmr9,
+ 10pt=cmr10,
+ 12pt=cmr12,
+ 17pt=cmr17
+}
+
+\addfont{it}{%
+ default=cmti10,
+ 7pt=cmti7,
+ 8pt=cmti8,
+ 9pt=cmti9,
+ 10pt=cmti10,
+ 12pt=cmti12
+}
+
+\addfont{bf}{%
+ default=cmbx10,
+ 5pt=cmbx5,
+ 6pt=cmbx6,
+ 7pt=cmbx7,
+ 8pt=cmbx8,
+ 9pt=cmbx9,
+ 10pt=cmbx10,
+ 12pt=cmbx12
+}
+
+\addfont{sc}{%
+ default=cmcsc10,
+ 8pt=cmcsc8,
+ 9pt=cmcsc9,
+ 10pt=cmcsc10
+}
+
+\addfont{mi}{%
+ default=cmmi10,
+ 5pt=cmmi5,
+ 6pt=cmmi6,
+ 7pt=cmmi7,
+ 8pt=cmmi8,
+ 9pt=cmmi9,
+ 10pt=cmmi10,
+ 12pt=cmmi12
+}
+
+\addfont{sy}{%
+ default=cmsy10,
+ 5pt=cmsy5,
+ 6pt=cmsy6,
+ 7pt=cmsy7,
+ 8pt=cmsy8,
+ 9pt=cmsy9,
+ 10pt=cmsy10
+}
+
+\addfont{ex}{%
+ default=cmex10,
+ 7pt=cmex7,
+ 8pt=cmex8,
+ 9pt=cmex9,
+ 10pt=cmex10
+}
+
+\addfont{sl}{%
+ default=cmsl10,
+ 8pt=cmsl8,
+ 9pt=cmsl9,
+ 10pt=cmsl10,
+ 12pt=cmsl12
+}
+
+\addfont{ss}{%
+ default=cmss10,
+ 8pt=cmss8,
+ 9pt=cmss9,
+ 10pt=cmss10,
+ 12pt=cmss12
+}
+
+\addfont{tt}{%
+ default=cmtt10,
+ 8pt=cmtt8,
+ 9pt=cmtt9,
+ 10pt=cmtt10,
+ 12pt=cmtt12
+}
+
+\addfont{sl}{%
+ default=cmsl10,
+ 8pt=cmsl8,
+ 9pt=cmsl9,
+ 10pt=cmsl10,
+ 12pt=cmsl12
+}
+
+\addfont{msam}{%
+ default=msam10,
+ 8pt=msam8,
+ 9pt=msam9,
+ 10pt=msam10
+}
+
+\addfont{msbm}{%
+ default=msbm10,
+ 8pt=msbm8,
+ 9pt=msbm9,
+ 10pt=msbm10
+}
+
+\addfont{eufm}{%
+ default=eufm10,
+ 8pt=eufm8,
+ 9pt=eufm9,
+ 10pt=eufm10
+}
+
+\addfont{rsfs}{
+ default=rsfs10,
+ 10pt=rsfs10
+}
+
+\setfontandscale{rm}{10pt}
+\setfontfamily{0}{rm}
+\setfontfamily{1}{mi}
+\setfontfamily{2}{sy}
+\setfontfamily{3}{ex}
+\setfontfamily{4}{msam}
+\setfontfamily{5}{msbm}
+\setfontfamily{6}{bf}
+\setfontfamily{7}{tt}
+\setfontfamily{8}{it}
+\setfontfamily{9}{ss}
+\setfontfamily{10}{sl}
+\setfontfamily{11}{eufm}
+\setfontfamily{12}{rsfs}
+\def\bf{\setfont{bf}\fam=6\relax}
+\def\it{\setfont{it}\fam=8\relax}
+\def\bb{\fam=5\relax}
+\def\sf{\setfont{ss}\fam=9\relax}
+\def\sl{\setfont{sl}\fam=10\relax}
+\def\frak{\setfont{eufm}\fam=11\relax}
+\def\scr{\setfont{rsfs}\fam=12\relax}
+
+\def\__{\__}
+
+\def\__mathftable#1#2#3{%
+ \mathchardef#2=\the\numexpr"#3#100 + \the\_ptbcountA\relax%
+ \advance\_ptbcountA by 1\relax%
+ \_mathftable{#1}%
+}
+
+\def\_mathftable#1#2{%
+ \ifx\_nul#2%
+ \else%
+ \_afterfi{%
+ \ifx\__#2%
+ \advance\_ptbcountA by 1\relax%
+ \_afterfi{\_mathftable{#1}}%
+ \else%
+ \_afterfi{\__mathftable{#1}{#2}}%
+ \fi%
+ }%
+ \fi%
+}
+
+\def\_mathfonttable#1[#2]#3{%
+ \_ptbcountA=#2\relax%
+ \_mathftable{#1}#3\_nul%
+}
+
+\def\mathfonttable#1{%
+ \_ifnextchar[ {\_mathfonttable{#1}}{\_mathfonttable{#1}[0]}%
+}
+
+\mathfonttable{4}[0]{%
+ \boxdot2\boxplus2\boxtimes2\square0\blacksquare0\__\diamond0\blackdiamond0\rotateclockwise0%
+ \rotatecounterclockwise0\rightleftharpoons3\leftrightharpoons3\boxminus2\Vdash3\Vvdash3\vDash3%
+ \twoheadrightarrow3\twoheadleftarrow3\leftleftarrows3\rightrightarrows3\upuparrows3%
+ \downdownarrows3\uprightharpoon3\downrightharpoon3\upleftharppon3\downleftharpoon3%
+ \rightarrowtail3\leftarrowtail3\leftrightarrows3\rightleftarrows3\Lsh3\Rsh3\rightsquigarrow3%
+ \leftrightsquigarrow3\looparrowleft3\looparrowright3\circeq3\succsim3\gtrsim3\gtrapprox3%
+ \multimap3\therefore2\because2\Doteq3\triangleq3\precsim3\lesssim3\lessapprox3%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-fonts.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hooks.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hooks.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hooks.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,40 @@
+\input ptb-utils
+
+\_checkloaded{hooks}
+
+\input pdfData/ptb-arrays
+
+\def\createhook#1{%
+ \_xp\def\csname hook@#1\endcsname{}
+}
+
+\def\appendtohook#1#2{%
+ \def\_temp{\_xp\def\csname hook@#1\endcsname}%
+ \_xp\_xp\_xp\_temp\_xp\_xp\_xp{\csname hook@#1\endcsname#2}
+}
+
+\def\prependtohook#1#2{%
+ \def\_temp{\_xp\def\csname hook@#1\endcsname}%
+ \def\_tempA{#2}%
+ \_xp\_xp\_xp\_xp\_xp\_xp\_xp\_temp\_xp\_xp\_xp\_xp\_xp\_xp\_xp{\_xp\_xp\_xp\_tempA\_xp\_xp\_xp\csname hook@#1\endcsname}%
+}
+
+\def\callhook#1{%
+ \csname hook@#1\endcsname%
+}
+
+\createhook{end}
+
+\def\_writedata#1{\immediate\write\_PTBwrite{\gdef\noexpand#1{#1}}}
+
+\createarray{document data}
+\def\docdata#1{\appendarray{document data}{#1}}
+
+\appendtohook{end}{%
+ \immediate\openout\_PTBwrite{\jobname .data}%
+ \let\_arr_index=\_writedata%
+ \executearray{document data}%
+}
+
+\def\bye{\par\callhook{end}\par\vfill\supereject\end}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hooks.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hyperlinks.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hyperlinks.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hyperlinks.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,59 @@
+\input ptb-utils
+\_checkloaded{hyperlinks}
+
+\def\linkborder#1{%
+ \ifx^#1^%
+ attr {/C [\default at border] /Border [0 0 \default at border@wd]}%
+ \else\ifcsname #1 at border\endcsname%
+ \_xp\ifx\csname #1 at border\endcsname\empty%
+ attr {/Border [0 0 0]}%
+ \else%
+ attr {/C [\csname #1 at border\endcsname] /Border [0 0 \csname #1 at border@wd\endcsname]}%
+ \fi%
+ \fi\fi%
+}
+
+\def\createbordertype#1#2#3{%
+ \_xp\def\csname #1 at border\endcsname{#2}%
+ \_xp\def\csname #1 at border@wd\endcsname{#3}%
+}
+
+\def\anchorheight{1.5em} % Raise anchor since it should be at top of line
+\def\_anchor[#1]#2{\vbox to\z@{\kern-\anchorheight\pdfdest name{#1:#2} xyz\relax\vss}}
+\def\anchor{\_ifnextchar[ {\_anchor}{\_anchor[]}}
+
+\def\@anchorbuf{0pt}
+\def\@anchorwbuf{1pt}
+\def\_gotoanchor[#1]#2#3{{%
+ \setbox0=\hbox{#3}%
+ \quitvmode%
+ \pdfstartlink height \dimexpr\ht0 + \@anchorbuf\relax depth \dimexpr\dp0 + \@anchorbuf\relax
+ \linkborder{#1} goto name{#1:#2}\relax{\kern\@anchorwbuf\relax#3\kern\@anchorwbuf\relax}\pdfendlink%
+}}
+
+\def\gotoanchor{\_ifnextchar[ {\_gotoanchor}{\_gotoanchor[]}}
+
+\def\_url#1#2{%
+ \pdfstartlink user{
+ /Subtype /Link
+ \linkborder{url}
+ /A <<
+ /Type /Action
+ /S /URI
+ /URI (#1)
+ >>
+ }%
+ #2%
+ \pdfendlink{}%
+ \egroup%
+}
+
+\def\url{%
+ \bgroup%
+ \catcode`~=12 \catcode`_=12 \catcode`\%=12 %
+ \_url%
+}
+
+\createbordertype{default}{1 0 0}{0.6}
+\createbordertype{url}{1 0 0}{0.6}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-hyperlinks.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-index.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-index.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-index.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,207 @@
+\input ptb-pdfData
+\input pdfDstruct/ptb-hyperlinks
+\input pdfDstruct/ptb-tableofcontents
+\_checkloaded{indexes}
+
+\createarray{index_listing}
+
+%\def\_addtoindex#1#2{%
+% \def\_temp{#2}%
+% \ifx\_temp\empty%
+% \expanded{\noexpand\_rappendarray{\noexpand\gotoanchor{index at anchor@\the\indexcnt}{\@defaultindexval}}}{index@#1 at pages}%
+% \else%
+% \expanded{\noexpand\_rappendarray{\noexpand\gotoanchor{index at anchor@\the\indexcnt}{#2}}}{index@#1 at pages}%
+% \fi%
+%}
+
+\def\_rfindarray#1#2{\findarray{#2}{#1}}
+\def\_runiqueappendarray#1#2{\uniqueappendarray{#2}{#1}}
+
+\newcount\indexcnt
+%\def\_indexize#1[#2]{{%
+% \globalsetters%
+% \anchor{index at anchor@\the\indexcnt}%
+% \lowercase{\def\_temp{#1}}%
+% \_xp\_rfindarray\_xp{\_temp}{index_listing}{\_regA}%
+% \ifx\@return at value\False%
+% \_xp\_rappendarray\_xp{\_temp}{index_listing}%
+% \fi%
+% \unless\ifcsname arr at index@\_temp @pages\endcsname%
+% \createarray{index@\_temp @pages}%
+% \fi%
+% \_xp\_addtoindex\_xp{\_temp}{#2}%
+% \global\advance\indexcnt by 1\relax%
+%}}
+%
+%\def\indexize#1{\_ifnextchar[ {\_indexize{#1}}{\_indexize{#1}[]}}
+
+\def\_lowercasedef#1#2{%
+ \lowercase{\def#1{#2}}%
+}
+
+\def\_indexize{{%
+ \globalsetters%
+ \anchor{index at anchor@\the\indexcnt}%
+ \_xp\_runiqueappendarray\_xp{\_category}{index_listing}%
+ \ensurearray{index at category@\_category}%
+ \unless\ifx\_item\empty%
+ \_xp\_runiqueappendarray\_xp{\_item}{index at category@\_category}%
+ \fi%
+ \ensurearray{index@\_category:\_item}%
+ \_xp\_rappendarray\_xp{\_value}{index@\_category:\_item}%
+ %\_xp\_addtoindex\_xp{\_category}{#2}%
+ \global\advance\indexcnt by 1\relax%
+}}
+
+\def\indexize#1{%
+ \mapkeys{%
+ category={%
+ name=_category,
+ definition=\_lowercasedef,
+ required%
+ },
+ item={%
+ name=_item,
+ definition=\_lowercasedef,
+ default=%
+ },
+ value={%
+ name=_value,
+ required%
+ },
+ expand value,
+ add hyperlink%
+ }{#1}%
+ \keyexists{expand value}{\_regA}\lastkeys%
+ \unless\ifx\_regA\_nul%
+ \edef\_value{\_value}%
+ \fi%
+ \keyexists{add hyperlink}{\_regA}\lastkeys%
+ \unless\ifx\_regA\_nul%
+ \_xp\def\_xp\_value\_xp{\_xp\unexpanded\_xp{\_value}}%
+ \edef\_value{\noexpand\gotoanchor{index at anchor@\the\indexcnt}{\_value}}%
+ \fi%
+ \_indexize%
+}
+
+\def\_seealso{{%
+ \globalsetters%
+ \_xp\_runiqueappendarray\_xp{\_category}{index_listing}%
+ \unless\ifx\_item\empty%
+ \ensurearray{index at category@\_category}%
+ \_xp\_runiqueappendarray\_xp{\_item}{index at category@\_category}%
+ \fi%
+ \ensurearray{index@\_category:\_item @see-also}%
+ \_xp\_rappendarray\_xp{\_dest}{index@\_category:\_item @see-also}%
+}}
+
+\def\seealso#1{%
+ \mapkeys{%
+ category={%
+ name=_category,
+ definition=\_lowercasedef,
+ required%
+ },
+ item={%
+ name=_item,
+ definition=\_lowercasedef,
+ default=%
+ },
+ dest={%
+ name=_dest,
+ required%
+ },
+ hyperlink={
+ name=_hlink%
+ },
+ index link%
+ }{#1}%
+ \keyexists{hyperlink}{\_regA}\lastkeys%
+ \unless\ifx\_regA\_nul%
+ \_xp\def\_xp\_dest\_xp{\_xp\unexpanded\_xp{\_dest}}%
+ \keyexists{index link}{\_regA}\lastkeys%
+ \ifx\_regA\_nul%
+ \edef\_dest{\noexpand\gotoanchor{\_hlink}{\_dest}}%
+ \else%
+ \edef\_dest{\noexpand\gotoanchor{index@\_hlink @anchor}{\_dest}}%
+ \fi%
+ \fi%
+ \_seealso%
+}
+
+\newif\ifsecondcol
+\newbox\firstcol
+\newdimen\ohsize \ohsize=\hsize
+
+\unless\ifcsname makeheadline\endcsname
+ \def\makeheadline{}
+ %\def\makefootline{\hbox to\hsize{\baselineskip=24pt \lineskiplimit=0pt\hfil\thepage\hfil}}
+ \def\makefootline{}
+\fi
+
+\def\twocoloutput{%
+ \ifsecondcol%
+ \shipout\vbox{\makeheadline\hbox to\ohsize{\box\firstcol\hfil\box255}\hsize=\ohsize\makefootline}%
+ \global\secondcolfalse%
+ \else%
+ \global\setbox\firstcol=\vbox{\box255}%
+ \global\secondcoltrue%
+ \fi%
+ \unless\ifnum\outputpenalty>-\@MM
+ \ifsecondcol \null\eject\fi
+ \fi%
+}
+
+\def\_titlecase#1{\uppercase{#1}}
+\def\titlecase#1{\_titlecase#1}
+
+% #1: category #2: type
+\def\print_index_type#1#2#3{%
+ \par\quitvmode%
+ {%
+ \advance\leftskip by .5cm\relax
+ \kern-.5cm\titlecase{#2}\anchor{index@#1:#2 at anchor}:
+ \ifcsname arr at index@#1:#2\endcsname
+ \quitvmode\printarray{index@#1:#2}\par
+ \fi%
+ \ifcsname arr at index@#1:#2 at see-also\endcsname%
+ {\advance\leftskip by .25cm\relax
+ \quitvmode\kern-.25cm\relax See also: \printarray{index@#1:#2 at see-also}\par}%
+ \fi%
+ }%
+}
+
+% #1: category
+\def\print_index_category#1#2{%
+ \par\quitvmode{%
+ \advance\leftskip by .5cm\relax
+ \kern-.5cm\titlecase{#1}\anchor{index@#1:@anchor}:
+ \ifcsname arr at index@#1:\endcsname%
+ \printarray{index@#1:}\par%
+ \fi%
+ \ifcsname arr at index@category@#1\endcsname%
+ \sortarr{index at category@#1}{index at category@#1}\_cmp_str%
+ \arraymap{index at category@#1}{\print_index_type{#1}}\par%
+ \fi%
+ \ifcsname arr at index@#1:@see-also\endcsname%
+ \par{\advance\leftskip .25cm\relax
+ \quitvmode\kern-.25cm See also: \printarray{index@#1:@see-also}\par}%
+ \fi%
+ }%
+}
+
+\def\index{%
+ {%\hsize=0.4\hsize%
+ \parindent=\z@%
+ %\output={\twocoloutput}%
+ \section{Index}%
+ \sortarr{index_listing}{index_listing}\_cmp_str%
+ \arraymap{index_listing}\print_index_category%
+ \par\vfill\penalty-\@MM\eject}%
+}
+
+\def\@defaultindexval{\the\pageno}
+\def\_addtoindex#1[#2]{\indexize{category=#1, item=#2, value=\@defaultindexval, expand value, add hyperlink}}
+\def\addtoindex#1{\_ifnextchar[ {\_addtoindex{#1}}{\_addtoindex{#1}[]}}
+
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-index.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-layout.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-layout.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-layout.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,41 @@
+\input ptb-utils
+
+\_checkloaded{layout}
+
+\input pdfData/ptb-key-value
+
+\def\setlayout#1{%
+ \mapkeys{%
+ page width={%
+ name=_width,
+ default=\novalue%
+ },
+ page height={%
+ name=_height,
+ default=\novalue%
+ },
+ horizontal margin={%
+ name=_hmargin,
+ default=\novalue%
+ },
+ vertical margin={%
+ name=_vmargin,
+ default=\novalue%
+ }%
+ }{#1}%
+ \unless\ifx\_width\novalue%
+ \pdfpagewidth=\_width\relax%
+ \fi%
+ \unless\ifx\_height\novalue%
+ \pdfpageheight=\_height\relax%
+ \fi%
+ \unless\ifx\_hmargin\novalue%
+ \hoffset=\dimexpr\_hmargin-\pdfhorigin\relax%
+ \hsize=\dimexpr\pdfpagewidth - \_hmargin * 2\relax%
+ \fi%
+ \unless\ifx\_vmargin\novalue%
+ \voffset=\dimexpr\_vmargin-\pdfvorigin\relax%
+ \vsize=\dimexpr\pdfpageheight - \_vmargin * 2\relax%
+ \fi%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-layout.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-lists.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-lists.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-lists.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,43 @@
+\_checkloaded{lists}
+
+\input pdfData/ptb-counters
+
+\createcounter{list depth}
+\_xp\def\csname liststyle1\endcsname{$\bullet$}
+\_xp\def\csname liststyle2\endcsname{$\circ$}
+\_xp\def\csname liststyle3\endcsname{$-$}
+\def\blist{%
+ \bgroup\par%
+ \advancecounter{list depth}{1}%
+ \def\item{%
+ \par\egroup\bgroup\medskip\setbox0=\hbox{\csname liststyle\the\counter{list depth}\endcsname\quad}%
+ \advance\leftskip by \dimexpr\wd0+\enumindent\relax\leavevmode\kern-\wd0\box0%
+ }%
+ \def\mtext{%
+ \par\egroup\medskip\bgroup%
+ }
+ \bgroup%
+}
+\def\elist{\par\egroup\egroup\medskip}
+
+\def\_numtoletter#1{\ifcase#1 0\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\else ---\fi}
+\createcounter{enum count}
+\createcounter{enum depth}
+\_xp\def\csname enumstyle1\endcsname#1{{\bf(#1)}}
+\_xp\def\csname enumstyle2\endcsname#1{{\bf(\romannumeral#1)}}
+\_xp\def\csname enumstyle3\endcsname#1{{\bf(\_numtoletter{#1})}}
+\def\enumindent{.25cm}
+\def\benum{\bgroup\par%
+ \setcounter{enum count}{0}%
+ \advancecounter{enum depth}{1}%
+ \def\item{%
+ \par\egroup\advancecounter{enum count}{1}\bgroup\medskip%
+ \setbox0=\hbox{\csname enumstyle\the\counter{enum depth}\endcsname{\the\counter{enum count}}\quad}%
+ \advance\leftskip by \dimexpr\wd0+\enumindent\relax\noindent\kern-\wd0\box0%
+ }%
+ \def\mtext{%
+ \par\egroup\medskip\bgroup%
+ }
+ \bgroup%
+}
+\def\eenum{\par\egroup\egroup\par\medskip}
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-lists.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-tableofcontents.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-tableofcontents.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-tableofcontents.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,237 @@
+\input ptb-utils
+
+\_checkloaded{tableofcontents}
+
+\input ptb-pdfData
+\input pdfDstruct/ptb-fonts
+\input pdfDstruct/ptb-hooks
+\input pdfDstruct/ptb-hyperlinks
+
+\newwrite\_tocwrite
+\newread\_tocread
+
+\def\setuptoc{%
+ \immediate\openout\_tocwrite{\jobname .toc}%
+ \immediate\openin\_tocread{\jobname .data}%
+ \unless\ifeof\_tocread%
+ \input{\jobname .data}%
+ \fi%
+}
+
+\createbordertype{toc}{}{0}
+
+% #1: Content marker
+% #2: Content title
+% #3: Content value
+% #4: Content depth
+% #5: Anchor name
+\def\addtoccontent#1#2#3#4#5{%
+ \anchor[toc]{#5}%
+ \immediate\write\_tocwrite{\noexpand\tocline{#1}{#2}{#3}{#4}{#5}}%
+}
+
+\def\tocline#1#2#3#4#5{%
+ \csname tocline at depth@#4\endcsname{#1}{#2}{#3}{#5}%
+}
+
+\def\settoclinemanager#1{%
+ \_xp\currdef\csname tocline at depth@#1\endcsname##1##2##3##4%
+}
+
+\def\settoctitleformat#1#2{%
+ \_xp\currdef\csname toctitle at depth@#1\endcsname{#2}%
+}
+
+\def\settocvalueformat#1#2{%
+ \_xp\currdef\csname tocvalue at depth@#1\endcsname{#2}%
+}
+
+\def\settocleader#1#2{%
+ \_xp\currdef\csname tocleader at depth@#1\endcsname{#2}%
+}
+
+\def\settocindent#1#2{%
+ \_xp\curredef\csname tocindent at depth@#1\endcsname{#2}%
+}
+
+\def\settocbuf#1#2{
+ \_xp\curredef\csname tocbuf at depth@#1\endcsname{#2}%
+}
+
+\def\printtoc{%
+ \immediate\openin\_tocread{\jobname .toc}%
+ \unless\ifeof\_tocread%
+ \input{\jobname .toc}%
+ \fi%
+ \immediate\closein\_tocread%
+}
+
+\def\tableofcontents{\printtoc\setuptoc}
+
+\def\dotfill{\xleaders\hbox{$\m at th\mkern1.5mu\hbox{.}\mkern1.5mu$}\hfill}
+
+\def\setmacrotolen#1#2{{%
+ \ifx\undefined#1%
+ \setbox0=\hbox{#2}%
+ \xdef#1{\the\wd0}%
+ \fi%
+}}
+
+\def\settomax#1#2{{%
+ \setbox0=\hbox{#2}%
+ \ifdim\wd0>#1 %
+ \xdef#1{\the\wd0}%
+ \fi%
+}}
+
+\def\settomaxanddisplay#1#2#3#4{{%
+ \setbox0=\hbox{#2}%
+ \ifdim\wd0>#1 %
+ \xdef#1{\the\wd0}%
+ \fi%
+ \hbox to#1{#3\unhbox0\relax#4}%
+}}
+
+\def\_definetocmanager#1{%
+ \_xp\xdef\csname tocvaluewd at depth@#1\endcsname{0pt}%
+ \_xp\xdef\csname tocmarkerwd at depth@#1\endcsname{0pt}%
+ \_xp\docdata\_xp{\csname tocvaluewd at depth@#1\endcsname}%
+ \_xp\docdata\_xp{\csname tocmarkerwd at depth@#1\endcsname}%
+ \settoclinemanager{#1}{%
+ \kern\csname tocbuf at depth@#1\endcsname\relax%
+ \hbox to\hsize{%
+ \hskip\csname tocindent at depth@#1\endcsname\relax%
+ \gotoanchor[toc]{##4}{%
+ \_xp\settomaxanddisplay\csname tocmarkerwd at depth@#1\endcsname{%
+ \csname tocmarker at depth@#1\endcsname{##1}%
+ }{}\hss%
+ \kern\csname tocmbuf at depth@#1\endcsname\csname toctitle at depth@#1\endcsname{##2}%
+ }%
+ \hfil\ {\csname tocleader at depth@#1\endcsname}\ %
+ \gotoanchor[toc]{##4}{%
+ \_xp\settomaxanddisplay\csname tocvaluewd at depth@#1\endcsname{%
+ \csname tocvalue at depth@#1\endcsname{##3}%
+ }\hss{}%
+ }
+ }%
+ \kern\csname tocbuf at depth@#1\endcsname\relax%
+ }%
+}
+
+
+\def\settocdepthformat#1#2{%
+ \mapkeys{%
+ marker={%
+ name=tocmarker at depth@#1,
+ default=\setfont{rm}%
+ },
+ marker buffer={%
+ name=tocmbuf at depth@#1,
+ default=.25cm%
+ },
+ title={%
+ name=toctitle at depth@#1,
+ default=\setfont{rm}%
+ },
+ value={%
+ name=tocvalue at depth@#1,
+ default=\setfont{rm}%
+ },
+ leader={%
+ name=tocleader at depth@#1,
+ default%
+ },
+ indent={%
+ name=tocindent at depth@#1,
+ default=0pt%
+ },
+ buffer={%
+ name=tocbuf at depth@#1,
+ default=0pt%
+ }%
+ }{#2}%
+ \_definetocmanager{#1}%
+}
+
+\def\upperroman#1{\uppercase\expanded{{\_xp\romannumeral\expanded{#1}}}}
+\def\_partmarker#1{\rlap{\upperroman{#1}}}
+\settocdepthformat0{marker=\setfontandscale{bf}{12pt}\_partmarker, marker buffer=.75cm, title=\setfontandscale{bf}{12pt}, value=\setfontandscale{bf}{12pt}, leader=, indent=0pt, buffer=5pt}
+\settocdepthformat1{marker=\setfont{bf}\rlap, marker buffer=.75cm, title=\setfont{bf}, value=\setfont{bf}, leader=, indent=0pt, buffer=3pt}
+\settocdepthformat2{leader=\dotfill, indent=.75cm, buffer=0pt}
+\settocdepthformat3{leader=\dotfill, indent=\dimexpr 1cm+\csname tocmarkerwd at depth@2\endcsname\relax, buffer=0pt}
+
+\createcounter{part}
+\createcounter{section}[part]
+\createcounter{subsection}[section]
+\createcounter{subsubsection}[subsection]
+
+\def\part#1{%
+ \par\vfill%
+ \advancecounter{part}{1}%
+ \def\currpart{#1}%
+ \gdef\currsection{#1}%
+ \gdef\currsubsection{#1}%
+ \gdef\currsubsubsection{#1}%
+ \addtoccontent{\the\counter{part}}{#1}{\the\pageno}{0}{part@\the\counter{part}}%
+ \vbox to\vsize{\vfil\centerline{\setfontandscale{sc}{40pt}\upperroman{\the\counter{part}}. #1}\vfil}%
+}
+
+\def\_section#1{%
+ \advancecounter{section}{1}%
+ \par\bigskip%
+ \noindent{\setfontandscale{bf}{15pt}\the\counter{section} #1}%
+ \addtoccontent{\the\counter{section}}{#1}{\the\pageno}{1}{section@\the\counter{part}.\the\counter{section}}%
+ \gdef\currsection{#1}%
+ \gdef\currsubsection{#1}%
+ \gdef\currsubsubsection{#1}%
+ \par\penalty\@M\bigskip%
+}
+
+\def\_pseudosection#1{%
+ \par\bigskip%
+ \noindent{\setfontandscale{bf}{15pt}#1}%
+ \par\penalty\@M\bigskip%
+}
+
+\def\section{\@ifstar \_pseudosection\_section}
+
+\def\currsubsubsection{}
+\def\currsubsection{}
+\def\currsection{}
+\def\currpart{}
+
+\def\_subsection#1{%
+ \advancecounter{subsection}{1}%
+ \par\medskip%
+ \noindent{\setfontandscale{bf}{12pt}\the\counter{section}.\the\counter{subsection} #1}%
+ \addtoccontent{\the\counter{section}.\the\counter{subsection}}{#1}{\the\pageno}{2}{subsection@\the\counter{part}.\the\counter{section}.\the\counter{subsection}}%
+ \gdef\currsubsection{#1}%
+ \gdef\currsubsubsection{#1}%
+ \par\penalty\@M\medskip%
+}
+
+\def\_pseudosubsection#1{%
+ \par\medskip%
+ \noindent{\setfontandscale{bf}{12pt}#1}%
+ \par\penalty\@M\medskip%
+}
+
+\def\subsection{\@ifstar \_pseudosubsection\_subsection}
+
+\def\_subsubsection#1{%
+ \advancecounter{subsubsection}{1}%
+ \par\medskip%
+ \noindent{\setfontandscale{bf}{12pt}\the\counter{section}.\the\counter{subsection}.\the\counter{subsubsection} #1}%
+ \addtoccontent{\the\counter{section}.\the\counter{subsection}.\the\counter{subsubsection}}{#1}{\the\pageno}{3}{subsubsection@\the\counter{part}.\the\counter{section}.\the\counter{subsection}.\the\counter{subsubsection}}%
+ \gdef\currsubsubsection{#1}%
+ \par\penalty\@M\medskip%
+}
+
+\def\_pseudosubsubsection#1{%
+ \par\medskip%
+ \noindent{\setfontandscale{bf}{12pt}#1}%
+ \par\penalty\@M\medskip%
+}
+
+\def\subsubsection{\@ifstar \_pseudosubsubsection\_subsubsection}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-tableofcontents.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colorboxes.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colorboxes.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colorboxes.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,97 @@
+\input ptb-utils
+\input pdfGraphics/ptb-colors
+
+\_checkloaded{colorboxes}
+
+\newbox\_contentbox
+\newbox\_splitbox
+
+\def\_spaceleft{%
+ \ifdim\pagetotal=\z@%
+ \dimexpr\vsize - \topskip\relax%
+ \else%
+ \dimexpr \pagegoal - \pagetotal - \topskip\relax%
+ \fi%
+}
+
+\newif\if_recheck
+\def\_getsplitdim#1{%
+ \ifdim\dimexpr\_spaceleft-#1\relax>\ht\_contentbox%
+ \edef\_splitdim{\the\ht\_contentbox}%
+ \_recheckfalse%
+ \else%
+ \ifdim\dimexpr\_spaceleft-#1\relax<\z@%
+ \if_recheck%
+ \vfil\break\vfilneg%
+ \_recheckfalse%
+ \else%
+ \null\par%
+ \_rechecktrue%
+ \fi%
+ \_getsplitdim{#1}%
+ \else%
+ \edef\_splitdim{\the\dimexpr\_spaceleft-#1\relax}%
+ \_recheckfalse%
+ \fi%
+ \fi%
+}
+
+% Splits the content box to fit into pages.
+% #1: Total vertical buffer
+% #2: Output routine for new box
+\def\_splitcontentbox#1#2{{%
+ \splittopskip=\z@%
+ \boxmaxdepth=\z@%
+ \offinterlineskip%
+ \unless\ifvoid\_contentbox%
+ \_getsplitdim{#1}%
+ \setbox\_splitbox = \vsplit\_contentbox to\_splitdim\relax%
+ \setbox0=\vbox{#2}%
+ \vbox to\z@{\copy0\vss}%
+ \kern\ht0\relax\penalty\z@%
+ \_splitcontentbox{#1}{#2}%
+ \fi%
+}}
+
+\def\_ppbuf{0pt}
+\def\_bppbox#1#2#3[#4]{%
+ \def\_colorcontentbox{%
+ \hbox{\curvedcolorbox{#2}{#1}{\_setcolor{}{#3}\box\_splitbox}{#4}}%
+ }
+ \par%
+ \kern\_ppbuf\relax%
+ \null\par% Move the kern from recent contributions to MVL
+ \setbox\_contentbox=\vbox\bgroup%
+ \hsize=\dimexpr\hsize-\_actual_curve_buf * 2\relax%
+}
+
+\def\bppbox#1#2#3{%
+ \_ifnextchar[ {\_bppbox{#1}{#2}{#3}}{\_bppbox{#1}{#2}{#3}[....]}%
+}
+
+\def\eppbox{%
+ \egroup%
+ \_splitcontentbox{2\_actual_curve_buf}\_colorcontentbox%
+ \vskip\_ppbuf\relax%
+}
+
+\def\pprulewd{2.5pt}
+\def\pprulevbuf{5pt}
+\def\pprulehbuf{7pt}
+
+\def\blinedppbox#1#2#3{%
+ \def\_colorcontentbox{{%
+ \setbox0=\hbox{{\_setcolor{}{#2}\vrule width\pprulewd\relax}\kern\pprulehbuf\vbox{\kern\pprulevbuf\_setcolor{}{#3}\box\_splitbox\kern\pprulevbuf}\kern\pprulehbuf}%
+ \hbox{{\_setcolor{}{#1}\vrule height\ht0 width\wd0 depth\dp0}\kern-\wd0\box0}%
+ }}%
+ \par\kern\_ppbuf\relax%
+ \null\par%
+ \setbox\_contentbox=\vbox\bgroup%
+ \hsize=\dimexpr\hsize-\pprulewd - \pprulehbuf * 2\relax%
+}
+\def\elinedppbox{%
+ \egroup%
+ \_splitcontentbox{2\dimexpr\pprulevbuf\relax}\_colorcontentbox%
+ \vskip\_ppbuf\relax%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colorboxes.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colors.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colors.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colors.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,231 @@
+\input ptb-utils
+
+\_checkloaded{colors}
+
+\def\_rgb_encode#1{#1 rg #1 RG}
+\def\_rgb_encodebg#1{#1 rg}
+\def\_rgb_encodefg#1{#1 RG}
+\def\_cmyk_encode#1{#1 k #1 K}
+\def\_cmyk_encodebg#1{#1 k}
+\def\_cmyk_encodefg#1{#1 K}
+
+\chardef\_colorstack=0
+\def\_pdfcolor_restore{\pdfcolorstack\_colorstack pop\relax}
+
+\def\_setcolor_code#1{\pdfcolorstack\_colorstack push{#1}\aftergroup\_pdfcolor_restore}
+
+%\def\_colorbg_set#1#2{\pdfcolorstack\_colorstack push{\csname _#1_encodebg\endcsname{#2}}\aftergroup\_pdfcolor_restore}
+%\def\_colorfg_set#1#2{\pdfcolorstack\_colorstack push{\csname _#1_encodefg\endcsname{#2}}\aftergroup\_pdfcolor_restore}
+\def\_color_set#1#2{\_setcolor_code{\csname _#1_encode\endcsname{#2}}}
+\def\_colorbg_set#1#2{\_setcolor_code{\csname _#1_encodebg\endcsname{#2}}}
+\def\_colorfg_set#1#2{\_setcolor_code{\csname _#1_encodefg\endcsname{#2}}}
+
+\def\_color_defined#1{\expanded{\noexpand\_color_set\csname c@#1\endcsname}}
+\def\_colorbg_defined#1{\expanded{\noexpand\_colorbg_set\csname c@#1\endcsname}}
+\def\_colorfg_defined#1{\expanded{\noexpand\_colorfg_set\csname c@#1\endcsname}}
+
+%\def\_color_set#1#2{\pdfcolorstack\_colorstack push{\csname _#1_encode\endcsname{#2}}\aftergroup\_pdfcolor_restore}
+% \_color_get_code{rgb/cmyk}{code}{fg/bg/empty}
+\def\_color_get_code#1#2#3{\csname _#1_encode#3\endcsname{#2}}
+% \_color_get_defined{color name}{fg/bg/empty}
+\def\_color_get_defined#1#2{\expanded{\noexpand\_color_get_code\csname c@#1\endcsname{#2}}}
+
+
+\def\__getcolorparam#1#2#3#4{%
+ \ifx^#3^%
+ \_afterfi{\expanded{\unexpanded{#1}{\_color_get_defined{#4}{#2}}}}%
+ \else%
+ \_afterfi{\expanded{\unexpanded{#1}{\_color_get_code{#3}{#4}{#2}}}}%
+ \fi
+}
+% \_getcolorparam{\macro}{fg/bg/empty}... (... is of the form rgb{...}, etc, or {color name})
+\def\_getcolorparam#1#2#3#{\__getcolorparam{#1}{#2}{#3}}
+
+\def\___setcolor#1#2#3#4\relax{%
+ \ifx^#3^%
+ \csname _color#1_defined\endcsname{#2}%
+ \else%
+ \csname _color#1_set\endcsname{#2}{#3}%
+ \fi%
+}
+\def\__setcolor#1#2#{\___setcolor{#1}{#2}}
+% \_setcolor{fg/bg/empty}{color name/color space{...}} -> sets the color
+\def\_setcolor#1#2{\expanded{\noexpand\__setcolor{#1}#2}{}\relax}
+
+\def\___getcolor#1#2#3#4;{%
+ \ifx^#3^%
+ \_color_get_defined{#2}{#1}%
+ \else%
+ \_color_get_code{#2}{#3}{#1}%
+ \fi%
+}
+\def\__getcolor#1#2#{\___getcolor{#1}{#2}}
+% \_getcolor{fg/bg/empty}{color name/color space{...}} -> gets the color
+\def\_getcolor#1#2{\expanded{\noexpand\__getcolor{#1}#2}{};}
+
+
+%\def\_color#1#2{%
+% \ifx^#1^%
+% \_color_defined{#2}%
+% \else%
+% \_color_set{#1}{#2}%
+% \fi%
+%}
+\def\color{\_getcolorparam\_setcolor_code{}}
+
+\def\_localcolor#1{%
+ \bgroup%
+ \_setcolor_code{#1}%
+ \let\_regU%
+}
+\def\localcolor{\_getcolorparam\_localcolor{}}
+
+\def\definecolor#1#2#3{\_xp\def\csname c@#1\endcsname{{#2}{#3}}}
+\def\letcolor#1#2{\_xp\edef\csname c@#1\endcsname{\csname c@#2\endcsname}}
+\def\definecolormacro#1#2#3{\definecolor{#1}{#2}{#3}\_xp\def\csname #1\endcsname##1{\localcolor{#1}{##1}}}
+
+\newbox\_colorbox
+\def\_endhighlightbox{\quitvmode\hbox to\wd\_colorbox{\_xp\localcolor\_regA{\vrule height\ht\_colorbox width\wd\_colorbox depth\dp\_colorbox}\hss\box\_colorbox}\egroup}
+\def\_highlightbox#1#2{\bgroup\def\_regA{#1{#2}}\setbox\_colorbox=\hbox\bgroup\aftergroup\_endhighlightbox\let\_regU}
+\def\highlightbox#1#{\_highlightbox{#1}}
+
+\def\bufferwidth{2pt}
+\def\bufferheight{2pt}
+\def\_bufferboxend{\hbox{\kern\bufferwidth\lower\dimexpr\bufferheight + \dp\_colorbox\relax\vbox{\kern\bufferheight\box\_colorbox\kern\bufferheight}\kern\bufferwidth}}
+\def\_bufferbox{\setbox\_colorbox=\hbox\bgroup\aftergroup\_bufferboxend\let\_regU}
+
+\def\framewidth{.3pt}
+\def\_frameboxend{\hbox{\vrule width\framewidth\lower\dimexpr \framewidth + \dp\_colorbox\relax\vbox{\hrule height\framewidth\box\_colorbox\hrule height\framewidth}\vrule width\framewidth\relax}}
+\def\_framebox{\setbox\_colorbox=\hbox\bgroup\aftergroup\_frameboxend\let\_regU}
+
+\def\_coloredbox#1#2{\highlightbox#1{#2}\bgroup\_bufferbox\bgroup\aftergroup\egroup\let\_regU}
+\def\coloredbox#1#{\_coloredbox{#1}}
+
+\def\_framecoloredbox#1#2{\quitvmode\_framebox\bgroup\_coloredbox{#1}{#2}\bgroup\aftergroup\egroup\let\_regU}
+\def\framecoloredbox#1#{\_framecoloredbox{#1}}
+
+\def\framebox{\_framebox\bgroup\_bufferbox\bgroup\aftergroup\egroup\let\_regU}
+
+\def\_pdf_pt_scale,{.996264 0 0 .996264 0 0 cm}
+
+\def\_curvedbox#1#2#3#4#5{%
+ #1 \_nopt{#2pt-#5pt} m
+ \_nopt{#1pt-#5pt} \_nopt{#2pt-#5pt} \_nopt{#1pt-#5pt} #2 v
+ \_nopt{#1pt-#5pt} \_nopt{#2pt+#4pt} l
+ \_nopt{#1pt-#5pt} \_nopt{#2pt+#4pt+#5pt} #1 \_nopt{#2pt+#4pt+#5pt} v
+ \_nopt{#1pt+#3pt} \_nopt{#2pt+#4pt+#5pt} l
+ \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt+#4pt+#5pt} \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt+#4pt} v
+ \_nopt{#1pt+#3pt+#5pt} #2 l
+ \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt-#5pt} \_nopt{#1pt+#3pt} \_nopt{#2pt-#5pt} v
+ #1 \_nopt{#2pt-#5pt} l
+}
+
+% #1: origin x
+% #2: origin y
+% #3: width
+% #4: height
+% #5: curvature
+% Note: #1...#4 do not take curvature into account
+\def\_curvedbox#1#2#3#4#5#6#7#8#9{%
+ \if.#6
+ #1 \_nopt{#2pt-#5pt} m
+ \_nopt{#1pt-#5pt} \_nopt{#2pt-#5pt} \_nopt{#1pt-#5pt} #2 v
+ \else
+ \_nopt{#1pt-#5pt} \_nopt{#2pt-#5pt} m
+ \fi
+ \if.#7
+ \_nopt{#1pt-#5pt} \_nopt{#2pt+#4pt} l
+ \_nopt{#1pt-#5pt} \_nopt{#2pt+#4pt+#5pt} #1 \_nopt{#2pt+#4pt+#5pt} v
+ \else
+ \_nopt{#1pt-#5pt} \_nopt{#2pt+#4pt+#5pt} l
+ \fi
+ \if.#8
+ \_nopt{#1pt+#3pt} \_nopt{#2pt+#4pt+#5pt} l
+ \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt+#4pt+#5pt} \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt+#4pt} v
+ \else
+ \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt+#4pt+#5pt} l
+ \fi
+ \if.#9
+ \_nopt{#1pt+#3pt+#5pt} #2 l
+ \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt-#5pt} \_nopt{#1pt+#3pt} \_nopt{#2pt-#5pt} v
+ \else
+ \_nopt{#1pt+#3pt+#5pt} \_nopt{#2pt-#5pt} l
+ \fi
+ %#1 \_nopt{#2pt-#5pt} l
+}
+
+\def\curvebuffer{4pt}
+\def\curvewidth{1pt}
+\def\_actual_curve_buf{\dimexpr\curvebuffer + \curvewidth\relax}
+\def\boxshadowcolor{rgb{.9 .9 .9}}
+\def\shadowxoff{3pt}
+\def\shadowyoff{-3pt}
+
+\long\def\curvedcolorbox#1#2#3#4{{%
+ \setbox\_colorbox=\hbox{{#3}}%
+ \hbox{%
+ \lower\dimexpr\curvebuffer + \curvewidth + \dp\_colorbox\relax%
+ \vbox{%
+ \kern\_actual_curve_buf%
+ \hbox{%
+ \kern\_actual_curve_buf%
+ \pdfliteral{%
+ q \_pdf_pt_scale,
+ \_getcolor{}{\boxshadowcolor}
+ \_nopt{\curvewidth} w
+ \_curvedbox{\_nopt{\shadowxoff}}{\_nopt{-\dp\_colorbox+\shadowyoff}}{\_nopt{\wd\_colorbox}}{\_nopt{\ht\_colorbox+\dp\_colorbox}}{\_nopt{\curvebuffer}}#4
+ b
+ \_getcolor{bg}{#2}
+ \_getcolor{fg}{#1}
+ \_curvedbox{0}{\_nopt{-\dp\_colorbox}}{\_nopt{\wd\_colorbox}}{\_nopt{\ht\_colorbox+\dp\_colorbox}}{\_nopt{\curvebuffer}}#4
+ W f
+ }%
+ \rlap{\copy\_colorbox}%
+ \pdfliteral{%
+ Q
+ q
+ \_pdf_pt_scale,
+ \_nopt{\curvewidth} w
+ \_getcolor{fg}{#1}
+ \_curvedbox{0}{\_nopt{-\dp\_colorbox}}{\_nopt{\wd\_colorbox}}{\_nopt{\ht\_colorbox+\dp\_colorbox}}{\_nopt{\curvebuffer}}#4
+ s
+ Q
+ }%
+ \kern\wd\_colorbox%
+ \kern\_actual_curve_buf%
+ }%
+ \kern\_actual_curve_buf%
+ }%
+ }%
+}}
+
+\def\_pagecolor#1{\pdfliteral page{#1 0 0 \_nopt{\pdfpagewidth} \_nopt{\pdfpageheight} re f}}
+\def\pagecolor{\_getcolorparam\_pagecolor{}}
+
+\def\pageborder#1#2#3{%
+ \pdfliteral page{%
+ q
+ \_pdf_pt_scale,
+ \_getcolor{bg}{#1} \_getcolor{fg}{#2}
+ #3 w
+ 0 0 \_nopt{\pdfpagewidth} \_nopt{\pdfpageheight} re b
+ Q
+ }%
+}
+
+\def\fakeboldwidth{.4}
+\long\def\_fakebold[#1]#2{\pdfliteral{2 Tr #1 w}#2\pdfliteral{0 Tr}}
+\def\fakebold{\_ifnextchar[ {\_fakebold}{\_fakebold[\fakeboldwidth]}}
+\def\flip#1{{\setbox0=\hbox{#1}\kern\wd0\pdfsave\pdfliteral{-1 0 0 1 0 0 cm}\rlap{#1}\pdfrestore}}
+
+\definecolormacro{red}{rgb}{1 0 0}
+\definecolormacro{blue}{rgb}{0 0 1}
+\definecolormacro{green}{rgb}{0 1 0}
+\definecolormacro{yellow}{rgb}{1 1 0}
+\definecolormacro{orange}{rgb}{1 .4 0}
+\definecolormacro{purple}{rgb}{1 0 1}
+\definecolormacro{white}{rgb}{1 1 1}
+\definecolormacro{black}{rgb}{0 0 0}
+\definecolormacro{darkgreen}{rgb}{0 .7 0}
+\definecolormacro{grey}{rgb}{.5 .5 .5}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-colors.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw-utils.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw-utils.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw-utils.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,47 @@
+\catcode`\@=11
+
+\let\@xp=\expandafter
+\def\@gobble#1{}
+\def\m at strip{\@xp\@gobble\string}
+\def\@nul{\noexpand\@nul}
+
+\def\pdfdraw at afterfi#1#2\fi{\fi#1}
+
+\def\@xplet#1#2{%
+ \def\pdfdraw at regA{\@xp\let#1}%
+ \@xp\pdfdraw at regA#2%
+}
+
+\def\pdfdraw at stack@init#1{\@xp\def\csname #1 at sp\endcsname{0}}
+
+\def\pdfdraw at stack@push#1#2{%
+ \@xp\edef\csname #1 at sp\endcsname{\the\numexpr \csname #1 at sp\endcsname + 1\relax}%
+ \@xp\let\csname #1 at def@\csname #1 at sp\endcsname\endcsname=#2%
+ \@xp\edef\csname #1 at name@\csname #1 at sp\endcsname\endcsname{\m at strip#2}%
+}
+
+\def\pdfdraw at stack@decrement#1{%
+ \@xp\let\csname #1 at name@\csname #1 at sp\endcsname\endcsname=\undefined%
+ \@xp\let\csname #1 at def@\csname #1 at sp\endcsname\endcsname=\undefined%
+ \@xp\edef\csname #1 at sp\endcsname{\the\numexpr \csname #1 at sp\endcsname - 1\relax}%
+}
+
+\def\pdfdraw at stack@pop#1{%
+ \@xplet{\csname\csname #1 at name@\csname #1 at sp\endcsname\endcsname\endcsname}{\csname #1 at def@\csname #1 at sp\endcsname\endcsname}%
+ \pdfdraw at stack@decrement{#1}%
+}
+
+\def\pdfdraw at stack@top#1#2#3{%
+ \@xp\let#2\csname #1 at def@\csname #1 at sp\endcsname\endcsname%
+ \@xp\let#3\csname #1 at name@\csname #1 at sp\endcsname\endcsname%
+}
+
+\def\pdfdraw at repeat#1#2#3#4#5{%
+ \unless\ifnum #1 #4 #2 %
+ \pdfdraw at afterfi{%
+ #5{#1}%
+ \@xp\pdfdraw at repeat\@xp{\the\numexpr #1 + #3\relax}{#2}{#3}{#4}{#5}%
+ }%
+ \fi%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw-utils.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,681 @@
+\input ptb-utils
+
+\_checkloaded{pdfdraw}
+
+\input pdfData/ptb-stack
+%\input pdfData/math
+\input apnum
+\input pdfData/ptb-key-value
+\input pdfGraphics/ptb-colors
+
+\def\_multiply#1#2{\_nopt{#1\dimexpr #2pt\relax}}
+\def\_add#1#2{\_nopt{#1pt + #2pt}}
+\def\_subtract#1#2{\_nopt{#1pt - #2pt}}
+\def\_square#1{\_multiply{#1}{#1}}
+
+\def\_pdfdraw_nattrans,{.996264 0 0 .996264 0 0 cm}
+
+\def\_pdfdraw_moveto#1#2{\_pdfdraw_p{#1}{#2} m }
+\def\_pdfdraw_lineto#1#2{\_pdfdraw_p{#1}{#2} l }
+\def\_pdfdraw_bezierv#1#2#3#4{\_pdfdraw_p{#1}{#2} \_pdfdraw_p{#3}{#4} v }
+\def\_pdfdraw_bezierc#1#2#3#4#5#6{\_pdfdraw_p{#1}{#2} \_pdfdraw_p{#3}{#4} \_pdfdraw_p{#5}{#6} c }
+\def\_pdfdraw_re#1#2#3#4{\_pdfdraw_p{#1}{#2} \_pdfdraw_p{#3}{#4} re }
+
+\def\_pdfdraw_cd{.55228475}
+\def\_pdfdraw_ellipse#1#2#3#4{% (x,y), r1, r2
+ \_pdfdraw_moveto {\_add{#1}{#3}}{#2}% (x+r1, y) m
+ \_pdfdraw_bezierc{\_add{#1}{#3}}{\_add{#2}{\_multiply\_pdfdraw_cd{#4}}}% (x+r, y+d*r2)
+ {\_add{#1}{\_multiply\_pdfdraw_cd{#3}}}{\_add{#2}{#4}}% (x+d*r1, y+r2)
+ {#1}{\_add{#2}{#4}}% (x,y+r2) c
+ \_pdfdraw_bezierc{\_add{#1}{\_multiply{-\_pdfdraw_cd}{#3}}}{\_add{#2}{#4}}% (x-d*1r,y+r2)
+ {\_add{#1}{-#3}}{\_add{#2}{\_multiply\_pdfdraw_cd{#4}}}% (x-r1,y+d*r2)
+ {\_add{#1}{-#3}}{#2}% (x-r1,y) c
+ \_pdfdraw_bezierc{\_add{#1}{-#3}}{\_add{#2}{\_multiply{-\_pdfdraw_cd}{#4}}}%(x-r1, y-d*r2)
+ {\_add{#1}{\_multiply{-\_pdfdraw_cd}{#3}}}{\_add{#2}{-#4}}% (x-d*r1, y-r2)
+ {#1}{\_add{#2}{-#4}}% (x,y-r2) c
+ \_pdfdraw_bezierc{\_add{#1}{\_multiply\_pdfdraw_cd{#3}}}{\_add{#2}{-#4}}% (x+d*r1,y-r2)
+ {\_add{#1}{#3}}{\_add{#2}{\_multiply{-\_pdfdraw_cd}{#4}}}% (x+r1,y-d*r2)
+ {\_add{#1}{#3}}{#2}% (x-r1,y) c
+}
+\def\_pdfdraw_circle#1#2#3{\_pdfdraw_ellipse{#1}{#2}{#3}{#3}}
+
+\createmacrostack{transstack}
+\def\_pdfdraw_transform#1#2{{#1}{#2}}
+\macrostackpush{transstack}\_pdfdraw_transform
+\def\_pdfdraw_transform#1#2{{#1}{#2}}
+\def\_pdfdraw_p_id#1#2{#1 #2}
+\def\_pdfdraw_p#1#2{\_xp\_pdfdraw_p_id\expanded{\_pdfdraw_transform{#1}{#2}}}
+
+\let\_pdfdraw_xp=\relax
+\def\_pdfdraw_addtransform#1{%
+ \_xp\_xp\_xp\def\_xp\_xp\_xp\_regA\_xp\_xp\_xp{\macrostackget{transstack}{\macrostackpointer{transstack}}}%
+ \_xp\def\_xp\_pdfdraw_transform\_xp##\_xp1\_xp##\_xp2\_xp{\_xp\_xp\_regA\expanded{#1{##1}{##2}}}%
+ \macrostackpush{transstack}\_pdfdraw_transform%
+}
+
+\def\_pdfdraw_postaddtransform#1{%
+ \_xp\_xp\_xp\def\_xp\_xp\_xp\_regA\_xp\_xp\_xp{\macrostackget{transstack}{\macrostackpointer{transstack}}}%
+ \_xp\def\_xp\_pdfdraw_transform\_xp##\_xp1\_xp##\_xp2\_xp{\_xp\_xp\_xp#1\_xp\expanded\_xp{\_regA{##1}{##2}}}%
+ \macrostackpush{transstack}\_pdfdraw_transform%
+}
+
+\def\_pdfdraw_settransform#1{%
+ \let\_pdfdraw_transform=#1%
+ \macrostackpush{transstack}\_pdfdraw_transform%
+}
+
+\def\_pdfdraw_poptransform{%
+ \macrostackpop{transstack}%
+ %\macrostackpeek{transstack}%
+}
+
+\createmacrostack{affinetransstack}
+\def\_pdfdraw_addaffinetransform#1#2#3#4#5#6{%
+ \beginscope%
+ \localize\_regA%
+ \edef\_regA##1##2{%
+ {\noexpand\_add{\noexpand\_add{\noexpand\_multiply{#1}{##1}}{\noexpand\_multiply{#3}{##2}}}{#5}}% #1 * ##1 + #3 * ##2 + #5
+ {\noexpand\_add{\noexpand\_add{\noexpand\_multiply{#2}{##1}}{\noexpand\_multiply{#4}{##2}}}{#6}}% #2 * ##1 + #4 * ##2 + #6
+ }%
+ \macrostackpush{affinetransstack}\_regA%
+ \_xp\_xp\_xp\_pdfdraw_addtransform\macrostackget{affinetransstack}{\macrostackpointer{affinetransstack}}%
+ \endscope%
+}
+
+\def\_pdfdraw_postaddaffinetransform#1#2#3#4#5#6{%
+ \beginscope%
+ \localize\_regA%
+ \edef\_regA##1##2{%
+ {\noexpand\_add{\noexpand\_add{\noexpand\_multiply{#1}{##1}}{\noexpand\_multiply{#3}{##2}}}{#5}}% #1 * ##1 + #3 * ##2 + #5
+ {\noexpand\_add{\noexpand\_add{\noexpand\_multiply{#2}{##1}}{\noexpand\_multiply{#4}{##2}}}{#6}}% #2 * ##1 + #4 * ##2 + #6
+ }%
+ \macrostackpush{affinetransstack}\_regA%
+ \_xp\_xp\_xp\_pdfdraw_postaddtransform\macrostackget{affinetransstack}{\macrostackpointer{affinetransstack}}%
+ \endscope%
+}
+
+\def\_pdfdraw_setaffinetransform#1#2#3#4#5#6{%
+ \beginscope%
+ \localize\_regA%
+ \edef\_regA##1##2{%
+ {\noexpand\_add{\noexpand\_add{\noexpand\_multiply{#1}{##1}}{\noexpand\_multiply{#3}{##2}}}{#5}}% #1 * ##1 + #3 * ##2 + #5
+ {\noexpand\_add{\noexpand\_add{\noexpand\_multiply{#2}{##1}}{\noexpand\_multiply{#4}{##2}}}{#6}}% #2 * ##1 + #4 * ##2 + #6
+ }%
+ \macrostackpush{affinetransstack}\_regA%
+ \_xp\_xp\_xp\_pdfdraw_settransform\macrostackget{affinetransstack}{\macrostackpointer{affinetransstack}}%
+ \endscope%
+}
+
+%\def\_pdfdraw_addaffinetransform#1#2#3#4{%
+% \def\_regA##1##2{%
+% {\_add{\_multiply{#1}{##1}}{\_multiply{#3}{##2}}}% #1 * ##1 + #3 * ##2
+% {\_add{\_multiply{#2}{##1}}{\_multiply{#4}{##2}}}% #2 * ##1 + #4 * ##2
+% }%
+% \macrostackpush{affinetransstack}\_regA%
+% \_xp\_xp\_xp\_pdfdraw_addtransform\macrostackget{affinetransstack}{\macrostackpointer{affinetransstack}}%
+%}
+
+\def\_pdfdraw_popaffinetransform{%
+ \macrostackdecrement{affinetransstack}%
+ \_pdfdraw_poptransform%
+}
+
+\newdimen\_pdfdraw_width \newdimen\_pdfdraw_negwidth
+\newdimen\_pdfdraw_height \newdimen\_pdfdraw_depth
+\def\_pdfdraw_strokewidth{.6}
+
+\def\_pdfdraw_updatedimens#1#2{%
+ \ifdim #1pt > \_pdfdraw_width %
+ \global\_pdfdraw_width=#1pt%
+ \else\ifdim #1pt < \_pdfdraw_negwidth %
+ \global\_pdfdraw_negwidth=#1pt%
+ \fi\fi%
+ \ifdim #2pt > \_pdfdraw_height %
+ \global\_pdfdraw_height=#2pt%
+ \else\ifdim #2pt < \_pdfdraw_depth %
+ \global\_pdfdraw_depth=#2pt
+ \fi\fi%
+}
+
+\def\__pdfdraw_updatedimens_list#1#2{%
+ \_pdfdraw_updatedimens{#1}{#2}%
+ \_pdfdraw_updatedimens_list%
+}
+
+\def\_pdfdraw_updatedimens_list#1{%
+ \ifx\_nul#1%
+ \else%
+ \_afterfi{\expanded{\noexpand\__pdfdraw_updatedimens_list\_pdfdraw_transform#1}}%
+ \fi%
+}
+
+\def\_pdfdraw_def_param_text#1{###1}
+\def\_pdfdraw_def_pass_text#1{{###1}}
+\def\_pdfdraw_def_point_text#1{{{###1}{##\the\numexpr #1+1\relax}}}
+
+%\def\_pdfdraw_drawing_def#1#2{%
+% \expanded{%
+% \unexpanded{\_xp\def\csname \_mstrip#1 at draw\endcsname}\_varrepeat{1}{\numexpr #2+2\relax}{1}>\_pdfdraw_def_param_text{%
+% \pdfliteral{q ##1
+% \unexpanded{#1}\_varrepeat{3}{\numexpr #2+2\relax}{1}>\_pdfdraw_def_pass_text%
+% \unexpanded{\_pdfdraw_updatedimens_list}\_varrepeat{3}{\numexpr #2+2\relax}{2}>\_pdfdraw_def_point_text\_nul\_space%
+% ##2
+% Q}%
+% }%
+% }%
+%}
+%
+%\_pdfdraw_drawing_def\_pdfdraw_moveto2
+%\_pdfdraw_drawing_def\_pdfdraw_lineto2
+%\_pdfdraw_drawing_def\_pdfdraw_bezierv4
+%\_pdfdraw_drawing_def\_pdfdraw_bezierc6
+
+\newbox\_pdfdrawbox
+\def\bdrawing{\bgroup%
+ \_pdfdraw_width=\z@ \_pdfdraw_negwidth=\z@%
+ \_pdfdraw_height=\z@ \_pdfdraw_depth=\z@%
+ \setbox\_pdfdrawbox=\vbox\bgroup%
+ \offinterlineskip%
+}
+
+\def\edrawing{%
+ \egroup%
+ {\offinterlineskip
+ \hbox{%
+ \vtop to\dimexpr\_pdfdraw_height - \_pdfdraw_depth\relax{%
+ \vfil%
+ \hbox to\dimexpr\_pdfdraw_width - \_pdfdraw_negwidth\relax{%
+ \kern-\_pdfdraw_negwidth\box\_pdfdrawbox\hfil%
+ }%
+ \kern-\_pdfdraw_depth%
+ }%
+ }}%
+ \egroup%
+}
+
+\def\coordhbuf{3pt}
+\def\coordvbuf{0pt}
+
+\def\_addnode#1#2#3#4{%
+ \setbox0=\hbox{#3}%
+ \_xp\xdef\csname point@#4.left\endcsname{\_nopt{#1pt - .5\wd0 - \coordhbuf}}%
+ \_xp\xdef\csname point@#4.top\endcsname{\_nopt{#2pt + .5\ht0 + .5\dp0 + \coordvbuf}}%
+ \_xp\xdef\csname point@#4.right\endcsname{\_nopt{#1pt + .5\wd0 + \coordhbuf}}%
+ \_xp\xdef\csname point@#4.bottom\endcsname{\_nopt{#2pt - .5\ht0 - .5\dp0 - \coordvbuf}}%
+ \_xp\xdef\csname point@#4.xcenter\endcsname{\_nopt{#1pt}}%
+ \_xp\xdef\csname point@#4.ycenter\endcsname{\_nopt{#2pt}}%
+ \_pdfdraw_updatedimens{\csname point@#4.left\endcsname}{\csname point@#4.top\endcsname}%
+ \_pdfdraw_updatedimens{\csname point@#4.right\endcsname}{\csname point@#4.bottom\endcsname}%
+ \vbox to\z@{%
+ \vss%
+ \hbox to\z@{%
+ \kern\dimexpr #1pt - .5\wd0\relax%
+ \copy0%
+ \hss%
+ }%
+ \kern\dimexpr #2pt - .5\ht0 - .5\dp0\relax%
+ }%
+}
+
+\def\addnode#1#2#3#4{{%
+ \_xp\_addnode\expanded{\_pdfdraw_transform{#2}{#3}}{#1}{#4}%
+}}
+
+\def\_getcoordvalue#1{%
+ \ifcsname point@#1\endcsname%
+ \csname point@#1\endcsname%
+ \else%
+ #1%
+ \fi%
+}
+
+\def\_unpackinternalcoords#1#2#3#4{%
+ \def#1{#3}%
+ \def#2{#4}%
+}
+
+\def\_gettransformedcoords#1#2#3#4{%
+ \expanded{\unexpanded{\_unpackinternalcoords{#1}{#2}}\_pdfdraw_transform{#3}{#4}}%
+}
+
+%\_pdfdraw_addaffinetransform{0.707}{0.707}{-0.707}{0.707}{100}{0}
+\_pdfdraw_addaffinetransform{1.5}{0}{0}{1.5}{0}{0}
+
+\def\_unpackcoords#1#2#3,#4\_nul{%
+ \def#1{\_id#3}%
+ \def#2{\_id#4}%
+}
+
+\def\@pathinsert{}
+
+% #1,#2 -> from, #3,#4 -> to, #5,#6 -> offset, #7,#8 -> caps, #9 -> color
+\def\drawpath#1#2#3#4#5#6#7#8#9{%
+ \edef\_regA{\_nopt{\_getcoordvalue{\_id#1}pt + #5}}%
+ \edef\_regB{\_nopt{\_getcoordvalue{\_id#2}pt + #6}}%
+ \edef\_regC{\_nopt{\_getcoordvalue{\_id#3}pt + #5}}%
+ \edef\_regD{\_nopt{\_getcoordvalue{\_id#4}pt + #6}}%
+ %\computesqrt{\_add{\_square{\_subtract{\_regC}{\_regA}}}{\_square{\_subtract{\_regD}{\_regB}}}}\_regF\_regE%
+ \evaldef\_regF{\SQRT{(\_regC-\_regA)^2 + (\_regD-\_regB)^2}}%
+ \ifdim\_regF pt=\z@ %
+ \def\_regE{99999}%
+ \else%
+ \evaldef\_regE{1/ \_regF}%
+ \fi%
+ \pdfliteral{%
+ q
+ \_pdfdraw_strokewidth\_space w
+ 1 j 1 J
+ \_getcolor{}{#9}
+ }%
+ \_pdfdraw_setaffinetransform%
+ {\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}{\_multiply{\_subtract{\_regD}{\_regB}}{\_regE}}%
+ {\_multiply{\_subtract{\_regB}{\_regD}}{\_regE}}{\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}%
+ {\_regA}{\_regB}%
+ \pdfliteral{\csname linecap@#7\endcsname}%
+ \_pdfdraw_popaffinetransform%
+ \pdfliteral{
+ q
+ \@pathinsert\_space
+ \_multiply{\_subtract{\_regC}{\_regA}}{\_regE} \_multiply{\_subtract{\_regD}{\_regB}}{\_regE}
+ \_multiply{\_subtract{\_regB}{\_regD}}{\_regE} \_multiply{\_subtract{\_regC}{\_regA}}{\_regE}
+ \_regA\_space\_regB\_space cm
+ \csname linecap@#7 at wd\endcsname\_space 0 m
+ \_nopt{\_regF pt - \csname linecap@#8 at wd\endcsname pt} 0 l
+ S
+ Q
+ }%
+ \_pdfdraw_setaffinetransform%
+ {\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}{\_multiply{\_subtract{\_regD}{\_regB}}{\_regE}}%
+ {\_multiply{\_subtract{\_regB}{\_regD}}{\_regE}}{\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}%
+ {\_regC}{\_regD}%
+ \_pdfdraw_addaffinetransform{1}{0}{0}{1}{-\csname linecap@#8 at wd\endcsname}{0}%
+ \pdfliteral{
+ \csname linecap@#8\endcsname
+ Q
+ }%
+ \_pdfdraw_popaffinetransform%
+ \_pdfdraw_popaffinetransform%
+}
+
+\def\_unpackdouble#1#2#3#4{%
+ \def#1{#3}%
+ \def#2{#4}%
+}
+
+% #1,#2 -> from, #3,#4 -> to, #5 -> offset, #6 -> curve, #7,#8 -> caps, #9 -> color
+\def\drawbezier#1#2#3#4#5#6#7#8#9{%
+ \_unpackdouble\_regE\_regF#5%
+ \edef\_regA{\_nopt{\_getcoordvalue{\_id#1}pt + \_regE}}%
+ \edef\_regB{\_nopt{\_getcoordvalue{\_id#2}pt + \_regF}}%
+ \edef\_regC{\_nopt{\_getcoordvalue{\_id#3}pt + \_regE}}%
+ \edef\_regD{\_nopt{\_getcoordvalue{\_id#4}pt + \_regF}}%
+ %\computesqrt{\_add{\_square{\_subtract{\_regC}{\_regA}}}{\_square{\_subtract{\_regD}{\_regB}}}}\_regF\_regE%
+ \evaldef\_regF{\SQRT{(\_regC-\_regA)^2 + (\_regD-\_regB)^2}}%
+ \ifdim\_regF pt=\z@ %
+ \def\_regE{0}%
+ \else%
+ \evaldef\_regE{1/ \_regF}%
+ \fi%
+ \pdfliteral{%
+ q
+ \_pdfdraw_strokewidth\_space w
+ 1 j 1 J
+ \_getcolor{}{#9}
+ }%
+ \_pdfdraw_setaffinetransform%
+ {\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}{\_multiply{\_subtract{\_regD}{\_regB}}{\_regE}}%
+ {\_multiply{\_subtract{\_regB}{\_regD}}{\_regE}}{\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}%
+ {\_regA}{\_regB}%
+ \pdfliteral{\csname linecap@#7\endcsname}%
+ \_pdfdraw_popaffinetransform%
+ \pdfliteral{
+ q
+ \@pathinsert\_space
+ \_multiply{\_subtract{\_regC}{\_regA}}{\_regE} \_multiply{\_subtract{\_regD}{\_regB}}{\_regE}
+ \_multiply{\_subtract{\_regB}{\_regD}}{\_regE} \_multiply{\_subtract{\_regC}{\_regA}}{\_regE}
+ \_regA\_space\_regB\_space cm
+ \csname linecap@#8 at wd\endcsname\_space 0 m
+ \_nopt{.5\dimexpr\_regF pt - \csname linecap@#8 at wd\endcsname pt\relax} \_nopt{#6} \_nopt{\_regF pt - \csname linecap@#8 at wd\endcsname pt} 0 v
+ S
+ Q
+ }%
+ \_pdfdraw_setaffinetransform%
+ {\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}{\_multiply{\_subtract{\_regD}{\_regB}}{\_regE}}%
+ {\_multiply{\_subtract{\_regB}{\_regD}}{\_regE}}{\_multiply{\_subtract{\_regC}{\_regA}}{\_regE}}%
+ {\_regC}{\_regD}%
+ \_pdfdraw_addaffinetransform{1}{0}{0}{1}{-\csname linecap@#8 at wd\endcsname}{0}%
+ \pdfliteral{
+ \csname linecap@#8\endcsname
+ Q
+ }%
+ \_pdfdraw_popaffinetransform%
+ \_pdfdraw_popaffinetransform%
+}
+
+\def\definelinecap#1#2#3{%
+ \_xp\def\csname linecap@#1\endcsname{#2}%
+ \_xp\edef\csname linecap@#1 at wd\endcsname{#3}%
+}
+
+\definelinecap{-}{}{0}
+
+\definelinecap{>}{%
+ \_pdfdraw_moveto{0}{0} \_pdfdraw_lineto{4}{0} \_pdfdraw_lineto{2}{1} \_pdfdraw_moveto{4}{0} \_pdfdraw_lineto{2}{-1}
+ S
+}{4}
+
+\definelinecap{<}{%
+ \_pdfdraw_moveto{4}{0} \_pdfdraw_lineto{0}{0} \_pdfdraw_lineto{2}{1} \_pdfdraw_moveto{0}{0} \_pdfdraw_lineto{2}{-1}
+ S
+}{4}
+
+\definelinecap{|-}{%
+ \_pdfdraw_moveto{0}{-1} \_pdfdraw_lineto{0}{1} \_pdfdraw_moveto{0}{0} \_pdfdraw_lineto{4}{0}
+ S
+}{4}
+
+\definelinecap{-|}{%
+ \_pdfdraw_moveto{4}{-1} \_pdfdraw_lineto{4}{1} \_pdfdraw_moveto{4}{0} \_pdfdraw_lineto{0}{0}
+ S
+}{4}
+
+\definelinecap{>>}{%
+ \_pdfdraw_moveto{0}{0} \_pdfdraw_lineto{4}{0}
+ \_pdfdraw_moveto{2}{0} \_pdfdraw_lineto{0}{1} \_pdfdraw_moveto{2}{0} \_pdfdraw_lineto{0}{-1}
+ \_pdfdraw_moveto{4}{0} \_pdfdraw_lineto{2}{1} \_pdfdraw_moveto{4}{0} \_pdfdraw_lineto{2}{-1}
+ S
+}{4}
+
+\definelinecap{<<}{%
+ \_pdfdraw_moveto{4}{0} \_pdfdraw_lineto{0}{0}
+ \_pdfdraw_moveto{2}{0} \_pdfdraw_lineto{4}{1} \_pdfdraw_moveto{2}{0} \_pdfdraw_lineto{4}{-1}
+ \_pdfdraw_moveto{0}{0} \_pdfdraw_lineto{2}{1} \_pdfdraw_moveto{0}{0} \_pdfdraw_lineto{2}{-1}
+ S
+}{4}
+
+\definelinecap{o}{%
+ \_pdfdraw_circle{1}{0}{1} S
+}{2}
+
+\definelinecap{8=D}{%
+ \_pdfdraw_circle{1}{1}{1} \_pdfdraw_circle{1}{-1}{1}
+ \_pdfdraw_moveto{2}{1} \_pdfdraw_lineto{5}{1}
+ \_pdfdraw_bezierv{6}{1}{6}{0} \_pdfdraw_bezierv{6}{-1}{5}{-1}
+ \_pdfdraw_lineto{2}{-1} S
+}{6}
+
+\definelinecap{c=8}{%
+ \_pdfdraw_circle{5}{1}{1} \_pdfdraw_circle{5}{-1}{1}
+ \_pdfdraw_moveto{4}{1} \_pdfdraw_lineto{1}{1}
+ \_pdfdraw_bezierv{0}{1}{0}{0} \_pdfdraw_bezierv{0}{-1}{1}{-1}
+ \_pdfdraw_lineto{4}{-1} S
+}{6}
+
+\def\diagrowbuf{10pt}
+\def\diagcolbuf{10pt}
+\def\diagrowheight{.5cm}
+\def\diagcolwidth{.5cm}
+
+\def\_getdiagdimens{%
+ \unless\ifnum\_ptbcountB<\_ptbcountC%
+ \_xp\glet\csname diag at col@\the\_ptbcountB @wd\endcsname=\diagcolwidth%
+ \fi%
+ \ifnum\_ptbcountB=1 %
+ \_xp\glet\csname diag at row@\the\_ptbcountA @ht\endcsname=\diagrowheight%
+ \fi%
+ \ifdim\csname diag at col@\the\_ptbcountB @wd\endcsname<\wd\_ptbboxA%
+ \_xp\xdef\csname diag at col@\the\_ptbcountB @wd\endcsname{\the\wd\_ptbboxA}%
+ \fi%
+ \ifdim\csname diag at row@\the\_ptbcountA @ht\endcsname<\dimexpr\ht\_ptbboxA + \dp\_ptbboxA\relax%
+ \_xp\xdef\csname diag at row@\the\_ptbcountA @ht\endcsname{\the\dimexpr\ht\_ptbboxA+\dp\_ptbboxA\relax}%
+ \fi%
+ \global\advance\_ptbcountB by 1\relax%
+}
+
+%\def\_placediagcell{%
+% \vbox to\csname diag at row@\the\_ptbcountA @ht\endcsname{%
+% \offinterlineskip%
+% \vfil%
+% \hbox to\csname diag at col@\the\_ptbcountB @wd\endcsname{\hfil\box\_ptbboxA\hfil}%
+% \vfil
+% }%
+% \global\advance\_ptbcountB by 1\relax%
+%}
+
+\def\_placediagcell{%
+ \addnode{\box\_ptbboxA}%
+ {\_nopt{\csname diag at col@\the\_ptbcountB @off\endcsname}}%
+ {\_nopt{\csname diag at row@\the\_ptbcountA @off\endcsname}}%
+ {(\the\_ptbcountA, \the\_ptbcountB)}%
+ \global\advance\_ptbcountB by 1\relax%
+}
+
+\def\_setrowoffset#1{%
+ \_xp\xdef\csname diag at row@#1 at off\endcsname%
+ {\the\dimexpr\csname diag at row@\the\numexpr#1+1\relax @off\endcsname + .5\dimexpr\csname diag at row@#1 at ht\endcsname + \csname diag at row@\the\numexpr #1+1\relax @ht\endcsname\relax + \diagrowbuf\relax}%
+}
+
+\def\_setcoloffset#1{%
+ \_xp\xdef\csname diag at col@#1 at off\endcsname%
+ {\the\dimexpr\csname diag at col@\the\numexpr#1-1\relax @off\endcsname + .5\dimexpr\csname diag at col@#1 at wd\endcsname + \csname diag at col@\the\numexpr #1-1\relax @wd\endcsname\relax + \diagcolbuf\relax}%
+}
+
+\def\_getcelloffsets{%
+ \_xp\def\csname diag at col@0 at wd\endcsname{0pt}%
+ \_xp\def\csname diag at col@0 at off\endcsname{-\diagcolbuf}%
+ \_xp\def\csname diag at row@\the\_ptbcountA @ht\endcsname{0pt}%
+ \_xp\def\csname diag at row@\the\_ptbcountA @off\endcsname{-\diagrowbuf}%
+ \_varrepeat{\the\numexpr\_ptbcountA-1\relax}{1}{-1}<{\_setrowoffset}%
+ \_prepeat{\the\numexpr\_ptbcountC-1\relax}{\_setcoloffset}%
+}
+
+\def\diagrowbuf{5pt}
+
+\def\drawdiagram#1#2{$\vcenter{{
+ \offinterlineskip%
+ \_ptbcountA=\z@ \_ptbcountB=\z@ \_ptbcountC=\z@%
+ \everycr={\noalign{%
+ \global\advance\_ptbcountA by 1\relax%
+ \ifnum\_ptbcountB>\_ptbcountC%
+ \global\_ptbcountC=\_ptbcountB%
+ \fi%
+ \global\_ptbcountB=1\relax%
+ }}%
+ \halign{&\setbox\_ptbboxA=\hbox{\strut##}\_getdiagdimens\crcr
+ #1\crcr
+ }%
+ \_getcelloffsets%
+ \_ptbcountA=\z@ \_ptbcountB=\z@%
+ \bdrawing%
+ \tabskip=0pt\relax%
+ \halign{&\setbox\_ptbboxA=\hbox{\strut##}\_placediagcell\crcr
+ #1\crcr
+ }%
+ #2%
+ \edrawing%
+}}$}
+
+ % #1,#2 -> from, #3,#4 -> to, #5,#6 -> offsets, #7 -> curve
+\def\_diagarrow#1#2#3#4#5#6#7#8#9{%
+ \ifnum#2<#4 %
+ \def\_oxplace{right}%
+ \def\_dxplace{left}%
+ \else\ifnum#2>#4 %
+ \def\_oxplace{left}%
+ \def\_dxplace{right}%
+ \else
+ \def\_oxplace{xcenter}%
+ \def\_dxplace{xcenter}%
+ \fi\fi%
+ \ifnum#1<#3 %
+ \def\_oyplace{bottom}%
+ \def\_dyplace{top}%
+ \else\ifnum#1>#3 %
+ \def\_oyplace{top}%
+ \def\_dyplace{bottom}%
+ \else
+ \def\_oyplace{ycenter}%
+ \def\_dyplace{ycenter}%
+ \fi\fi%
+ \unless\ifx\novalue#8%
+ \expanded{\unexpanded{\_unpackcoords\_oxplace\_oyplace}#8}\_nul%
+ \fi%
+ \unless\ifx\novalue#9%
+ \expanded{\unexpanded{\_unpackcoords\_dxplace\_dyplace}#9}\_nul%
+ \fi%
+ \ifx#7\novalue%
+ \_afterfi{\drawpath{(#1, #2).\_oxplace}{(#1, #2).\_oyplace}{(#3, #4).\_dxplace}{(#3, #4).\_dyplace}{#5}{#6}}%
+ \else%
+ \_afterfi{\drawbezier{(#1, #2).\_oxplace}{(#1, #2).\_oyplace}{(#3, #4).\_dxplace}{(#3, #4).\_dyplace}{{#5}{#6}}{#7}}%
+ \fi%
+}
+
+% #1,#2 -> from #3,#4 -> to #5 -> text #6,#7 -> distance #8 -> slide
+\def\_drawtext#1#2#3#4#5#6#7#8{{%
+ \setbox0=\hbox{#5}%
+ \def\_ox{\_getcoordvalue{(#1, #2).xcenter}pt}%
+ \def\_oy{\_getcoordvalue{(#1, #2).ycenter}pt}%
+ \def\_dx{\_getcoordvalue{(#3, #4).xcenter}pt}%
+ \def\_dy{\_getcoordvalue{(#3, #4).ycenter}pt}%
+ \edef\_xplace{\the\dimexpr\_ox + #8\dimexpr \_dx-\_ox\relax + #6 - .5\wd0\relax}%
+ \edef\_yplace{\the\dimexpr\_oy + #8\dimexpr \_dy-\_oy\relax + #7 - .5\ht0\relax}%
+ \vbox to\z@{\vss\hbox to\z@{\kern\_xplace\box0\hss}\kern\_yplace}%
+}}
+
+\def\diagarrow#1{%
+ \mapkeys{%
+ from={%
+ name=_from,
+ required%
+ },
+ to={%
+ name=_to,
+ required%
+ },
+ left cap={%
+ name=_lcap,
+ default=-%
+ },
+ right cap={%
+ name=_rcap,
+ default=>%
+ },
+ color={%
+ name=_clr,
+ default=black,
+ definition=\edef%
+ },
+ x off={%
+ name=_xoff,
+ default=0pt%
+ },
+ y off={%
+ name=_yoff,
+ default=0pt%
+ },
+ text={%
+ name=_txt,
+ default=\novalue%
+ },
+ x distance={
+ name=_dst,
+ default=0pt%
+ },
+ y distance={
+ name=_ydst,
+ default=0pt%
+ },
+ slide={
+ name=_slide,
+ default=.5%
+ },
+ curve={
+ name=_crv,
+ default=\novalue%
+ },
+ dashed={
+ name=_dashed,
+ default=\novalue%
+ },
+ dotted={
+ name=_dotted,
+ default=\novalue%
+ },
+ origin orient={
+ name=_oorient,
+ default=\novalue%
+ },
+ dest orient={
+ name=_dorient,
+ default=\novalue%
+ }%
+ }{#1}%
+ \unless\ifx\_dashed\novalue%
+ \ifx\_dashed\empty%
+ \gdef\@pathinsert{[2] 0 d}
+ \else%
+ \expanded{\unexpanded{\_unpackcoords\_dA\_dB}\_dashed}\_nul%
+ \gdef\@pathinsert{[\_dA\_space\_dB] 0 d}%
+ \fi%
+ \fi%
+ \unless\ifx\_dotted\novalue%
+ \gdef\@pathinsert{[.1 1.5] 0 d}%
+ \fi%
+ \expanded{\unexpanded{\_unpackcoords\_fromx\_fromy}\_from}\_nul%
+ \expanded{\unexpanded{\_unpackcoords\_tox\_toy}\_to}\_nul%
+ \_diagarrow{\_fromx}{\_fromy}{\_tox}{\_toy}{\_xoff}{\_yoff}{\_crv}{\_oorient}{\_dorient}{\_lcap}{\_rcap}{\_clr}%
+ \unless\ifx\_txt\novalue%
+ \_drawtext{\_fromx}{\_fromy}{\_tox}{\_toy}{\_txt}{\_dst}{\_ydst}{\_slide}%
+ \fi%
+ \gdef\@pathinsert{}%
+}
+
+\def\_shit{
+ q
+ 1 w
+ .6 .2 0 rg
+ 1 J 1 j
+ -13 -18 m
+ -16 -19 -17 -20 v
+ -18 -20 -18 -25 v
+ -17 -27 -16 -28 v
+ 16 -28 l
+ 17 -27 18 -25 v
+ 18 -20 17 -20 v
+ 16 -19 13 -18 v
+ B
+ -6 -12 m
+ -10 -13 -12 -15 v
+ -13 -17 -13 -18 v
+ -12 -20 -10 -20 v
+ 10 -20 l
+ 12 -20 13 -18 v
+ 13 -17 12 -15 v
+ 10 -13 6.5 -12 v
+ B
+ 0 0 m
+ -1 -5 -6 -10 v
+ -7 -12 -4 -13 v
+ 0 -14 4 -13 v
+ 7 -12 6 -7 v
+ 6 -5 5 -3 0 0 c
+ b
+ Q
+}
+
+\edef\_fpwd{\_noptfloor\pdfpagewidth}
+\edef\_fpht{\_noptfloor\pdfpageheight}
+
+\def\_draw_shit{%
+ \pdfliteral page{
+ q
+ 1 0 0 1 \pdfuniformdeviate\_fpwd\_space\_space\pdfuniformdeviate\_fpht\_space\_space cm
+ \_shit\_space
+ Q
+ }
+}
+
+\def\eatshit{%
+ \pdfliteral page{q 1 1 0 rg 0 0 \_nopt\pdfpagewidth\_space\_nopt\pdfpageheight\_space re f Q}%
+ \_repeat{100}\_draw_shit%
+}
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-pdfdraw.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-syntax-hi.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-syntax-hi.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-syntax-hi.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,253 @@
+\input ptb-pdfGraphics
+\input ptb-pdfData
+
+\createarray{catcodes}
+\createarray{colors}
+\createarray{swapped}
+\createarray{initcolors}
+\appendarraymanyvalued{catcodes}{0}{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_}
+\appendarraymanyvalued{colors}{rgb{1 0 0}}{{fun}{let}{_prim_print}{def}{if}{for}{int}{float}{double}{short}{char}{long}{while}{main}{printf}{return}{exit}}
+\appendarraymanyvalued{colors}{rgb{0 .8 0}}{1234567890}
+\appendarraymanyvalued{colors}{rgb{1 0 0}}{{pt}{cm}{in}{mu}{sp}}
+%\appendarraymanyvalued{colors}{.2 0 0}{*+-<>=}
+
+\def\_nextother{\_nextother}
+\appendarray{swapped}{{ }{\_syntaxspace}}
+\appendarray{swapped}{{`}{\backtick}}
+\chardef\backtick=0
+\appendarray{swapped}{{:}{$\mathop{:}$}}
+\appendarray{swapped}{{-}{$\vcenter{\hbox{\tt-}}$}}
+\bgroup\catcode`\^^I=11\relax\lowercase{\egroup\appendarray{swapped}{{^^I}{\hiindent}}}
+\bgroup\catcode`\^^M=11\relax\lowercase{\egroup\appendarray{swapped}{{^^M}{%
+ \par\egroup\_output_box%
+ \setbox\_outputbox=\vtop\bgroup%
+ \hsize=\dimexpr\hsize - \leftskip - \rightskip - \_output_indent - 15pt - \@numhskip\relax%
+ \hangindent=.5cm\relax \hangafter=1\relax%
+ \raggedright%
+ \baselineskip=15pt%
+ \tolerance=10000\relax \hbadness=10000\relax%
+ \_tokcount=0\relax%
+ \quitvmode%
+}}}
+\bgroup\lccode`\?=`\\ \lowercase{\egroup\appendarray{catcodes}{{?}{-1}}}
+\bgroup\lccode`\?=`\\ \lowercase{\egroup\appendarray{initcolors}{{?}{\_nextother}{rgb{1 0 0}}}}
+\bgroup\lccode`\?=`\# \lowercase{\egroup\appendarray{colors}{{?}{rgb{0 .3 0}}}}
+\bgroup\lccode`\?=`\& \lowercase{\egroup\appendarray{colors}{{?}{rgb{0 .8 0}}}}
+%\bgroup\lccode`\?=`\% \catcode`\^^M=11\relax\lowercase{\egroup\appendarray{initcolors}{{?}{^^M}{rgb{.6 .7 .6}}}}
+\appendarray{initcolors}{{"}{"}{rgb{.6 .6 .3}}}
+
+
+\newif\ifstrequals
+\def\_ifstrequals#1#2{%
+ \edef\_regA{\detokenize{#1}}\edef\_regB{\detokenize{#2}}%
+ \ifx\_regA\_regB \strequalstrue\else\strequalsfalse\fi%
+}
+
+\long\def\_get_second_conditionally#1#2#3#4{%
+ \_ifstrequals{#2}{#3}%
+ \ifstrequals%
+ \def#1{#4}%
+ \fi%
+}
+
+\long\def\_get_second_third_conditionally#1#2#3#4#5#6{%
+ \_ifstrequals{#3}{#4}%
+ \ifstrequals%
+ \def#1{#5}%
+ \def#2{#6}%
+ \fi%
+}
+
+\def\_get_catcode#1{%
+ \def\_catcode{1}%
+ \long\def\_arr_index##1{\_get_second_conditionally\_catcode{#1}##1}%
+ \executearray{catcodes}%
+}
+
+\def\_get_initcolor#1{%
+ \let\_initcolor=\_nul%
+ \let\_end_initcolor=\_nul%
+ \long\def\_arr_index##1{\_get_second_third_conditionally\_end_initcolor\_initcolor{#1}##1}%
+ \executearray{initcolors}%
+}
+
+\newcount\_tokcount
+\newtoks\_currtoken
+\newtoks\_currprinttoken
+\newif\ifpotentialescape
+
+\def\_catcode_normal{0}
+\def\_catcode_potential_escape{-1}
+\def\_potential_escape_token{endhi}
+
+\def\_get_next_tok#1#2{%
+ \advance\_tokcount by 1\relax%
+ \global\let\_next=\_get_next_tok%
+ \_get_catcode{#2}%
+ \ifstrcases{\_catcode}%
+ \_catcode_normal{%
+ \_currtoken\_xp{\the\_currtoken#2}%
+ \_currprinttoken\_xp{\the\_currprinttoken#2\allowbreak}%
+ }%
+ \_catcode_potential_escape{%
+ \ifpotentialescape%
+ \_print{\_potential_escape_char}{\_potential_escape_char}%
+ \_print{\the\_currprinttoken}{\the\_currtoken}%
+ \_print{#2\allowbreak}{#2}%
+ \_currtoken={}%
+ \_currprinttoken={}%
+ \potentialescapefalse%
+ \else%
+ \_print{\the\_currprinttoken\allowbreak}{\the\_currtoken}%
+ \_currtoken={}%
+ \_currprinttoken={}%
+ \def\_potential_escape_char{#2}%
+ \potentialescapetrue%
+ \fi%
+ }%
+ \default{%
+ \ifpotentialescape%
+ \expanded{\unexpanded{\_ifstrequals}{\the\_currtoken}{\_potential_escape_token}}%
+ \ifstrequals%
+ \gdef\_next{\_xp\endhi\_gobble}%
+ \else%
+ \potentialescapefalse%
+ \_print{\_potential_escape_char}{\_potential_escape_char}%
+ \_xp\_ifstrequals\_xp{\the\_currtoken}{}%
+ \unless\ifstrequals \_print{\the\_currprinttoken}{\the\_currtoken}\fi%
+ \_print{#2}{#2}%
+ \_currtoken={}%
+ \_currprinttoken={}%
+ \fi%
+ \else%
+ \_xp\_ifstrequals\_xp{\the\_currtoken}{}%
+ \unless\ifstrequals \_print{\the\_currprinttoken}{\the\_currtoken}\fi%
+ \_print{#2}{#2}%
+ \_currtoken={}%
+ \_currprinttoken={}%
+ \fi%
+ }%
+ \endifcases%
+ \_next{}%
+}
+
+%\def\color#1#2{\pdfliteral{#1 rg #1 RG}#2\pdfliteral{0 0 0 rg 0 0 0 RG}}
+
+\newif\ifcolorinit
+\colorinitfalse
+\def\_print_token#1#2{%
+ \def\_tok_swap{#1}%
+ \long\def\_arr_index##1{\_get_second_conditionally\_tok_swap{#2}##1}%
+ \executearray{swapped}%
+ \ifcolorinit%
+ {\_xp\_setcolor\_xp{\_xp}\_xp{\_nextcolor}\_tok_swap}%
+ \unless\ifx\_end_initcolor\undefined%
+ \ifx\_nextother\_end_initcolor%
+ \global\colorinitfalse%
+ \else%
+ \_xp\_ifstrequals\_xp{\_end_initcolor}{#2}%
+ \ifstrequals%
+ \global\colorinitfalse%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \_get_initcolor{#2}%
+ \unless\ifx\_initcolor\_nul%
+ {\_xp\_setcolor\_xp{\_xp}\_xp{\_initcolor}\_tok_swap}%
+ \global\let\_nextcolor=\_initcolor%
+ \global\let\_end_initcolor=\_end_initcolor%
+ \global\colorinittrue%
+ \else%
+ \let\_tok_color=\_nul%
+ \long\def\_arr_index##1{\_get_second_conditionally\_tok_color{#2}##1}%
+ \executearray{colors}%
+ \ifx\_tok_color\_nul \_tok_swap\else{\_xp\_setcolor\_xp{\_xp}\_xp{\_tok_color}\_tok_swap}\fi%
+ \fi%
+ \fi%
+}
+
+\def\_print#1#2{%
+ \def\_print_temp{#1}%
+ \_xp\_print_token\_xp\_print_temp\_xp{#2}%
+}
+
+\newbox\_hibox
+\long\def\_beginhi#1{\bgroup%
+ \tt%
+ \frenchspacing%
+ \def\do##1{\catcode`##1=11\relax}\dospecials%
+ \catcode`\^^M=11%
+ \catcode`\^^I=11%
+ #1%
+ \setbox\_hibox=\vbox\bgroup%
+ \kern\_output_indent%
+ \lineskiplimit=0pt%
+ \lineskip=0pt%
+ \parindent=0pt%
+ %\setbox\_outputbox=\hbox\bgroup%
+ \setbox\_outputbox=\vtop\bgroup%
+ \hsize=\dimexpr\hsize - \leftskip - \rightskip - \_output_indent - 15pt - \@numhskip\relax%
+ \hangindent=.5cm\relax \hangafter=1\relax%
+ \raggedright%
+ \tolerance=10000\relax \hbadness=10000\relax%
+ \_tokcount=0\relax%
+ \quitvmode%
+ \_xp\_get_next_tok\_xp{\_xp}%
+}
+
+\def\beginhi{\_getline\_beginhi}
+
+\def\syntax at buf{0cm}
+\def\syntaxbg{rgb{.1 .1 .1}}
+\def\endhi{%
+ \egroup\egroup%\kern\_output_indent\egroup%
+ \par%
+ \vskip\syntax at buf\relax%
+ \hbox to\dimexpr\wd\_hibox + \_output_indent\relax{%
+ {\_xp\_setcolor\_xp{\_xp}\_xp{\syntaxbg}\vrule height\ht\_hibox width\dimexpr\wd\_hibox+\_output_indent\relax depth\dp\_hibox}%
+ \kern-\wd\_hibox\box\_hibox%
+ }%
+ \par%
+ \box\_hibox%
+ \egroup%
+ \vskip\syntax at buf\relax%
+}
+
+\newbox\_outputbox
+\newcount\outputline
+\newif\ifglobcount
+\def\_output_indent{1pt}
+\def\_output_box{%
+ \ifglobcount%
+ \global\advance\outputline by 1%
+ \else%
+ \advance\outputline by 1%
+ \fi%
+ %\hbox to\dimexpr\hsize - \leftskip - \rightskip - \_output_indent\relax{%
+ \hbox{%
+ \_output_line_number{\the\outputline}\strut\box\_outputbox%
+ }%
+ \kern\_output_indent%
+}
+
+\font\eighttt=cmtt8
+\def\@numhskip{1em}
+\def\_output_line_number#1{\hbox to15pt{\eighttt\hfil#1}\hskip\@numhskip}
+
+
+\font\threett=cmtt8 at 5pt
+{\setbox0=\hbox{\tt\ \ \ \ }\xdef\hiindent at width{\the\wd0}}
+{\setbox0=\hbox{\tt\ }\xdef\space at width{\the\wd0}}
+
+\def\hiindent{\quitvmode\hbox to\hiindent at width{\hss$\vcenter{\hbox{\threett>}}$\hss}}
+\def\hiindent{\ \ \ \ \_iffirstchar{\advance\hangindent by\hiindent at width}}
+\def\_syntaxspace{\ \_iffirstchar{\advance\hangindent by\space at width}}
+
+\def\_iffirstchar#1{%
+ \ifnum\_tokcount=1 %
+ \_tokcount=0\relax%
+ #1%
+ \fi%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfGraphics/ptb-syntax-hi.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfToolbox.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfToolbox.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfToolbox.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,26 @@
+\expandafter\edef\csname _ catcode\endcsname{\the\catcode`_}
+\expandafter\edef\csname @ catcode\endcsname{\the\catcode`@}
+
+\let\olduscore=\_
+
+\input ptb-utils
+
+\_checkloaded{pdfToolbox}
+
+\def\pdfToolboxversion{0.1}
+\def\pdfToolboxdate{March, 2025}
+
+\say{This is pdfToolbox, version \pdfToolboxversion (\pdfToolboxdate)}
+
+\input ptb-pdfData
+\input ptb-pdfGraphics
+\input ptb-pdfDstruct
+
+\def\@pdftoolbox[#1]{{\setfontandscale{bf}{#1}\localcolor rgb{1 0 0}{PDF}\localcolor rgb{0 0 1}{\setscale{#1+5pt}T}\localcolor rgb{0 .9 0}{OOLBOX}}}
+\def\pdftoolbox{\@ifnextchar[ \@pdftoolbox {\@pdftoolbox[\dimexpr\currscale-3pt\relax]}}
+
+\let\_=\olduscore
+
+\catcode`_=\csname _ catcode\endcsname
+\catcode`@=\csname @ catcode\endcsname
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/pdfToolbox.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfData.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfData.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfData.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,10 @@
+\input ptb-utils
+\_checkloaded{pdfData}
+
+\input pdfData/ptb-arrays.tex
+\input pdfData/ptb-counters.tex
+\input pdfData/ptb-dictionaries.tex
+\input pdfData/ptb-key-value.tex
+\input pdfData/ptb-mergesort.tex
+\input pdfData/ptb-stack.tex
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfData.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfDstruct.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfDstruct.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfDstruct.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,11 @@
+\input ptb-utils
+\_checkloaded{pdfDstruct}
+
+\input pdfDstruct/ptb-hyperlinks
+\input pdfDstruct/ptb-fonts
+\input pdfDstruct/ptb-hooks
+\input pdfDstruct/ptb-layout
+\input pdfDstruct/ptb-lists
+\input pdfDstruct/ptb-tableofcontents
+\input pdfDstruct/ptb-index
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfDstruct.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfGraphics.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfGraphics.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfGraphics.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,7 @@
+\input ptb-utils
+\_checkloaded{pdfGraphics}
+
+\input pdfGraphics/ptb-colors
+\input pdfGraphics/ptb-colorboxes
+\input pdfGraphics/ptb-pdfdraw
+\input pdfGraphics/ptb-syntax-hi
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-pdfGraphics.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-utils.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-utils.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-utils.tex 2025-03-28 21:30:24 UTC (rev 74772)
@@ -0,0 +1,207 @@
+\catcode`_=11
+\catcode`@=11
+
+\def\_checkloaded#1{%
+ \ifcsname #1\endcsname%
+ \endinput%
+ \else%
+ \expandafter\global\expandafter\let\csname #1\endcsname=\relax%
+ \fi%
+}
+
+\_checkloaded{pdfToolbox-utils}
+
+\let\_xp=\expandafter
+\def\_nul{\_nul}
+\def\_id#1{#1}
+\long\def\_gobble#1{}
+\long\def\_gobbletilnul#1\_nul{}
+\def\_mstrip{\_xp\_gobble\string}
+\def\True{\True}
+\def\False{\False}
+
+\newcount\_ptbcountA \newcount\_ptbcountB \newcount\_ptbcountC
+\newbox\_ptbboxA \newbox\_ptbboxB
+\newdimen\_ptbdimenA \newdimen\_ptbdimenB
+
+\def\glet{\global\let}
+
+\def\_xplet#1#2{%
+ \def\_uregA{\_xp\let#1}%
+ \_xp\_uregA#2%
+}
+
+\long\def\_afterfi#1#2\fi{\fi#1}
+\def\say{\immediate\write16}
+
+\def\_commap#1#2,{
+ \ifx\_nul#2%
+ \else%
+ #1{#2}%
+ \_afterfi{\_commap{#1}}%
+ \fi%
+}
+
+\def\commap#1#2{%
+ \_commap{#1}#2,\_nul,%
+}
+
+\def\_map#1#2{%
+ \ifx\_nul#2%
+ \else%
+ #1{#2}%
+ \_afterfi{\_map{#1}}%
+ \fi%
+}
+
+\def\map#1#2{%
+ \_map{#1}#2\_nul%
+}
+
+\def\reversecall#1#2#3{#1{#3}{#2}}
+
+\def\__ifnextchar{%
+ \ifx\_uregD\_uregA %
+ \expandafter\_uregB%
+ \else%
+ \expandafter\_uregC%
+ \fi%
+}
+
+\bgroup
+ \global\long\def\_ifnextchar#1#2#3{%
+ \let\_uregA=#1\relax\def\_uregB{#2}\def\_uregC{#3}%
+ \futurelet\_uregD\__ifnextchar%
+ }
+
+ \unless\ifcsname @ifnextchar\endcsname
+ \global\let\@ifnextchar=\_ifnextchar
+ \fi
+
+ \global\long\def\_ifstar#1#2{%
+ \def\_temp{#1}%
+ \_ifnextchar* {\afterassignment\_temp\let\_tempA}{#2}%
+ }
+
+ \unless\ifcsname @ifstar\endcsname
+ \global\let\@ifstar=\_ifstar
+ \fi
+\egroup
+
+\def\localsetters{%
+ \glet\currlet=\let%
+ \glet\currdef=\def%
+ \glet\curredef=\edef%
+ \glet\currset=\empty%
+}
+
+\def\globalsetters{%
+ \glet\currlet=\glet%
+ \glet\currdef=\gdef%
+ \glet\curredef=\xdef%
+ \glet\currset=\global%
+}
+
+\localsetters
+
+\bgroup\lccode`\!=`\p \lccode`\?=`\t
+\lowercase{\egroup\def\_rmpt#1!?{#1}\def\_floorrm#1.#2!?{#1}}
+\def\_nopt#1{\_xp\_rmpt\the\dimexpr #1\relax}
+\def\_noptfloor#1{\_xp\_floorrm\the\dimexpr #1\relax}
+
+\long\def\_repeat#1#2{%
+ \ifnum#1>0 %
+ #2%
+ \_afterfi{\_xp\_repeat\_xp{\the\numexpr #1-1\relax}{#2}}%
+ \fi%
+}
+
+\long\def\__prepeat#1#2#3{%
+ \unless\ifnum#1>#2 %
+ #3{#1}%
+ \_afterfi{\_xp\__prepeat\_xp{\the\numexpr #1+1\relax}{#2}{#3}}%
+ \fi%
+}
+
+\long\def\_prepeat#1#2{%
+ \__prepeat{1}{#1}{#2}%
+}
+
+% Repeat a macro multiple times
+% #1: Start, #2: Stop, #3: Step
+% #4: Comparison (<, =, or >), comparison done by #1 #4 #2 (if true, stop)
+% #5: Macro (current index is passed to it)
+\def\_varrepeat#1#2#3#4#5{%
+ \unless\ifnum #1 #4 #2 %
+ #5{#1}%
+ \_afterfi{\_xp\_varrepeat\_xp{\the\numexpr #1+#3\relax}{#2}{#3}{#4}{#5}}%
+ \fi%
+}
+
+\def\literal{\afterassignment\@@ \def\@@}
+
+\def\_space{ }
+
+{\catcode`\^^M=12
+\long\gdef\__getline#1#2^^M{\egroup #1{#2}}}
+\def\_getline#1{\bgroup\catcode`\^^M=12 \__getline{#1}}
+
+\def\@def at ifequals#1#2{%
+ \def\_uregA{#1}\def\_uregB{#2}%
+ \ifx\_uregA\_uregB %
+}
+\def\@tok at ifequals#1#2{\ifx#1#2}
+\let\@ifequals=\@tok at ifequals
+
+\def\ifequals#1#2#3#4{\bgroup%
+ \@ifequals{#1}{#2}%
+ \_afterfi{\egroup #3}%
+ \else%
+ \_afterfi{\egroup #4}%
+ \fi
+}
+
+\def\default{\noexpand\default}
+\def\endifcases{\noexpand\endifcases}
+\def\@endcases#1\endifcases{\_uregA}
+
+\def\___ifstrcases#1#2#3{%
+ \iftrue%
+ \_afterfi{%
+ \ifequals{#1}{#2}{\def\_uregA{#3}\@endcases}{%
+ \ifequals{#2}{\default}{%
+ \def\_uregA{#3}\@endcases%
+ }{\@ifstrcases{#1}}%
+ }%
+ }%
+ \fi%
+}
+\def\__ifstrcases#1#2#{\___ifstrcases{#1}{#2}}
+\def\_ifstrcases{%
+ \ifx\_uregB\endifcases%
+ \_xp\_gobble%
+ \else%
+ \_afterfi{\_xp\__ifstrcases\_xp{\_uregA}}%
+ \fi%
+}
+\def\@ifstrcases#1{\def\_uregA{#1}\futurelet\_uregB\_ifstrcases}
+
+\def\ifstrcases#1{\@ifstrcases{#1}}
+
+\long\def\loop#1\repeat{\def\body{#1}\iterate}
+\def\newcount{\alloc at 0\count\countdef\insc at unt}
+
+\newwrite\_PTBwrite
+\newread\_PTBread
+
+\def\_reverse#1{%
+ \def\_uregB{#1}%
+ \_xp\_xp\_xp\def\_xp\_xp\_xp\_uregA\_xp\_xp\_xp{\_xp\_uregB\_uregA}%
+}
+
+\def\reverse#1#2{%
+ \def\_uregA{}%
+ \map{\_reverse}{#2}%
+ \let#1=\_uregA%
+}
+
Property changes on: trunk/Master/texmf-dist/tex/plain/pdftoolbox/ptb-utils.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2025-03-28 21:25:19 UTC (rev 74771)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2025-03-28 21:30:24 UTC (rev 74772)
@@ -671,7 +671,7 @@
pdfmanagement-testphase pdfmarginpar pdfmsym pdfoverlay
pdfpagediff pdfpages pdfpc pdfpc-movie pdfprivacy pdfrender pdfreview
pdfscreen pdfslide pdfsync
- pdftex-quiet pdftexcmds pdftricks pdftricks2 pdfx pdfxup
+ pdftex-quiet pdftexcmds pdftoolbox pdftricks pdftricks2 pdfx pdfxup
pecha pedigree-perl pegmatch
penlight penlightplus perception perfectcut perltex
permute persian-bib
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2025-03-28 21:25:19 UTC (rev 74771)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2025-03-28 21:30:24 UTC (rev 74772)
@@ -1873,6 +1873,7 @@
'pas-cv' => '&POSTpas_vc',
'pbibtex-base' => '&POSTpbibtex_base',
'pdfextra' => '&POSTpdfextra',
+ 'pdftoolbox' => '&POSTpdftoolbox',
'pedigree-perl' => '&POSTpedigreeperl',
'pgf-go' => '&POST_onelevel',
'pgfkeysearch' => '&POST_onelevel',
@@ -7858,11 +7859,17 @@
}
sub POSTpdfextra {
- print "POST$package - generic files in generic subdirectory\n";
+ print "POST$package - generic files in luatex subdirectory\n";
&mv_with_mkdir ("$package.sty", "$package.tex",
"$DEST/tex/luatex/$package");
}
+sub POSTpdftoolbox {
+ print "POST$package - preserve subpackage subdirs\n";
+ &mv_with_mkdir ("ptb-*", "pdf[D-T]*",
+ "$DEST/tex/plain/$package");
+}
+
sub POSTpedigreeperl {
print "POST$package - mv *.pm Pedigree/*.pm\n";
my $scriptdir = "$DEST/scripts/$package";
Modified: trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc 2025-03-28 21:25:19 UTC (rev 74771)
+++ trunk/Master/tlpkg/tlpsrc/collection-plaingeneric.tlpsrc 2025-03-28 21:30:24 UTC (rev 74772)
@@ -79,6 +79,7 @@
depend path
depend pdf-trans
depend pdfmsym
+depend pdftoolbox
depend pitex
depend placeins-plain
depend plainpkg
Added: trunk/Master/tlpkg/tlpsrc/pdftoolbox.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.