summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-09-23 03:02:24 +0000
committerNorbert Preining <norbert@preining.info>2022-09-23 03:02:24 +0000
commit93fb03ea65cbfc0770b6b22d07b1a2d8098b23aa (patch)
tree4ef3ac0722fccefb8c999f68e4cadf8e86d67c29 /macros/latex
parent2bb16a3bfa64e17e235ca1f7873f8f7a140ad767 (diff)
CTAN sync 202209230302
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/abspos/LICENSE21
-rw-r--r--macros/latex/contrib/abspos/README.md10
-rw-r--r--macros/latex/contrib/abspos/abspos.dtx598
-rw-r--r--macros/latex/contrib/abspos/abspos.pdfbin0 -> 452109 bytes
-rw-r--r--macros/latex/contrib/abspos/demo.tex67
-rw-r--r--macros/latex/contrib/blowup/blowup-ex1.pdfbin33365 -> 33365 bytes
-rw-r--r--macros/latex/contrib/blowup/blowup-ex2.pdfbin33377 -> 33377 bytes
-rw-r--r--macros/latex/contrib/blowup/blowup-ex3.pdfbin34010 -> 34010 bytes
-rw-r--r--macros/latex/contrib/blowup/blowup-ex4.pdfbin12537 -> 12537 bytes
-rw-r--r--macros/latex/contrib/blowup/blowup-ex5.pdfbin20246 -> 20246 bytes
-rw-r--r--macros/latex/contrib/blowup/blowup-ex6.pdfbin0 -> 33734 bytes
-rw-r--r--macros/latex/contrib/blowup/blowup-ex6.tex59
-rw-r--r--macros/latex/contrib/blowup/blowup.dtx51
-rw-r--r--macros/latex/contrib/blowup/blowup.pdfbin196888 -> 199133 bytes
-rw-r--r--macros/latex/contrib/colorframed/README.md55
-rw-r--r--macros/latex/contrib/colorframed/colorframed-doc.pdfbin0 -> 17300 bytes
-rw-r--r--macros/latex/contrib/colorframed/colorframed-doc.tex238
-rw-r--r--macros/latex/contrib/colorframed/colorframed.sty156
-rw-r--r--macros/latex/contrib/hyperref/README.md2
-rw-r--r--macros/latex/contrib/hyperref/doc/backref.pdfbin206288 -> 205447 bytes
-rw-r--r--macros/latex/contrib/hyperref/doc/hyperref-doc.html4
-rw-r--r--macros/latex/contrib/hyperref/doc/hyperref-doc.pdfbin318190 -> 318245 bytes
-rw-r--r--macros/latex/contrib/hyperref/doc/hyperref-doc.tex22
-rw-r--r--macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdfbin404106 -> 443137 bytes
-rw-r--r--macros/latex/contrib/hyperref/doc/hyperref.pdfbin2368225 -> 2367878 bytes
-rw-r--r--macros/latex/contrib/hyperref/doc/nameref.pdfbin180063 -> 180076 bytes
-rw-r--r--macros/latex/contrib/hyperref/hluatex.dtx28
-rw-r--r--macros/latex/contrib/hyperref/hyperref-linktarget.dtx2
-rw-r--r--macros/latex/contrib/hyperref/hyperref-patches.dtx2
-rw-r--r--macros/latex/contrib/hyperref/hyperref.dtx160
-rw-r--r--macros/latex/contrib/hyperref/xr-hyper.sty2
-rw-r--r--macros/latex/contrib/oberdiek/README.md6
-rw-r--r--macros/latex/contrib/oberdiek/aliascnt.pdfbin321516 -> 321657 bytes
-rw-r--r--macros/latex/contrib/oberdiek/bmpsize.pdfbin527470 -> 525985 bytes
-rw-r--r--macros/latex/contrib/oberdiek/centernot.pdfbin304615 -> 304534 bytes
-rw-r--r--macros/latex/contrib/oberdiek/chemarr.pdfbin318401 -> 318493 bytes
-rw-r--r--macros/latex/contrib/oberdiek/classlist.pdfbin298535 -> 298078 bytes
-rw-r--r--macros/latex/contrib/oberdiek/colonequals.pdfbin312343 -> 311534 bytes
-rw-r--r--macros/latex/contrib/oberdiek/dvipscol.pdfbin297204 -> 297228 bytes
-rw-r--r--macros/latex/contrib/oberdiek/engord.pdfbin348190 -> 347366 bytes
-rw-r--r--macros/latex/contrib/oberdiek/enparen.pdfbin332722 -> 332202 bytes
-rw-r--r--macros/latex/contrib/oberdiek/eolgrab.pdfbin347153 -> 346537 bytes
-rw-r--r--macros/latex/contrib/oberdiek/fibnum.pdfbin387720 -> 387260 bytes
-rw-r--r--macros/latex/contrib/oberdiek/flags.pdfbin311494 -> 311396 bytes
-rw-r--r--macros/latex/contrib/oberdiek/holtxdoc.pdfbin333938 -> 333755 bytes
-rw-r--r--macros/latex/contrib/oberdiek/hypbmsec.pdfbin317700 -> 317468 bytes
-rw-r--r--macros/latex/contrib/oberdiek/hypcap.pdfbin311506 -> 310807 bytes
-rw-r--r--macros/latex/contrib/oberdiek/hypgotoe.pdfbin313547 -> 313704 bytes
-rw-r--r--macros/latex/contrib/oberdiek/hyphsubst.pdfbin328581 -> 328769 bytes
-rw-r--r--macros/latex/contrib/oberdiek/ifdraft.pdfbin292584 -> 292649 bytes
-rw-r--r--macros/latex/contrib/oberdiek/iflang.pdfbin343995 -> 344764 bytes
-rw-r--r--macros/latex/contrib/oberdiek/oberdiek-bundle.bib14
-rw-r--r--macros/latex/contrib/oberdiek/oberdiek.ins2
-rw-r--r--macros/latex/contrib/oberdiek/oberdiek.pdfbin287792 -> 283212 bytes
-rw-r--r--macros/latex/contrib/oberdiek/oberdiek.tex26
-rw-r--r--macros/latex/contrib/oberdiek/pdfcolfoot.pdfbin322874 -> 322160 bytes
-rw-r--r--macros/latex/contrib/oberdiek/pdfcolparallel.pdfbin348875 -> 348845 bytes
-rw-r--r--macros/latex/contrib/oberdiek/pdfcolparcolumns.pdfbin336532 -> 336519 bytes
-rw-r--r--macros/latex/contrib/oberdiek/pdfcrypt.pdfbin338513 -> 337856 bytes
-rw-r--r--macros/latex/contrib/oberdiek/pdfrender.pdfbin413812 -> 413780 bytes
-rw-r--r--macros/latex/contrib/oberdiek/protecteddef.pdfbin337274 -> 336484 bytes
-rw-r--r--macros/latex/contrib/oberdiek/resizegather.pdfbin544212 -> 543577 bytes
-rw-r--r--macros/latex/contrib/oberdiek/rotchiffre.pdfbin346420 -> 345334 bytes
-rw-r--r--macros/latex/contrib/oberdiek/scrindex.pdfbin310490 -> 309280 bytes
-rw-r--r--macros/latex/contrib/oberdiek/setouterhbox.pdfbin358759 -> 358526 bytes
-rw-r--r--macros/latex/contrib/oberdiek/settobox.pdfbin321296 -> 321364 bytes
-rw-r--r--macros/latex/contrib/oberdiek/stackrel.pdfbin310478 -> 310389 bytes
-rw-r--r--macros/latex/contrib/oberdiek/stampinclude.pdfbin304678 -> 304747 bytes
-rw-r--r--macros/latex/contrib/oberdiek/tabularht.pdfbin359643 -> 359286 bytes
-rw-r--r--macros/latex/contrib/oberdiek/tabularkv.pdfbin281059 -> 280511 bytes
-rw-r--r--macros/latex/contrib/oberdiek/telprint.pdfbin331215 -> 331191 bytes
-rw-r--r--macros/latex/contrib/oberdiek/thepdfnumber.pdfbin378179 -> 377480 bytes
-rw-r--r--macros/latex/contrib/oberdiek/twoopt.pdfbin301605 -> 301492 bytes
-rw-r--r--macros/latex/contrib/pagegrid/README.md12
-rw-r--r--macros/latex/contrib/pagegrid/pagegrid.dtx (renamed from macros/latex/contrib/oberdiek/pagegrid.dtx)91
-rw-r--r--macros/latex/contrib/pagegrid/pagegrid.pdf (renamed from macros/latex/contrib/oberdiek/pagegrid.pdf)bin339405 -> 337475 bytes
-rw-r--r--macros/latex/contrib/pdfcol/README.md18
-rw-r--r--macros/latex/contrib/pdfcol/pdfcol.dtx (renamed from macros/latex/contrib/oberdiek/pdfcol.dtx)145
-rw-r--r--macros/latex/contrib/pdfcol/pdfcol.pdf (renamed from macros/latex/contrib/oberdiek/pdfcol.pdf)bin330483 -> 326142 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin816736 -> 834268 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex165
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty132
-rw-r--r--macros/latex/contrib/semantex/semantex.pdfbin385165 -> 389783 bytes
-rw-r--r--macros/latex/contrib/semantex/semantex.sty1095
-rw-r--r--macros/latex/contrib/semantex/semantex.tex206
-rw-r--r--macros/latex/contrib/semantex/stripsemantex.lua34
-rw-r--r--macros/latex/contrib/semantex/stripsemantex.sty18
87 files changed, 2103 insertions, 1338 deletions
diff --git a/macros/latex/contrib/abspos/LICENSE b/macros/latex/contrib/abspos/LICENSE
new file mode 100644
index 0000000000..70e7d55dd6
--- /dev/null
+++ b/macros/latex/contrib/abspos/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021–2022 Magnus Lie Hetland
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/macros/latex/contrib/abspos/README.md b/macros/latex/contrib/abspos/README.md
new file mode 100644
index 0000000000..419cf0bf4a
--- /dev/null
+++ b/macros/latex/contrib/abspos/README.md
@@ -0,0 +1,10 @@
+The **abspos** package lets you place contents at an absolute position, anchored
+at some specified part of the content, similar to how **tikz** nodes work,
+though without using the two-pass strategy of **tikz**. It also avoids messing
+with the order of **beamer** overlays, which is what happens when one uses the
+**textpos** package with the **overlay** option. The solution used is quite
+straightforward, combining *coffins* (using **l3coffins**) with the placement
+mechanisms of **atbegshi**.
+
+The package is written by [Magnus Lie Hetland](mailto:mlh@ntnu.no) and released
+under the [MIT license](LICENSE).
diff --git a/macros/latex/contrib/abspos/abspos.dtx b/macros/latex/contrib/abspos/abspos.dtx
new file mode 100644
index 0000000000..58cb1b820a
--- /dev/null
+++ b/macros/latex/contrib/abspos/abspos.dtx
@@ -0,0 +1,598 @@
+% \iffalse
+%<*driver>
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+\input docstrip %
+\askforoverwritefalse
+\preamble
+
+MIT License
+
+Copyright (c) 2021-2022 Magnus Lie Hetland
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+\endpreamble
+% stop docstrip adding \endinput
+\postamble
+\endpostamble
+\generate{\file{abspos.sty}{\from{abspos.dtx}{package}}}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</driver>
+%
+%<*driver|package>
+\RequirePackage{expl3}
+%<driver|package>
+%
+%<*driver>
+\documentclass[full]{l3doc}
+\usepackage{graphicx}
+\usepackage[export]{adjustbox}
+\usepackage{tcolorbox}
+\tcbuselibrary{listings,skins}
+\usepackage{xcoffins}
+\usepackage{abspos}
+
+\lstdefinestyle{tcblatex}{language={[LaTeX]TeX},
+ columns=fullflexible,
+ keepspaces=true,
+ breaklines=true,
+ breakatwhitespace=true,
+ basicstyle=\ttfamily\small\color{black!80},
+ extendedchars=true,
+ nolol,
+ inputencoding=\kvtcb@listingencoding,
+ literate={~}{\textcolor{gray}{\raisebox{-.75ex}{\textasciitilde}}}{1},
+ commentstyle=\color{gray},
+}
+
+\DeclareTCBInputListing \Example { m } {
+ listing only,
+ listing file=demo#1,
+ tile,
+ finish={
+ \draw (frame.north west) + (-\marginparsep,0pt)
+ node[line width=0pt, inner sep=0pt, anchor=north east]
+ {\includegraphics[page=#1, frame, width=\marginparwidth]{demo}}
+ ;
+ }
+}
+
+\ExplSyntaxOn
+\cs_set:Npn \__codedoc_macro_end_style:n #1 {}
+\ExplSyntaxOff
+
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+%
+%<*package>
+\ProvidesExplPackage {abspos} {2022-09-22} {0.1}
+ {Absolute placement with coffins}
+%</package>
+% \fi
+%
+% \title{The \pkg{abspos} package\\ Absolute placement with coffins}
+% \author{Magnus Lie Hetland}
+%
+% \maketitle
+%
+% \begin{documentation}
+%
+% \noindent
+% The \pkg{abspos} package lets you place contents at an absolute position,
+% anchored at some specified part of the content, similar to how \pkg{tikz}
+% nodes work, though without using the two-pass strategy of \pkg{tikz}. It also
+% avoids messing with the order of \pkg{beamer} overlays, which is what happens
+% when one uses the \pkg{textpos} package with the \pkg{overlay}
+% option.\footnote{Another possible solution is to use the \pkg{pst-abspos}
+% package, which relies on \pkg{pstricks}.} The solution used is quite
+% straightforward, combining \emph{coffins} (using \pkg{l3coffins}) with the
+% placement mechanisms of \pkg{atbegshi}.
+%
+% The main command of the package is |\absput|, which is somewhat similar to the
+% |\put| command of the \LaTeX\@ |picture| environment.
+% By default, it places its contents in the middle of the page, so
+% |\absput{Hello}| will put the word ``Hello'' front and center. Variations
+% are then possible using an optional argument consisting of keys and key--value
+% pairs, as shown in the following.
+%
+% \Example{1}
+%
+% \noindent
+% Supplying a |width| creates a vertical box. If the surrounding text is set,
+% for example, using \cs{raggedright} (as is common in \pkg{beamer}), the
+% contents of the \cs{absput} command will be, too. So if you want your text
+% justified, you can use something like the \cs{justifying} command from
+% \pkg{ragged2e}.
+%
+% \Example{2}
+%
+% \noindent
+% The options can also be set globally (or within a group) using
+% \cs{absposset}. For example, if you with to scale everything you place by a
+% certain amount, you could do that as in the following.
+%
+% \Example{3}
+%
+% \noindent
+% By default, the contents are placed \emph{in front} of the current page, but
+% this can be modified by supplying your own ``page coffin'' (an \pkg{l3coffins}
+% or \pkg{xcoffins} coffin) and typesetting that with, e.g., \pkg{atbegshi}. If,
+% for example, you wish to place something in the background of every slide of a
+% \pkg{beamer} presentation, you could do that by adding the following to the
+% preamble.\footnote{Note that because it will end up behind even the slide
+% itself, you need to remove the background color, by setting |bg| to nothing,
+% as in the example code. If you want it behind the content, but still have a
+% background color, you would need to add that yourself, with a colored box or
+% filled \pkg{tikz} rectangle, possibly also using the \cs{absput} command.}
+%
+% ^^A Can't use tcblisting, because it uses \lstinputlisting, which doesn't
+% ^^A respect `gobble`
+% \begin{tcolorbox}[tile]
+% \begin{lstlisting}[gobble=2, style=tcblatex]
+% \setbeamercolor{background canvas}{bg=} % So the coffin isn't obscured
+%
+% \NewCoffin \MyPageCoffin
+% \AtBeginShipout{
+% \AtBeginShipoutUpperLeft{
+% \TypesetCoffin \MyPageCoffin [t,l] (0pt,0pt)
+% }
+% }
+% \end{lstlisting}
+% \end{tcolorbox}
+%
+% \noindent
+% Now simply add a \cs{absput} command at the beginning of the document, before
+% your first |frame| (after |\begin{document}|), using |pg=\MyPageCoffin| to
+% specify which coffin to use for rendering and positioning contents. This gives
+% you a coordinate system starting at the top left corner of the page. If you
+% wish to anchor your positioned elements elsewhere, you'll need to resize your
+% page coffin (see p.~\pageref{p:reset}).
+%
+% \section*{Reference}
+%
+% \begin{function}{\absposset}
+% \begin{syntax}
+% \cs{absposset} \marg{options}
+% \end{syntax}
+% Sets the options, as described under \cs{absput}, to the value they should
+% have within the current group (or globally, if not inside a group).
+% \end{function}
+%
+% \begin{function}{\absput}
+% \begin{syntax}
+% \cs{absput} \oarg{options} \marg{contents}
+% \end{syntax}
+% Places \meta{contents} at some position (possibly scaled or rotated) as
+% dictated by the optional \meta{options}, supplied as keys and key--value
+% pairs. The \emph{defaults} are used as values if only the keys are given, and
+% the \emph{initial values} are used if the options are not specified. The
+% available options are as follows.
+% \end{function}
+% \begin{itemize}
+%
+% \item |angle=|\meta{angle}: The angle to which the coffin is rotated
+% before being positioned.
+%
+% No default. Initial value |0|.
+%
+% \item |h=|\meta{h-anchor}: The horizontal anchor to use for positioning.
+% This corresponds to a \pkg{l3coffins} (or \pkg{xcoffins}) \emph{pole}. The
+% available anchors are |l| for left, |hc| for center and |r| for right.
+% These are also available as separate valueless keys, so if you supply
+% \cs{absput} with the key |l|, that is equivalent to using |h=l|, etc.
+%
+% There are also two-letter shortcuts defined for setting the horizontal and
+% vertical anchors simultaneously, with the vertical one first. For example,
+% |tl| is equivalent to |v=t,h=l|. In these double shortcuts, the prefixes
+% |h| and |v| have been stripped from the center anchors, so that bottom
+% center is |bc|, for example, and not |bhc|.
+%
+% No default. Initial value |hc|, which centers the coffin horizontally at
+% \meta{x-coord}.
+%
+% \item |pg=|\meta{page-coffin}: Supplies the coffin to use as the
+% page, or ``canvas,'' for placing the contents.
+%
+% No default. The initial value is an internal canvas that is rendered in
+% front of the current page (on shipout), and then cleared.
+%
+% \item |pg-h|=\meta{page-h-anchor}: Similar to |h|, except that it applies
+% to the canvas (set by |pg|). Shortcuts (like |pg-l| for |pg-h=l|) are
+% defined for the default anchors (|l|, |hc|, |r|).
+%
+% Double shortcuts are defined for |pg-h| and |pg-v| in a similar manner to
+% those defined for |h| and |v|, so that |pg-tl| is equivalent to
+% |pg-v=t,pg-h=l|.
+%
+% No default. Initial value |hc|.
+%
+% \item |pg-v|=\meta{page-v-anchor}: Similar to |v|, except that it applies
+% to the canvas (set by |pg|). Shortcuts (like |pg-t| for |pg-v=t|) are
+% defined for the default anchors (|t|, |vc|, |b|, |T|, |B|, |H|).
+%
+% Combined shortcuts such as |pg-tl| and |pg-br|, etc., are also defined.
+% See the descriptions of |h| and |pg-h| for more.
+%
+% No default. Initial value |vc|.
+%
+% \item |scale=|\meta{scale}: The factor by which the coffin is scaled.
+%
+% No default. If |scale| is not used, no scaling is performed.
+%
+% \item |v=|\meta{v-anchor}: The vertical anchor to use for positioning (see
+% |h|). The available anchors are |t| for top, |vc| for center, |b| for
+% bottom and |H| for baseline. These are also available as separate
+% valueless keys, so if you supply \cs{absput} with the key |t|, that is
+% equivalent to using |v=t|, etc.
+%
+% Note that if the |width| key is set, a vertial coffin is used, which makes
+% the additional anchors (or poles) |T| (baseline of the first line, or
+% other material at the top) and |B| (baseline for the last line, or other
+% material at the bottom).
+%
+% Combined shortcuts such as |tl| and |br|, etc., are also defined. See the
+% description of |h| for more.
+%
+% No default. Initial value |vc|, which centers the coffin vertically at
+% \meta{y-coord}.
+%
+% \item |width=|\meta{width}: Set the width constraining the contents,
+% before scaling. If this is set, the contents are set in vertical mode;
+% otherwise, they are set in horizontal mode.
+%
+% No default and no initial value.
+%
+% \item |x=|\meta{x-coord}: The $x$ coordinate, measured from the current
+% horizontal page anchor, set by |pg-h|.
+%
+% No default. Initial value |0pt|.
+%
+% \item |y=|\meta{y-coord}: The $y$ coordinate, measured from the current
+% vertical page anchor, set by |pg-v|.
+%
+% No default. Initial value |0pt|.
+% \end{itemize}
+%
+% \begin{function}{\absputcoffin}
+% \begin{syntax}
+% \cs{absputcoffin} \oarg{options} \meta{coffin}
+% \end{syntax}
+% Places \meta{coffin} at some position (possibly scaled or rotated), just like
+% \cs{absput}. The difference is that a coffin is provided directly, rather than
+% constructed by typesetting some supplied contents. This means that the |width|
+% key is not used, though it is permitted for consistency (and ease of reusing
+% option lists).
+% \end{function}
+%
+% \end{documentation}
+%
+% \begin{implementation}
+%
+% \section*{Implementation}
+%
+% \begin{macrocode}
+%<*package>
+%<@@=apos>
+% \end{macrocode}
+%
+% \noindent
+% First, we need to import the necessary packages. We're using \pkg{expl3} to
+% set up the package, so we get \pkg{l3coffins} for free (and cannot import it
+% directly, anyway). If \pkg{abspos} is used with \pkg{beamer}, then
+% \pkg{atbegshi} is already included. Elsewhere, though, it will not be, so we
+% require it here.
+%
+% \begin{macrocode}
+\RequirePackage{atbegshi}
+% \end{macrocode}
+%
+% \noindent
+% We make sure we have the variants we need of some existing commands:
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \tl_if_novalue:nTF { VTF }
+\cs_generate_variant:Nn \tl_if_novalue:nF { VF }
+\cs_generate_variant:Nn \coffin_gattach:NnnNnnnn { NooNoonn }
+% \end{macrocode}
+%
+% \begin{variable}{\g_apos_shipout_coffin}
+%
+% This variable is normally used to store the contents to be placed on the
+% current page. It accumulates the contents from every call to \cs{absput} until
+% the page is about to be typeset (shipped out), at which point
+% \cs{g_apos_shipout_coffin} is typeset in front.
+%
+% \begin{macrocode}
+\coffin_new:N \g_apos_shipout_coffin
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\apos_reset_shipout_coffin:}\label{p:reset}
+% Used to initialize, and later reinitialize, the shipout coffin, to simply be
+% an empty coffin with the width and height of the current page.
+% \begin{macrocode}
+\cs_new:Npn \apos_reset_shipout_coffin: {
+ \hcoffin_gset:Nn \g_apos_shipout_coffin {
+ \phantom{\rule{\paperwidth}{\paperheight}}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \noindent
+% The following hook ensures that that \cs{g_apos_shipout_coffin} is typeset in
+% front of the page as it is being shipped out (anchored top left), and then
+% cleared, ready to accumulate contents for the next page. The \pkg{atbegshi}
+% command used wraps its contents in a |picture| environment, which we don't
+% really need, but it seems to be more trouble than it's worth to get rid of it.
+%
+% \begin{macrocode}
+\apos_reset_shipout_coffin:
+\AtBeginShipout{
+ \AtBeginShipoutUpperLeftForeground{
+ \coffin_typeset:Nnnnn \g_apos_shipout_coffin {t} {l} {0pt} {0pt}
+ \apos_reset_shipout_coffin:
+ }
+}
+% \end{macrocode}
+%
+% \begin{variable}{\g_apos_canvas_coffin}
+%
+% This variable is used as part of the |pg| key, and is initially set equal to
+% \cs{g_apos_shipout_coffin}, so that whatever is rendered to the canvas (i.e.,
+% \cs{g_apos_canvas_coffin}) is placed on top of the page contents on shipout,
+% and then cleared. If a different behavior is desired, another coffin can can
+% be supplied instead. Rather than constructing a coffin, we just set up a token
+% list, which initially will be aliased to the actual coffin
+% \cs{g_apos_shipout_coffin} as part of the key handling.
+% \begin{macrocode}
+\tl_new:N \g_apos_canvas_coffin
+% \end{macrocode}
+% \end{variable}
+% \begin{macro}{\apos_reset_overlay:}
+% This is a utility to reset \pkg{beamer} overlay specifications at the end of
+% our coffin contents. The idea is that if we use, say, \cs{pause} inside
+% \cs{absput}, then everything after the \cs{pause} command will be paused,
+% including material \emph{outside} \cs{absput}. To restrict such commands to the
+% contents provided to \cs{absput}, we use \cs{onslide<1->} after typesetting the
+% contents in our coffin. This is only useful (or possible) when using
+% \pkg{beamer}, so otherwise, we just alias \cs{ap_reset_overlay:} to
+% \cs{relax}, i.e., don't do anything.
+% \begin{macrocode}
+\tl_new:N \apos_reset_overlay:
+\@ifclassloaded{beamer}
+ { \tl_gset:Nn \apos_reset_overlay: { \onslide<1-> } }
+ { \tl_gset_eq:NN \apos_reset_overlay: \relax }
+% \end{macrocode}
+% \end{macro}
+%
+% \noindent
+% We now define the various keys used to configure \cs{absput}, as described
+% in the reference.
+%
+% \begin{macrocode}
+\keys_define:nn { abspos } {
+
+ angle .tl_set:N = \l_apos_angle_tl,
+ angle .initial:V = \c_novalue_tl,
+ angle .value_required:n = true,
+
+ h .tl_set:N = \l_apos_hanchor_tl,
+ h .initial:n = hc,
+ h .value_required:n = true,
+
+ pg .code:n = { \tl_set_eq:NN \g_apos_canvas_coffin #1 },
+ pg .initial:n = \g_apos_shipout_coffin,
+ pg .value_required:n = true,
+
+ pg-h .tl_set:N = \l_apos_on_hanchor_tl,
+ pg-h .initial:n = hc,
+ pg-h .value_required:n = true,
+
+ pg-v .tl_set:N = \l_apos_on_vanchor_tl,
+ pg-v .initial:n = vc,
+ pg-v .value_required:n = true,
+
+ scale .tl_set:N = \l_apos_scale_tl,
+ scale .initial:V = \c_novalue_tl,
+ scale .value_required:n = true,
+
+ v .tl_set:N = \l_apos_vanchor_tl,
+ v .initial:n = vc,
+ v .value_required:n = true,
+
+ width .tl_set:N = \l_apos_width_tl,
+ width .initial:V = \c_novalue_tl,
+ width .value_required:n = true,
+
+ x .tl_set:N = \l_apos_x_tl,
+ x .initial:n = { 0pt },
+ x .value_required:n = true,
+
+ y .tl_set:N = \l_apos_y_tl,
+ y .initial:n = { 0pt },
+ y .value_required:n = true,
+
+}
+
+\clist_const:Nn \@@_hanchors_clist {l,hc,r}
+\clist_const:Nn \@@_vanchors_clist {t,vc,b,H,T,B}
+
+\cs_new:Npn \@@_define_shortcuts:nnn #1 #2 #3 {
+ \keys_define:nn { abspos } {
+
+ #1 .meta:n = { #2 },
+ #1 .value_forbidden:n = true,
+
+ pg-#1 .meta:n = { #3 },
+ pg-#1 .value_forbidden:n = true,
+
+ }
+}
+
+\cs_generate_variant:Nn \@@_define_shortcuts:nnn { Vnn }
+
+\clist_map_inline:Nn \@@_hanchors_clist {
+
+ \@@_define_shortcuts:nnn { #1 } { h = #1 } { pg-h = #1 }
+
+}
+
+\clist_map_inline:Nn \@@_vanchors_clist {
+
+ \@@_define_shortcuts:nnn { #1 } { v = #1 } { pg-v = #1 }
+
+}
+
+\clist_map_inline:Nn \@@_vanchors_clist {
+ \clist_map_inline:Nn \@@_hanchors_clist {
+
+ \tl_clear:N \g_tmpa_tl
+
+ \tl_if_eq:nnTF { #1 } { vc }
+ { \tl_put_right:Nn \g_tmpa_tl { c } }
+ { \tl_put_right:Nn \g_tmpa_tl { #1 } }
+
+ \tl_if_eq:nnTF { ##1 } { hc }
+ { \tl_put_right:Nn \g_tmpa_tl { c } }
+ { \tl_put_right:Nn \g_tmpa_tl { ##1 } }
+
+ \@@_define_shortcuts:Vnn
+ \g_tmpa_tl { v = #1, h = ##1 } { pg-v = #1, pg-h = ##1 }
+
+ }
+}
+% \end{macrocode}
+% In order to let the user set options outside the actual use of \cs{absput} and
+% \cs{absputcoffin}, we introduce a wrapper:
+% \begin{macrocode}
+\NewDocumentCommand \absposset { +m } {
+ \keys_set:nn { abspos } { #1 }
+}
+% \end{macrocode}
+%
+% \begin{macro}{\absput}
+% This is the main command of the package. It takes a key--value list as its
+% first optional argument, followed by the contents that are to be placed.
+% \begin{macrocode}
+\NewDocumentCommand \absput { +O{ } +m } {
+ \group_begin:
+% \end{macrocode}
+% First we handle the keys, updating variables holding coordinates, etc.
+% \begin{macrocode}
+ \keys_set:nn { abspos } { #1 }
+% \end{macrocode}
+% Then the contents are typeset, with some additions, into a temporary coffin.
+% The additions are that whitespace is stripped around the contents, and that we
+% reset any overlay counters (in case they are modified by \cs{onslide} or
+% \cs{pause}, or the like). If we're not using \pkg{beamer}, this last part is a
+% no-op.
+%
+% If |width| has been set, the contents is set in vertical mode (using the given
+% width); otherwise, it is set in horizontal mode.
+% \begin{macrocode}
+ \tl_set:Nn \l_tmpa_tl {
+ \ignorespaces #2 \unskip
+ \apos_reset_overlay:
+ }
+ \tl_if_novalue:VTF \l_apos_width_tl {
+ \hcoffin_set:Nn \l_tmpa_coffin \l_tmpa_tl
+ } {
+ \vcoffin_set:Nnn \l_tmpa_coffin \l_apos_width_tl \l_tmpa_tl
+ }
+% \end{macrocode}
+% Finally, actually place the typeset coffin on the canvas coffin.
+% \begin{macrocode}
+ \@@_absput_coffin:N \l_tmpa_coffin
+ \group_end:
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\absputcoffin}
+% A thin wrapper around the internal \cs{@@_absput_coffin:N}. The only extra
+% work done here is setting the keys.
+% \begin{macrocode}
+\NewDocumentCommand \absputcoffin { +O{ } m } {
+ \group_begin:
+ \keys_set:nn { abspos } { #1 }
+ \@@_absput_coffin:N #2
+ \group_end:
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_absput_coffin:N}
+% An internal macro for placing a given coffin, using the options currently in
+% effect (i.e., as configured by \cs{keys_set:nn} in some outer group). Used by
+% \cs{absput} and \cs{absputcoffin}.
+% \begin{macrocode}
+\cs_new:Npn \@@_absput_coffin:N #1 {
+% \end{macrocode}
+% If a scale has been provided, we scale the temporary coffin (with the same
+% factor in both directions).
+% \begin{macrocode}
+ \tl_if_novalue:VF \l_apos_scale_tl {
+ \coffin_scale:Nnn #1 \l_apos_scale_tl \l_apos_scale_tl
+ }
+% \end{macrocode}
+% If an angle has been provided, we rotate the temporary coffin.
+% \begin{macrocode}
+ \tl_if_novalue:VF \l_apos_angle_tl {
+ \coffin_rotate:Nn #1 \l_apos_angle_tl
+ }
+% \end{macrocode}
+% We now join the temporary coffin to our canvas coffin, so it will be rendered
+% at the correct position at shipout.
+% \begin{macrocode}
+ \coffin_gattach:NooNoonn
+ \g_apos_canvas_coffin
+ {\l_apos_on_hanchor_tl} {\l_apos_on_vanchor_tl}
+ #1
+ {\l_apos_hanchor_tl} {\l_apos_vanchor_tl}
+ {\l_apos_x_tl} {\l_apos_y_tl}
+% \end{macrocode}
+%
+% \noindent
+% Ideally, what we just did should have been enough. However, until
+% October~2021, the \cs{coffin_gattach:} command was not actually
+% global,\footnote{\url{https://tex.stackexchange.com/questions/618198}} so
+% to have our modification take effect outside the current group also for older
+% versions of \pkg{l3coffins}, we perform a final (normally redundant) global
+% self-assignment before ending the \cs{absput} command.
+%
+% \begin{macrocode}
+ \coffin_gset_eq:NN \g_apos_canvas_coffin \g_apos_canvas_coffin
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+%
+% \end{implementation}
diff --git a/macros/latex/contrib/abspos/abspos.pdf b/macros/latex/contrib/abspos/abspos.pdf
new file mode 100644
index 0000000000..a6514d8370
--- /dev/null
+++ b/macros/latex/contrib/abspos/abspos.pdf
Binary files differ
diff --git a/macros/latex/contrib/abspos/demo.tex b/macros/latex/contrib/abspos/demo.tex
new file mode 100644
index 0000000000..ba2b7ab867
--- /dev/null
+++ b/macros/latex/contrib/abspos/demo.tex
@@ -0,0 +1,67 @@
+\documentclass{beamer}
+\usefonttheme{serif}
+\beamertemplatenavigationsymbolsempty
+
+\usepackage{xcoffins}
+\usepackage{abspos}
+\usepackage{ragged2e}
+\usepackage{lipsum}
+\usepackage{tikz}
+\usepackage{newfile}
+
+\newoutputstream{io}
+
+\ExplSyntaxOn
+
+\cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx }
+
+\NewDocumentCommand \ExampleFrame { m +v } {
+
+ \tl_set:Nn \l_tmpa_tl {#2}
+ \tl_replace_all:Nxx \l_tmpa_tl { \iow_char:N \^^M } { \iow_char:N \^^J }
+ \regex_replace_once:nnN { ^\v* } { } \l_tmpa_tl
+
+ \openoutputfile{demo#1.tex}{io}
+ \addtostream{io}{\l_tmpa_tl}
+ \closeoutputstream{io}
+
+ \frame{\input{demo#1}}
+
+}
+
+\ExplSyntaxOff
+
+\begin{document}
+
+\ExampleFrame{1}{
+% In preamble:
+% \usepackage{tikz}
+\absput{\tikz{
+ \draw[line width=8pt, lightgray] circle[radius=3.25];
+}}
+\absput[angle=10, scale=5]{Hello!}
+\absput[pg-b, y=.5cm]{\thepage}
+}
+
+\ExampleFrame{2}{
+% In preamble:
+% \usepackage{ragged2e}
+% \usepackage{lipsum}
+\absput[width=8cm]{
+ \justifying
+ \lipsum[1][1-5] % Example text
+}
+}
+
+\ExampleFrame{3}{
+\absposset{scale=5}
+\absput{Scaled!}
+}
+
+\begin{frame}
+\NewCoffin \MyCoffin
+\SetHorizontalCoffin \MyCoffin {My Coffin}
+\absputcoffin[scale=2] \MyCoffin
+\end{frame}
+
+\end{document}
diff --git a/macros/latex/contrib/blowup/blowup-ex1.pdf b/macros/latex/contrib/blowup/blowup-ex1.pdf
index d67653e490..6f1af02858 100644
--- a/macros/latex/contrib/blowup/blowup-ex1.pdf
+++ b/macros/latex/contrib/blowup/blowup-ex1.pdf
Binary files differ
diff --git a/macros/latex/contrib/blowup/blowup-ex2.pdf b/macros/latex/contrib/blowup/blowup-ex2.pdf
index 5ee25768e0..88ca3eeef6 100644
--- a/macros/latex/contrib/blowup/blowup-ex2.pdf
+++ b/macros/latex/contrib/blowup/blowup-ex2.pdf
Binary files differ
diff --git a/macros/latex/contrib/blowup/blowup-ex3.pdf b/macros/latex/contrib/blowup/blowup-ex3.pdf
index 53404b97d9..d8bae71cf9 100644
--- a/macros/latex/contrib/blowup/blowup-ex3.pdf
+++ b/macros/latex/contrib/blowup/blowup-ex3.pdf
Binary files differ
diff --git a/macros/latex/contrib/blowup/blowup-ex4.pdf b/macros/latex/contrib/blowup/blowup-ex4.pdf
index 5d0816e9a4..fd00e54ac1 100644
--- a/macros/latex/contrib/blowup/blowup-ex4.pdf
+++ b/macros/latex/contrib/blowup/blowup-ex4.pdf
Binary files differ
diff --git a/macros/latex/contrib/blowup/blowup-ex5.pdf b/macros/latex/contrib/blowup/blowup-ex5.pdf
index f41f2eb1d2..f95c24b056 100644
--- a/macros/latex/contrib/blowup/blowup-ex5.pdf
+++ b/macros/latex/contrib/blowup/blowup-ex5.pdf
Binary files differ
diff --git a/macros/latex/contrib/blowup/blowup-ex6.pdf b/macros/latex/contrib/blowup/blowup-ex6.pdf
new file mode 100644
index 0000000000..e03fb322a5
--- /dev/null
+++ b/macros/latex/contrib/blowup/blowup-ex6.pdf
Binary files differ
diff --git a/macros/latex/contrib/blowup/blowup-ex6.tex b/macros/latex/contrib/blowup/blowup-ex6.tex
new file mode 100644
index 0000000000..4128a48b36
--- /dev/null
+++ b/macros/latex/contrib/blowup/blowup-ex6.tex
@@ -0,0 +1,59 @@
+% Rolf Niepraschk, 2020-09-19
+%
+% Translate to pdf with any TeX compiler and check the page size with
+%
+% pdfinfo filename.pdf
+%
+% or via the properties menu of the pdf viewer
+%
+\listfiles
+\documentclass[a4paper,twoside]{article}
+\usepackage{array,xcolor}
+
+% Just to show the page size of the source.
+\usepackage{xcolor,atbegshi}
+\AtBeginShipout{%
+ \AtBeginShipoutUpperLeft{%
+ \textcolor{green!30}{\rule[-\paperheight]{\paperwidth}{\paperheight}}%
+ }%
+}
+
+\renewcommand\familydefault{\sfdefault}
+\setlength\parindent{0pt}
+\pagestyle{empty}
+
+\usepackage{blowup}
+\blowUp{h-mirroring,v-mirroring}% vertical and horizontal mirrored
+
+\begin{document}
+
+\null\vfill
+
+\huge\centering
+
+A4-sized document not resized, mirrored vertically and horizontally
+
+\vfill
+
+\setlength\extrarowheight{.5ex}
+\begin{tabular}{|>{\bfseries}l<{:}r<{\,mm}!{$\times$}r<{\,mm}|} \hline
+ letter & 216 & 279 \\
+ legal & 216 & 356 \\
+ executive & 184 & 267 \\
+ A8 & 52 & 74 \\
+ A7 & 74 & 105 \\
+ A6 & 105 & 148 \\
+ A5 & 148 & 210 \\
+ A4 & 210 & 297 \\
+ A3 & 297 & 420 \\
+ A2 & 420 & 594 \\
+ A1 & 594 & 841 \\
+ A0 & 841 & 1189 \\ \hline
+\end{tabular}
+
+\vfill
+
+\newpage\null 2nd page\dots
+
+\end{document}
+%---------------------------
diff --git a/macros/latex/contrib/blowup/blowup.dtx b/macros/latex/contrib/blowup/blowup.dtx
index 374f2878de..3385861926 100644
--- a/macros/latex/contrib/blowup/blowup.dtx
+++ b/macros/latex/contrib/blowup/blowup.dtx
@@ -24,7 +24,7 @@
\ProvidesFile{blowup.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-%<package>\ProvidesPackage{blowup}[2022/09/19 2.0.0 Page scaling (RN)]
+%<package>\ProvidesPackage{blowup}[2022/09/22 2.1.0 Page scaling (RN)]
%
%<*driver>
\documentclass{ltxdoc}
@@ -43,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{510}
+% \CheckSum{546}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -105,20 +105,26 @@
% (e.\,g., |a8|, |c7|,..., |b1|, |a0|) or a pair of dimensions
% in curly brackets (e.\,g., |target={925mm,1225mm}|) or the
% letter `x' followed by a scaling factor
-% (e.\,g., |target=x1.414213|). \tabularnewline[.4\baselineskip]
+% (e.\,g., |target=x1.414213|). \tabularnewline[.75ex]
% origin & Scaled size of the source document: \tabularnewline
% & |letter|, |legal|, |executive| or a paper size from the
% ISO/DIN paper series A, B, C, D
% (e.\,g., |a8|, |c7|,..., |b1|, |a0|) or a pair of dimensions
% in curly brackets (e.\,g., |origin={925mm,1225mm}|) or the
% letter `x' followed by a scaling factor
-% (e.\,g., |origin=x1.414213|). \tabularnewline[.4\baselineskip]
+% (e.\,g., |origin=x1.414213|). \tabularnewline[.75ex]
+% h-mirroring & horizontally mirroring of the final pages \tabularnewline
+% & |true| (the same as no value) or |false| (default: |false|).
+% \tabularnewline[.75ex]
+% v-mirroring & vertically mirroring of the final pages \tabularnewline
+% & |true| (the same as no value) or |false| (default: |false|).
+% \tabularnewline[.75ex]
% landscape & Exchanges paperwidth and paperheight: \tabularnewline
-% & |true| (the same as no value) or |false|.
-% \tabularnewline[.4\baselineskip]
+% & |true| (the same as no value) or |false| (default: |false|).
+% \tabularnewline[.75ex]
% noscale & No scaling of the original paper size: \tabularnewline
-% & |true| (the same as no value) or |false|.
-% \tabularnewline[.4\baselineskip]
+% & |true| (the same as no value) or |false| (default: |false|).
+% \tabularnewline[.75ex]
% pos & Position of the page on the paper: \tabularnewline
% & |left| or |right|, |inside| or |outside|, |top| or |bottom|
% (only the first letter is significant; default is
@@ -126,10 +132,12 @@
% a pair of dimensions in curly brackets which means the offset
% from the lower left or lower outside corner of the final paper.
% Only meaningful for |noscale=true| and up-scaled paper
-% size. \tabularnewline[.4\baselineskip]
-% onepage & Suppresses the second page and all following pages: \tabularnewline
-% & |true| (the same as no value) or |false|. \tabularnewline
-% & Useful for creating a one-side paper like a poster.
+% size. \tabularnewline[.75ex]
+% onepage & Suppresses the second page and all following pages:
+% \tabularnewline
+% & |true| (the same as no value) or |false| (default: |false|).
+% \tabularnewline
+% & Useful for creating a one-page document like a poster.
% \end{longtable}
% \vspace{0\baselineskip}
% See also the example documents |blowup-ex?.tex|.
@@ -216,6 +224,7 @@
% \begin{macro}{\BL@scalePage}
% The whole scaling process of the the shipout box to the dimension of the
% new paper size.
+% \changes{2.1.0}{2022/09/22}{New options `h-mirroring' and `v-mirroring' (RN)}
% \begin{macrocode}
\newcommand*\BL@scalePage{%
% \end{macrocode}
@@ -244,6 +253,9 @@
\hb@xt@\tPaperWidth{\BL@l\BL@resize{\box\AtBeginShipoutBox}\BL@r}%
\BL@b\kern\z@
}%
+ \ifBL@mirroring
+ \setbox\@tempboxa=\hbox{\scalebox{\BL@h}[\BL@v]{\box\@tempboxa}}%
+ \fi
% \end{macrocode}
% Denormalize the shipout box
% \begin{macrocode}
@@ -355,11 +367,20 @@
%
% \begin{macrocode}
\newif\ifBL@noscale \BL@noscalefalse
+\newif\ifBL@mirroring \BL@mirroringfalse
% \end{macrocode}
%
% \begin{macrocode}
\define@key{BL@}{noscale}[true]{%
- \csname BL@noscale#1\endcsname
+ \global\csname BL@noscale#1\endcsname
+}
+\define@key{BL@}{h-mirroring}[true]{%
+ \global\csname BL@mirroring#1\endcsname
+ \gdef\BL@h{-1}%
+}
+\define@key{BL@}{v-mirroring}[true]{%
+ \global\csname BL@mirroring#1\endcsname
+ \gdef\BL@v{-1}%
}
% \end{macrocode}
%
@@ -370,6 +391,8 @@
\newcommand*\BL@o{}
\newcommand*\BL@t{}
\newcommand*\BL@b{}
+\newcommand*\BL@h{1}
+\newcommand*\BL@v{1}
% \end{macrocode}
%
%
@@ -446,6 +469,8 @@
% The only user-level macro.
% \begin{macrocode}
\newcommand*\blowUp[1]{%
+ \global\tPaperWidth=\paperwidth
+ \global\tPaperHeight=\paperheight
\setkeys{BL@}{#1}%
\ifBL@landscape
\@tempdima=\tPaperWidth
diff --git a/macros/latex/contrib/blowup/blowup.pdf b/macros/latex/contrib/blowup/blowup.pdf
index 03efefbc9c..38b26ab049 100644
--- a/macros/latex/contrib/blowup/blowup.pdf
+++ b/macros/latex/contrib/blowup/blowup.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorframed/README.md b/macros/latex/contrib/colorframed/README.md
new file mode 100644
index 0000000000..59bc8c094b
--- /dev/null
+++ b/macros/latex/contrib/colorframed/README.md
@@ -0,0 +1,55 @@
+% colorframed 0.9
+% Jean-François Burnol
+% 2022/09/22
+
+## Usage
+
+This is a LaTeX package. Use it with `\usepackage{colorframed}`.
+
+For reporting issues, use the
+[repository](https://github.com/jfbu/colorframed) issue tracker.
+
+## Purpose
+
+The initial release `0.9` of `2022/09/22` fixes colour leak issues
+which one encounters with the environments provided by the
+[framed](https://ctan.org/pkg/framed) package.
+
+It is planned to extend `colorframed` with one more environment,
+based upon [pict2e](https://ctan.org/pkg/pict2e), which will
+provide breakable boxes with possibly rounded corners, optional
+background colour, external or inset shadow, separate
+customizability of the padding separations and border widths in
+the four directions, ...
+
+## Copyright and License
+
+Copyright (c) 2022 Jean-François Burnol
+
+The colorframed [CTAN package](https://ctan.org/pkg/colorframed)
+is distributed under the
+[LPPL 1.3c](https://ctan.org/license/lppl1.3c).
+
+This Work may be distributed and/or modified under the conditions
+of the LaTeX Project Public License version 1.3c. This version of
+this license is in
+
+> <http://www.latex-project.org/lppl/lppl-1-3c.txt>
+
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This Work has the LPPL maintenance status author-maintained.
+
+The Author of this Work is Jean-François Burnol
+
+This Work consists of the package files `colorframed.sty`, the
+documentation source `colorframed-doc.tex` and its conversion
+`colorframed-doc.pdf`, as well as this `README.md`.
+
+<!--
+%! Local variables:
+%! sentence-end-double-space: t
+%! fill-column: 72
+%! End:
+-->
diff --git a/macros/latex/contrib/colorframed/colorframed-doc.pdf b/macros/latex/contrib/colorframed/colorframed-doc.pdf
new file mode 100644
index 0000000000..16ee21cf33
--- /dev/null
+++ b/macros/latex/contrib/colorframed/colorframed-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorframed/colorframed-doc.tex b/macros/latex/contrib/colorframed/colorframed-doc.tex
new file mode 100644
index 0000000000..cc2b6fca39
--- /dev/null
+++ b/macros/latex/contrib/colorframed/colorframed-doc.tex
@@ -0,0 +1,238 @@
+\documentclass[a4paper,dvipdfmx,11pt]{article}
+\usepackage[T1]{fontenc}
+\usepackage{geometry}
+\usepackage[straightquotes,ttzdefault]{newtxtt}
+\usepackage{framed}
+\usepackage[dvipsnames]{xcolor}
+\usepackage{colorframed}
+% we put this here but it does not have to be in preamble of
+% course
+% titled-frame
+\colorlet{TFFrameColor}{teal!20}
+\colorlet{TFTitleColor}{orange}
+\def\colorframedTFconlabcolorcommand{\color{red}}
+% shaded
+\colorlet{shadecolor}{orange!20}
+% framed
+\FrameRule5pt\relax
+\FrameSep9pt\relax
+\def\colorframedbordercolorcommand{\color{red!20}}
+
+\title{The \colorframed package%
+\vadjust{\vtop to 0pt{\hbox
+ to\linewidth{\strut\footnotesize Release 0.9 of
+ 2022/09/22\hss report issues at \url{https://github.com/jfbu/colorframed}}\vss}}%
+}
+\author{Jean-François Burnol}
+\date{}
+\usepackage{shortvrb}\MakeShortVerb\|
+%\usepackage{url}\urlstyle{same}
+\usepackage{hyperref}
+\def\ctanpackage#1{\href{https://ctan.org/pkg/#1}{#1}}
+
+\usepackage{amssymb}
+
+\usepackage{parskip}
+\usepackage{xspace}
+
+\definecolor{joli}{RGB}{225,95,0}
+\definecolor{JOLI}{RGB}{225,95,0}
+\newcommand\colorframed{%
+ \texorpdfstring{{\color{joli}\bfseries colorframed}}{colorframed}\xspace}
+
+
+{\makeatletter\sbox0{\color{RawSienna}\xdef\foo{\current@color}}}
+ \edef\verbatimpushcolor{\special{color push \foo}}
+ \def\verbatimpopcolor{\special{color pop}}
+\AddToHook{env/verbatim/before}{\verbatimpushcolor}
+\AddToHook{env/verbatim/end}{\verbatimpopcolor}
+\begin{document}
+\maketitle
+
+\section{Description}
+
+This package fixes various colour leaks one encounters with
+the environments from Donald Arseneau's package
+\ctanpackage{framed}. Typically, colour leaks occur if using
+|\color| inside the environments, or more subtly also when
+using |\textcolor| with an argument ending up being split at a
+page break.
+
+This latter type of colour leak (or colour disappearance) is the
+more challenging one as the fix requires modifications or
+replacements not only of some of the \ctanpackage{framed}.sty
+macros (such as its |\CustomFBox|) but also to some \LaTeX2e
+internals, as some environments of \ctanpackage{framed}.sty
+rely on usage of |\fbox| or |\colorbox|.
+
+However, rather than overwriting such internal \LaTeX2e macros
+as |\@frameb@x| or |\color@b@x|, the \ctanpackage{framed}.sty
+environments are modified by \colorframed to make use of
+custom replacements to |\fbox|, |\colorbox|, and
+|\CustomFBox|.
+
+I am aware \ctanpackage{tcolorbox} package documentation explains at
+least one colour issue which looks similar to those fixed
+here in \ctanpackage{framed} context, and that the fix overthere uses
+an extra colour stack, hence is not xelatex compatible
+currently.
+
+The problems are solved here without involving an extra
+colour stack, hence the fixes work also with xelatex.
+
+% The analysis and original workarounds for using framed.sty
+% with colours were developed by me in some contributions I made
+% to the Sphinx project (\url{https://github.com/sphinx-doc/sphinx})
+% and I am transferring here the general idea.
+
+% The key thing is that the boxes handled by framed.sty may
+% contain isolated colour push or colour pop. We must make
+% sure an isolated colour push, if followed by colour changes,
+% is always followed by paired ones, and never by a colour pop
+% from a colour command originated "prior".
+
+% TODO: transfer also the breakable box environment based on pict2e
+% and allowing rounded corners and shadows developped overthere.
+
+\section{The environments from \ctanpackage{framed}}
+
+\begin{titled-frame}{A list of the environments from package \ctanpackage{framed}}
+ This indicates the boxing macros they are
+ based upon originally, and what this package does as replacement:
+ \begin{description}
+ \item[framed] (|\fbox|) The \colorframed variant uses own |\CustomFBox| rather.
+
+ \item[oframed] (|\CustomFBox|) \colorframed replaces it with own version.
+
+ \item[titled-frame] (|\CustomFbox|) Replaced by own version.
+
+ \item[shaded] (|\colorbox|) Replaced by |\colorframedcolorbox|.
+
+ \item[shaded*] (|\colorbox|) Idem.
+
+ \item[snugshade] (|\colorbox|) Idem.
+
+ \item[snugshade*] (|\colorbox|) Idem.
+
+ \item[leftbar] This one does not use any boxing macro.
+ \end{description}
+\end{titled-frame}
+
+\begin{shaded*}
+ We refer the reader to \ctanpackage{framed} documentation
+ and provide here only a few additional details, particularly
+ regarding the `titled-frame' environment as it is described
+ in \ctanpackage{framed} documentation more as being a
+ template than a user-level finalized environment. The above
+ box gives an example of its use. It is an environment with
+ one mandatory argument which provides the title of the
+ frame, which is repeated after a page break with |(cont)|
+ appended. The colours |TFFrameColor| and
+ |TFTitleColor| must be defined by user. To customize
+ further one will need to renew the environment definition,
+ which is left untouched by \colorframed (which modifies
+ rather |\TitleBarFrame| and |\CustomFBox|). Here is
+ how this environment is defined:
+\begin{verbatim}
+% A particular type of titled frame with continuation marks.
+% Parameter #1 is the title, repeated on each page.
+\newenvironment{titled-frame}[1]{%
+ \def\FrameCommand{\fboxsep8pt\fboxrule2pt
+ \TitleBarFrame{\textbf{#1}}}%
+ \def\FirstFrameCommand{\fboxsep8pt\fboxrule2pt
+ \TitleBarFrame[$\blacktriangleright$]{\textbf{#1}}}%
+ \def\MidFrameCommand{\fboxsep8pt\fboxrule2pt
+ \TitleBarFrame[$\blacktriangleright$]{\textbf{#1\ (cont)}}}%
+ \def\LastFrameCommand{\fboxsep8pt\fboxrule2pt
+ \TitleBarFrame{\textbf{#1\ (cont)}}}%
+ \MakeFramed{\advance\hsize-20pt \FrameRestore}}%
+% note: 8 + 2 + 8 + 2 = 20. Don't use \width because the frame title
+% could interfere with the width measurement.
+ {\endMakeFramed}
+\end{verbatim}
+% pas de \footnote dans les environnements de framed...
+\begin{footnotesize}\normalcolor
+As a side note, this `titled-frame' environment was partly
+broken in recent \LaTeX\ which has modified how |\smash|
+behaves; \colorframed fixes it in passing.\par
+\end{footnotesize}
+\end{shaded*}
+% jeudi 22 septembre 2022 à 14:37:08
+% Il se passe des choses très bizarres avec snugshade* ou
+% framed en premier après un \item qui me semblent être des
+% bugs de framed. Dans Sphinx, je n'ai pas eu ces problèmes,
+% au contraire je suis sûr que ça fonctionne avec les
+% environnements que j'y ai définis reposant sur framed (et un
+% \trivlist en général), j'ai testé plusieurs fois.
+% Ce n'est pas induit par colorframed j'ai vérifié sans lui.
+%\begin{enumerate}
+%\item\relax% {\footnotesize Now testing the `snugshade*' environment.}
+\begin{snugshade*}\textcolor{ForestGreen}{% using textcolor to
+ % avoid extra vspace from \color
+ One does not need to dive into the details of the macros
+ used above to understand intuitively how they are supposed
+ to influence the final output. To modify this output,
+ simply redefine this environment with suitable changes.
+ Notice in particular that \expandafter|\string\blacktriangleright| requires to
+ the best of my knowledge loading of \ctanpackage{amssymb} or
+ other math symbols package and it is up to user to do it, if
+ its usage is kept.}
+%\end{snugshade*}
+%\item\relax% {\footnotesize It appears to have a bug of not being
+% usable directly after |\item|.\par}
+%\begin{snugshade*}
+
+The original environment gives to the continuation label at
+bottom right of the first part of a broken box the same colour
+as the frame. The \colorframed variant adds the possibility
+to customize this colour via suitably defining a macro, in the
+example above we did:
+\begin{verbatim}
+\renewcommand\colorframedTFconlabcolorcommand{\color{red}}
+\end{verbatim}
+\end{snugshade*}
+%\end{enumerate}
+
+\begin{framed}
+ This is an example of usage of the environment `framed'.
+
+ This environment allows customization of the border width
+ and of the separation with contents, via |\FrameRule| and
+ |\FrameSep|, but not of the colour of the border. The
+ \colorframed version adds this possibility: it is simply a
+ matter of redefining the |\colorframedbordercolorcommand|
+ macro, which defaults to |\normalcolor|.
+
+\color{blue}
+ So the current frame was configured using:
+\begin{verbatim}
+\setlength{\FrameRule}{5pt}
+\setlength{\FrameSep}{9pt}
+\renewcommand\colorframedbordercolorcommand{\color{red!20}}
+\end{verbatim}
+ The text colour induced from a |\color{blue}|
+ will not leak out to the frame or to the text following this
+ environment, even in case of a pagebreak.
+\end{framed}
+
+As indicated the aim of \colorframed is not to modify the
+existing environments of \ctanpackage{framed}.sty into
+acquiring more capabilities and customizability, and we have
+indicated already the two sole customization additions. The aim
+was strictly to fix the colour leak issues.
+
+\section{TODO}
+
+The author has developed based upon usage of
+\ctanpackage{pict2e} breakable boxes with round corners,
+background colour, optional shadow, and other goodies and is
+planning on incorporating this environment into the package.
+
+Of course, it will remain limited in comparison to the fully
+customizable boxes provided by package \ctanpackage{tcolorbox}
+but our testing showed significant speed-up in build time, which
+may matter for long documents.
+
+Hopefully this addition will be done when time will permit.
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/colorframed/colorframed.sty b/macros/latex/contrib/colorframed/colorframed.sty
new file mode 100644
index 0000000000..db6a5d5e2f
--- /dev/null
+++ b/macros/latex/contrib/colorframed/colorframed.sty
@@ -0,0 +1,156 @@
+% colorframed.sty v0.9 2022/09/22
+% Copyright (c) 2022 Jean-François Burnol
+% Distributed under the terms of the LPPL 1.3c, see README.md
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{colorframed}
+ [2022/09/22 v0.9 fix `framed' breakable boxes colour leaks (JFB)]
+\RequirePackage{framed}
+\RequirePackage{color}
+% First we must make \MakeFramed/\endMakeFramed colour safe.
+\expandafter\def\expandafter\MakeFramed\expandafter#\expandafter1\expandafter
+ {\MakeFramed{#1}\color@begingroup}
+\expandafter\def\expandafter\endMakeFramed\expandafter
+ {\expandafter\color@endgroup\endMakeFramed}
+%
+% `framed'
+\def\FrameCommand{%
+ \setlength\fboxrule{\FrameRule}\setlength\fboxsep{\FrameSep}%
+ \CustomFBox{}{}\fboxrule\fboxrule\fboxrule\fboxrule % replaces \fbox
+}
+% The frame colour can be set via modifying this macro.
+\def\colorframedbordercolorcommand{\normalcolor}
+%
+% `shaded', `shaded*', `snugshade', `snugshade*'
+% The \colorbox in \FrameCommand is replaced by \colorframedcolorbox
+\renewenvironment{shaded}{%
+ \def\FrameCommand{\fboxsep=\FrameSep
+ \colorframedcolorbox{shadecolor}}%<<<< MODIFIED
+ \MakeFramed {\FrameRestore}}%
+ {\endMakeFramed}
+\renewenvironment{shaded*}{%
+ \def\FrameCommand{\fboxsep=\FrameSep
+ \colorframedcolorbox{shadecolor}}%<<<< MODIFIED
+ \MakeFramed {\advance\hsize-\width \FrameRestore}}%
+ {\endMakeFramed}
+\renewenvironment{snugshade}{%
+ \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
+ \colorframedcolorbox{shadecolor}{##1}%<<<< MODIFIED
+ \hskip-\fboxsep
+ % There is no \@totalrightmargin, so:
+ \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
+ \MakeFramed {\advance\hsize-\width
+ \@totalleftmargin\z@ \linewidth\hsize
+ \@setminipage}%
+ }{\par\unskip\@minipagefalse\endMakeFramed}
+\renewenvironment{snugshade*}{%
+ \def\FrameCommand##1{\hskip\@totalleftmargin
+ \colorframedcolorbox{shadecolor}{##1}%<<<< MODIFIED
+ % There is no \@totalrightmargin, so:
+ \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
+ \MakeFramed {\advance\hsize-\width
+ \@totalleftmargin\z@ \linewidth\hsize
+ \advance\labelsep\fboxsep
+ \@setminipage}%
+ }{\par\unskip\@minipagefalse\endMakeFramed}
+% The \colorframedcolorbox was obtained via a process of trimming from some
+% far more capable box, hence some possibly strange looking or sub-optimal
+% code; but we did not want to keep extra capabilities and have to provide
+% interface for that...
+\def\colorframedcolorbox#1#2{%
+ % #1 is in our usage always "shadecolor" (which has to be defined by user)
+ % #2 is in our usage always a box or rule
+ \leavevmode% this is not needed in our usage
+ \hbox{%
+ \setbox\@tempboxa\hbox{\kern\fboxsep{#2}\kern\fboxsep}%
+ \ht\@tempboxa
+ \dimexpr\ht\@tempboxa+\fboxsep\relax
+ \dp\@tempboxa
+ \dimexpr\dp\@tempboxa+\fboxsep\relax
+ % BACKGROUND
+ % draw background and move back to reference point
+ {\color{#1}%
+ \vrule\@height\ht\@tempboxa
+ \@depth\dp\@tempboxa
+ \@width\wd\@tempboxa
+ \kern-\wd\@tempboxa
+ }%
+ % CONTENTS
+ \box\@tempboxa
+ }%
+}
+%
+% `oframed' and `titled-frame'
+% The \CustomFBox redefinition.
+% Refer to framed.sty for significance of the parameters.
+% We have not wrapped #3, #4, #5, #6 thicknesses in \dimexpr.
+% Generally speaking, no attempt here to make this macro more
+% versatile than is the original.
+% Our version tries to let #1 and #2 have same effect as in original
+% (where they are only used for titled-frame environment, and
+% it thus seems to be sort of a convention that #2 has no height.)
+\long\def\CustomFBox#1#2#3#4#5#6#7{%
+ \leavevmode\begingroup
+ \setbox\@tempboxa\hbox{%
+ \color@begingroup
+ \kern\fboxsep{#7}\kern\fboxsep
+ \color@endgroup}%
+ \hbox{%
+ \ht\@tempboxa
+ \dimexpr\ht\@tempboxa+\fboxsep+#3\relax % cf "overlap" remark below
+ \dp\@tempboxa
+ \dimexpr\dp\@tempboxa+\fboxsep+#4\relax
+ \setbox\z@\hbox
+ {\vrule\@width#5\relax
+ \kern\wd\@tempboxa
+ \vrule\@width#6\relax
+ }%
+ \ht\z@\ht\@tempboxa
+ \dp\z@\dp\@tempboxa
+ \vbox{%
+ \colorframedbordercolorcommand % defaults to \normalcolor
+ \hrule\@height#3\relax
+ \kern-#3\relax
+ #1%
+ \copy\z@ % deliberate overlap hrules+vrules to avoid anti-aliasing artefacts
+ \kern-#4\relax
+ #2%
+ \hrule\@height#4\relax
+ \kern-\dp\@tempboxa
+ }%
+ \kern-\wd\z@
+ \kern#5\relax
+ \box\@tempboxa
+ \kern#6\relax
+ }%
+ \endgroup
+}
+% The titled-frame environment depends in part on this macro,
+% whose original in framed.sty has various colour problems.
+% We have indicated the modifications, additionally to using
+% our modified \CustomFBox.
+% Original let the continuation label use same colour as frame.
+% Let make this customizable.
+\let\colorframedTFconlabcolorcommand\empty
+\renewcommand\TitleBarFrame[3][]{\begingroup
+ \ifx\delimiter#1\delimiter
+ \let\TF@conlab\@empty
+ \else
+ \def\TF@conlab{%
+ \nointerlineskip
+ \hbox{%<<<< ADDED (needed due to \smash doing \leavevmode nowadays)
+ \colorframedTFconlabcolorcommand%<<<< ADDED
+ \smash{\rlap{\kern\wd\@tempboxa\kern\fboxrule\kern\fboxsep #1}}}%
+ }%<<<< ADDED
+ \fi
+ %\let\TF@savecolor\current@color%<<<< REMOVED
+ %\textcolor{TFFrameColor}{% <<<< REMOVED
+ \def\colorframedbordercolorcommand{\color{TFFrameColor}}%<<<< ADDED
+ \CustomFBox
+ {\TF@Title{#2}}{\TF@conlab}%
+ \fboxrule\fboxrule\fboxrule\fboxrule
+ {%\let\current@color\TF@savecolor\set@color%<<<< REMOVED
+ #3}%
+ %}% <<<< REMOVED
+ \endgroup
+}
+\endinput
diff --git a/macros/latex/contrib/hyperref/README.md b/macros/latex/contrib/hyperref/README.md
index 7efd675aba..71ecefab3e 100644
--- a/macros/latex/contrib/hyperref/README.md
+++ b/macros/latex/contrib/hyperref/README.md
@@ -1,6 +1,6 @@
# README for hyperref bundle
-Version 2022-06-20 v7.00s
+Version 2022-09-22 v7.00t
## INTRODUCTION
diff --git a/macros/latex/contrib/hyperref/doc/backref.pdf b/macros/latex/contrib/hyperref/doc/backref.pdf
index f6d933dc98..0f2ad5cc10 100644
--- a/macros/latex/contrib/hyperref/doc/backref.pdf
+++ b/macros/latex/contrib/hyperref/doc/backref.pdf
Binary files differ
diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.html b/macros/latex/contrib/hyperref/doc/hyperref-doc.html
index fe11247a9f..aee3f8ddd2 100644
--- a/macros/latex/contrib/hyperref/doc/hyperref-doc.html
+++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.html
@@ -25,7 +25,7 @@ href="https://github.com/latex3/hyperref/issues" class="url" ><span
class="ec-lmvtt-10x-x-120">https://github.com/latex3/hyperref/issues</span></a><span
class="ec-lmr-12">)</span></div><br />
<div class="date" ><span
-class="ec-lmr-12">2022-06-20 v7.00s</span></div>
+class="ec-lmr-12">2022-09-22 v7.00t</span></div>
</div>
<h3 class="likesectionHead"><a
id="x1-1000"></a>Contents</h3>
@@ -4111,7 +4111,7 @@ class="ec-lmvtt-10">}</span></span></span> </td>
<!--l. 1274--><p class="noindent" >The <span
class="ec-lmri-10">text </span>is made a hyperlink to the <span
class="ec-lmri-10">URL</span>; this must be a full URL (relative to the base URL, if that is
-defined). The special characters # and &#x02DC; do <span
+defined). The special characters # and % do <span
class="ec-lmri-10">not </span>need to be escaped in any way (unless the command is
used in the argument of another command).
<!--l. 1279--><p class="indent" > The optional argument <span
diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf
index 73a527cfb7..b9244c8f3f 100644
--- a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf
+++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex
index f73be90ac4..1cc482538b 100644
--- a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex
+++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex
@@ -166,7 +166,7 @@
}
\makeatother
\title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}}
-\date{2022-06-20 v7.00s}
+\date{2022-09-22 v7.00t}
\begin{document}
@@ -401,31 +401,31 @@ which are used in toc like lists and \cs{addcontentsline}. Typical values are
\end{description}
-\subsection{Values of package and \cs{hypersetup} options}
+\subsection{Values of package and \cs{hypersetup} options}
When\marginpar{\tiny New in version 7.00s}
a key is set either in the package options or with
-\cs{hypersetup} \xpackage{hyperref} typically
+\cs{hypersetup} \xpackage{hyperref} typically
stores the result in internal variables, or executes some
-code or sets a internal boolean.
+code or sets a internal boolean.
Package and class authors should here \emph{not} rely on
-the names or the details of the key processing.
+the names or the details of the key processing.
But as other packages sometimes need to know which value has been set,
some values can be retrieved with the expandable
-\cs{GetDocumentProperties}. The values are given back
+\cs{GetDocumentProperties}. The values are given back
surrounded by \cs{exp\_not:n}, so can be used safely in an \cs{edef}.
-So for example to get the pdfauthor you can do.
+So for example to get the pdfauthor you can do.
\begin{verbatim}
\edef\mypdfauthor{\GetDocumentProperties{hyperref/pdfauthor}}
\end{verbatim}
The values are given back as entered by the user! If they should be used in a PDF context
-\cs{pdfstringdef} or something equivalent must still be applied.
+\cs{pdfstringdef} or something equivalent must still be applied.
-Currently this interface can be used for the keys \texttt{pdfauthor}, \texttt{pdftitle},
+Currently this interface can be used for the keys \texttt{pdfauthor}, \texttt{pdftitle},
\texttt{pdfproducer},
-\texttt{pdfcreator}, \texttt{pdfsubject} and \texttt{pdfkeywords}.
+\texttt{pdfcreator}, \texttt{pdfsubject} and \texttt{pdfkeywords}.
If used with a unknown key an empty value is returned.
The interface works also if the new PDF management is loaded with \cs{DocumentMetadata}, in this
case more keys gives back their value.
@@ -1273,7 +1273,7 @@ following low-level user macros are provided:
\noindent The \emph{text} is made a hyperlink to the \emph{URL}; this
must be a full URL (relative to the base URL, if that is defined). The
-special characters \# and \~{} do \emph{not} need to be escaped in any
+special characters \# and \%{} do \emph{not} need to be escaped in any
way (unless the command is used in the argument of another command).
The optional argument \emph{options} recognizes the hyperref options
diff --git a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf
index 1bef8d1a4e..44cc9b0b06 100644
--- a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf
+++ b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf
Binary files differ
diff --git a/macros/latex/contrib/hyperref/doc/hyperref.pdf b/macros/latex/contrib/hyperref/doc/hyperref.pdf
index 0662cf87b0..b52703cc40 100644
--- a/macros/latex/contrib/hyperref/doc/hyperref.pdf
+++ b/macros/latex/contrib/hyperref/doc/hyperref.pdf
Binary files differ
diff --git a/macros/latex/contrib/hyperref/doc/nameref.pdf b/macros/latex/contrib/hyperref/doc/nameref.pdf
index 6cf129cde9..420f41424e 100644
--- a/macros/latex/contrib/hyperref/doc/nameref.pdf
+++ b/macros/latex/contrib/hyperref/doc/nameref.pdf
Binary files differ
diff --git a/macros/latex/contrib/hyperref/hluatex.dtx b/macros/latex/contrib/hyperref/hluatex.dtx
index 765a9c19a9..3675cd0cec 100644
--- a/macros/latex/contrib/hyperref/hluatex.dtx
+++ b/macros/latex/contrib/hyperref/hluatex.dtx
@@ -1,6 +1,6 @@
% \iffalse
% Source File: hluatex.dtx
-% 2022-06-20 v7.00s
+% 2022-09-22 v7.00t
%
% Copyright
% 2016-2019 Oberdiek Package Support Group
@@ -31,7 +31,7 @@
%
% \begin{macrocode}
%<*luatex>
-%% 2022-06-20 v7.00s
+%% 2022-09-22 v7.00t
%% force unicode encoding, see issue #101
%% code mostly copied from hxetex.def
\HyPsd@LoadUnicode
@@ -751,10 +751,26 @@
\fi
}{%
\ifdim\stockwidth>\z@
- \setlength{\pagewidth}{\stockwidth}%
- \fi
- \ifdim\stockheight>\z@
- \setlength{\pageheight}{\stockheight}%
+ \ifdim\stockheight>\z@
+ \setlength{\pagewidth}{\stockwidth}%
+ \setlength{\pageheight}{\stockheight}%
+ \else
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \setlength{\pagewidth}{\paperwidth}%
+ \setlength{\pageheight}{\paperheight}%
+ \fi
+ \fi
+ \fi
+ \else
+ \ifdim\stockwidth=\z@
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \setlength{\pagewidth}{\paperwidth}%
+ \setlength{\pageheight}{\paperheight}%
+ \fi
+ \fi
+ \fi
\fi
}%
}%
diff --git a/macros/latex/contrib/hyperref/hyperref-linktarget.dtx b/macros/latex/contrib/hyperref/hyperref-linktarget.dtx
index cd0557bcdb..d31a2009e2 100644
--- a/macros/latex/contrib/hyperref/hyperref-linktarget.dtx
+++ b/macros/latex/contrib/hyperref/hyperref-linktarget.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version v7.00s, released 2022-06-20}
+% \date{Version 2022-09-22 v7.00t}
%
% \maketitle
% \begin{documentation}
diff --git a/macros/latex/contrib/hyperref/hyperref-patches.dtx b/macros/latex/contrib/hyperref/hyperref-patches.dtx
index 446493224c..ebe25f7f62 100644
--- a/macros/latex/contrib/hyperref/hyperref-patches.dtx
+++ b/macros/latex/contrib/hyperref/hyperref-patches.dtx
@@ -55,7 +55,7 @@
% }^^A
% }
%
-% \date{Version 0.9, released 2021-06-29}
+% \date{Version 2022-09-22 v7.00t}
%
% \maketitle
% \begin{documentation}
diff --git a/macros/latex/contrib/hyperref/hyperref.dtx b/macros/latex/contrib/hyperref/hyperref.dtx
index 6baf1e5480..fb6aefd9b2 100644
--- a/macros/latex/contrib/hyperref/hyperref.dtx
+++ b/macros/latex/contrib/hyperref/hyperref.dtx
@@ -52,7 +52,7 @@
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
%<psdextra>\ProvidesFile{psdextra.def}
-%<!none&!packageEnd> [2022-06-20 v7.00s %
+%<!none&!packageEnd> [2022-09-22 v7.00t %
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -6696,7 +6696,7 @@
\def\HyperDestNameFilter#1{#1}
\Hy@AtBeginDocument{%
\begingroup
- \edef\x{\@ifundefined{stockheight}\paperheight\stockheight}%
+ \edef\x{\ifdim\stockheight>\z@ \stockheight\else\paperheight\fi}%
\dimen@=\x\relax
\ifdim\dimen@>\z@
\else
@@ -6985,6 +6985,11 @@
% \end{macrocode}
%
% \subsubsection{Driver loading}
+% Ensure that |\stockwidth| and |\stockheight| are defined
+% \begin{macrocode}
+\@ifundefined{stockwidth}{\newdimen\stockwidth}{}
+\@ifundefined{stockheight}{\newdimen\stockheight}{}
+% \end{macrocode}
%
% \begin{macrocode}
\Hy@AtEndOfPackage{%
@@ -8235,9 +8240,10 @@
% Provide a dummy default definition of \cs{hyper@newdestlabel}
% inside the .aux files.
% \begin{macrocode}
-\AddLineBeginAux{%
- \string\providecommand\string\hyper@newdestlabel[2]{}%
-}
+\AddToHook{include/before}
+ {\immediate\write\@partaux{\string\providecommand\string\hyper@newdestlabel[2]{}}}
+\AddToHook{begindocument}
+ {\immediate\write\@mainaux{\string\providecommand\string\hyper@newdestlabel[2]{}}}
% \end{macrocode}
%
% \section{Forms creation}
@@ -12704,15 +12710,7 @@
\fi
\fi
}
-\@ifpackageloaded{showkeys}{%
- \HyRef@ShowKeysInit
-}{%
- \Hy@AtBeginDocument{%
- \@ifpackageloaded{showkeys}{%
- \HyRef@ShowKeysInit
- }{}%
- }%
-}
+\AddToHook{package/showkeys/after}{\HyRef@ShowKeysInit}
% \end{macrocode}
% \end{macro}
%
@@ -13529,21 +13527,28 @@
\fi
\fi
}{%
- \ltx@IfUndefined{stockwidth}{%
- \ifdim\paperwidth>\z@
- \setlength{\pdfpagewidth}{\paperwidth}%
- \fi
- \ifdim\paperheight>\z@
- \setlength{\pdfpageheight}{\paperheight}%
- \fi
- }{%
- \ifdim\stockwidth>\z@
- \setlength{\pdfpagewidth}{\stockwidth}%
- \fi
+ \ifdim\stockwidth>\z@
\ifdim\stockheight>\z@
- \setlength{\pdfpageheight}{\stockheight}%
+ \setlength{\pdfpagewidth}{\stockwidth}%
+ \setlength{\pdfpageheight}{\stockheight}%
+ \else
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \setlength{\pdfpagewidth}{\paperwidth}%
+ \setlength{\pdfpageheight}{\paperheight}%
+ \fi
+ \fi
\fi
- }%
+ \else
+ \ifdim\stockwidth=\z@
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \setlength{\pdfpagewidth}{\paperwidth}%
+ \setlength{\pdfpageheight}{\paperheight}%
+ \fi
+ \fi
+ \fi
+ \fi
}%
}%
\Hy@DisableOption{setpagesize}%
@@ -14595,19 +14600,25 @@
\AtBeginShipoutFirst{%
\ifHy@setpagesize
\begingroup
- \@ifundefined{stockwidth}{%
- \ifdim\paperwidth>\z@
- \ifdim\paperheight>\z@
- \special{papersize=\the\paperwidth,\the\paperheight}%
+ \ifdim\stockwidth>\z@
+ \ifdim\stockheight>\z@
+ \special{papersize=\the\stockwidth,\the\stockheight}%
+ \else
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \fi
\fi
\fi
- }{%
- \ifdim\stockwidth>\z@
- \ifdim\stockheight>\z@
- \special{papersize=\the\stockwidth,\the\stockheight}%
+ \else
+ \ifdim\stockwidth=\z@
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \fi
\fi
\fi
- }%
+ \fi
\endgroup
\fi
\Hy@DisableOption{setpagesize}%
@@ -14743,32 +14754,35 @@
% it avoids the definition and the hash table entry of a
% previous undefined macro.
% \begin{macrocode}
-\ifx\mediaheight\@undefined
-\else
- \ifx\mediaheight\relax
- \else
- \ifHy@setpagesize
- \providecommand*{\VTeXInitMediaSize}{%
- \ltx@IfUndefined{stockwidth}{%
- \ifdim\paperheight>0pt %
- \setlength\mediaheight\paperheight
- \fi
- \ifdim\paperheight>0pt %
- \setlength\mediawidth\paperwidth
- \fi
- }{%
- \ifdim\stockheight>0pt %
- \setlength\mediaheight\stockheight
- \fi
- \ifdim\stockwidth>0pt %
- \setlength\mediawidth\stockwidth
- \fi
- }%
- }%
- \Hy@AtBeginDocument{\VTeXInitMediaSize}%
- \fi
- \Hy@DisableOption{setpagesize}%
+\ifcsname mediaheight\endcsname
+ \ifHy@setpagesize
+ \providecommand*{\VTeXInitMediaSize}{%
+ \ifdim\stockwidth>\z@
+ \ifdim\stockheight>\z@
+ \setlength\mediaheight\stockheight
+ \setlength\mediawidth\stockwidth
+ \else
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \setlength\mediaheight\paperheight
+ \setlength\mediawidth\paperwidth
+ \fi
+ \fi
+ \fi
+ \else
+ \ifdim\stockwidth=\z@
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \setlength\mediaheight\paperheight
+ \setlength\mediawidth\paperwidth
+ \fi
+ \fi
+ \fi
+ \fi
+ }%
+ \Hy@AtBeginDocument{\VTeXInitMediaSize}%
\fi
+ \Hy@DisableOption{setpagesize}%
\fi
% \end{macrocode}
% Older versions of VTeX require |xyz| in lower case.
@@ -16395,19 +16409,25 @@
\AtBeginShipoutFirst{%
\ifHy@setpagesize
\begingroup
- \@ifundefined{stockwidth}{%
- \ifdim\paperwidth>\z@
- \ifdim\paperheight>\z@
- \special{papersize=\the\paperwidth,\the\paperheight}%
+ \ifdim\stockwidth>\z@
+ \ifdim\stockheight>\z@
+ \special{papersize=\the\stockwidth,\the\stockheight}%
+ \else
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \fi
\fi
\fi
- }{%
- \ifdim\stockwidth>\z@
- \ifdim\stockheight>\z@
- \special{papersize=\the\stockwidth,\the\stockheight}%
+ \else
+ \ifdim\stockwidth=\z@
+ \ifdim\paperwidth>\z@
+ \ifdim\paperheight>\z@
+ \special{papersize=\the\paperwidth,\the\paperheight}%
+ \fi
\fi
\fi
- }%
+ \fi
\endgroup
\fi
\Hy@DisableOption{setpagesize}%
diff --git a/macros/latex/contrib/hyperref/xr-hyper.sty b/macros/latex/contrib/hyperref/xr-hyper.sty
index fecbdeca12..9472448b3a 100644
--- a/macros/latex/contrib/hyperref/xr-hyper.sty
+++ b/macros/latex/contrib/hyperref/xr-hyper.sty
@@ -61,7 +61,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xr-hyper}
- [2022-06-20 v7.00s eXternal References (DPC)]
+ [2022-09-22 v7.00t eXternal References (DPC)]
\def\externaldocument{\@testopt\XR@cite{}}
\let\externalcitedocument\externaldocument
diff --git a/macros/latex/contrib/oberdiek/README.md b/macros/latex/contrib/oberdiek/README.md
index 682184dc81..b38e432684 100644
--- a/macros/latex/contrib/oberdiek/README.md
+++ b/macros/latex/contrib/oberdiek/README.md
@@ -1,6 +1,6 @@
# Oberdiek bundle
-Version: 2021-11-15
+Version: 2022-09-21
This file describes the directory
CTAN:macros/latex/contrib/oberdiek/
@@ -11,7 +11,7 @@ It contains several packages:
## Copyright (C)
* 2007, 2009-2011 Heiko Oberdiek
-* 2016-2020 Oberdiek Package Support Group
+* 2016-2022 Oberdiek Package Support Group
## License
LATEX Project Public License, version 1.3c or later.
@@ -53,9 +53,7 @@ Other files in the CTAN directory:
* hyphsubst: substitute hyphenation patterns;
* ifdraft: switch for option draft;
* iflang: provides expandable checks for the current language;
-* pagegrid: prints a page grid in the background;
* pdfcolfoot: using pdfTeX’s color stack for footnotes;
-* pdfcol: macros for setting and maintaining new color stacks;
* pdfcolparallel: fixes colour problems in package parallel;
* pdfcolparcolumns: fixes colour problems in package parcolumns;
* pdfcrypt: setting PDF encryption;
diff --git a/macros/latex/contrib/oberdiek/aliascnt.pdf b/macros/latex/contrib/oberdiek/aliascnt.pdf
index 3d37bde0a6..8b606cc806 100644
--- a/macros/latex/contrib/oberdiek/aliascnt.pdf
+++ b/macros/latex/contrib/oberdiek/aliascnt.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/bmpsize.pdf b/macros/latex/contrib/oberdiek/bmpsize.pdf
index f551dcd1d6..12c25efac6 100644
--- a/macros/latex/contrib/oberdiek/bmpsize.pdf
+++ b/macros/latex/contrib/oberdiek/bmpsize.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/centernot.pdf b/macros/latex/contrib/oberdiek/centernot.pdf
index 1c365a0a29..62f2d9da69 100644
--- a/macros/latex/contrib/oberdiek/centernot.pdf
+++ b/macros/latex/contrib/oberdiek/centernot.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/chemarr.pdf b/macros/latex/contrib/oberdiek/chemarr.pdf
index 3be586e5ed..a0491c8dcc 100644
--- a/macros/latex/contrib/oberdiek/chemarr.pdf
+++ b/macros/latex/contrib/oberdiek/chemarr.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/classlist.pdf b/macros/latex/contrib/oberdiek/classlist.pdf
index 8ff7733158..f7489d1bd4 100644
--- a/macros/latex/contrib/oberdiek/classlist.pdf
+++ b/macros/latex/contrib/oberdiek/classlist.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/colonequals.pdf b/macros/latex/contrib/oberdiek/colonequals.pdf
index 8668c34d3d..5c3cb08f41 100644
--- a/macros/latex/contrib/oberdiek/colonequals.pdf
+++ b/macros/latex/contrib/oberdiek/colonequals.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/dvipscol.pdf b/macros/latex/contrib/oberdiek/dvipscol.pdf
index cf0e002b7d..8cb994eacc 100644
--- a/macros/latex/contrib/oberdiek/dvipscol.pdf
+++ b/macros/latex/contrib/oberdiek/dvipscol.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/engord.pdf b/macros/latex/contrib/oberdiek/engord.pdf
index 067fbca25b..3e45bede84 100644
--- a/macros/latex/contrib/oberdiek/engord.pdf
+++ b/macros/latex/contrib/oberdiek/engord.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/enparen.pdf b/macros/latex/contrib/oberdiek/enparen.pdf
index e085b3062e..c84e418b5f 100644
--- a/macros/latex/contrib/oberdiek/enparen.pdf
+++ b/macros/latex/contrib/oberdiek/enparen.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/eolgrab.pdf b/macros/latex/contrib/oberdiek/eolgrab.pdf
index c1b38c591e..23422c71bd 100644
--- a/macros/latex/contrib/oberdiek/eolgrab.pdf
+++ b/macros/latex/contrib/oberdiek/eolgrab.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/fibnum.pdf b/macros/latex/contrib/oberdiek/fibnum.pdf
index b471eb5ef9..838c7866a1 100644
--- a/macros/latex/contrib/oberdiek/fibnum.pdf
+++ b/macros/latex/contrib/oberdiek/fibnum.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/flags.pdf b/macros/latex/contrib/oberdiek/flags.pdf
index 4f476fc931..38cfdfce4e 100644
--- a/macros/latex/contrib/oberdiek/flags.pdf
+++ b/macros/latex/contrib/oberdiek/flags.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/holtxdoc.pdf b/macros/latex/contrib/oberdiek/holtxdoc.pdf
index 72f5ebe9bd..4defa8d604 100644
--- a/macros/latex/contrib/oberdiek/holtxdoc.pdf
+++ b/macros/latex/contrib/oberdiek/holtxdoc.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/hypbmsec.pdf b/macros/latex/contrib/oberdiek/hypbmsec.pdf
index e0aa81018e..29f5c45d4a 100644
--- a/macros/latex/contrib/oberdiek/hypbmsec.pdf
+++ b/macros/latex/contrib/oberdiek/hypbmsec.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/hypcap.pdf b/macros/latex/contrib/oberdiek/hypcap.pdf
index 0417e6f54f..302590434b 100644
--- a/macros/latex/contrib/oberdiek/hypcap.pdf
+++ b/macros/latex/contrib/oberdiek/hypcap.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/hypgotoe.pdf b/macros/latex/contrib/oberdiek/hypgotoe.pdf
index cfbc9e8f11..4237695b37 100644
--- a/macros/latex/contrib/oberdiek/hypgotoe.pdf
+++ b/macros/latex/contrib/oberdiek/hypgotoe.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/hyphsubst.pdf b/macros/latex/contrib/oberdiek/hyphsubst.pdf
index 318eb95edc..bebccb7585 100644
--- a/macros/latex/contrib/oberdiek/hyphsubst.pdf
+++ b/macros/latex/contrib/oberdiek/hyphsubst.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/ifdraft.pdf b/macros/latex/contrib/oberdiek/ifdraft.pdf
index 799e8b9c25..4745dadca8 100644
--- a/macros/latex/contrib/oberdiek/ifdraft.pdf
+++ b/macros/latex/contrib/oberdiek/ifdraft.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/iflang.pdf b/macros/latex/contrib/oberdiek/iflang.pdf
index b7f3a56530..de5fa254fe 100644
--- a/macros/latex/contrib/oberdiek/iflang.pdf
+++ b/macros/latex/contrib/oberdiek/iflang.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/oberdiek-bundle.bib b/macros/latex/contrib/oberdiek/oberdiek-bundle.bib
index 5639fc952c..1a584cc3e9 100644
--- a/macros/latex/contrib/oberdiek/oberdiek-bundle.bib
+++ b/macros/latex/contrib/oberdiek/oberdiek-bundle.bib
@@ -131,20 +131,6 @@
version={1.7},
url={https://ctan.org/pkg/iflang},
}
-@manual{oberdiek:pagegrid,
- title={The pagegrid package},
- author={Heiko Oberdiek},
- date={2016-05-16},
- version={1.5},
- url={https://ctan.org/pkg/pagegrid},
-}
-@manual{oberdiek:pdfcol,
- title={The pdfcol package},
- author={Heiko Oberdiek},
- date={2018-11-01},
- version={1.5},
- url={https://ctan.org/pkg/pdfcol},
-}
@manual{oberdiek:pdfcolfoot,
title={The pdfcolfoot package},
author={Heiko Oberdiek},
diff --git a/macros/latex/contrib/oberdiek/oberdiek.ins b/macros/latex/contrib/oberdiek/oberdiek.ins
index 81ee3c264b..ecf6df13a6 100644
--- a/macros/latex/contrib/oberdiek/oberdiek.ins
+++ b/macros/latex/contrib/oberdiek/oberdiek.ins
@@ -45,8 +45,6 @@
\batchinput{hyphsubst.dtx}
\batchinput{ifdraft.dtx}
\batchinput{iflang.dtx}
-\batchinput{pagegrid.dtx}
-\batchinput{pdfcol.dtx}
\batchinput{pdfcolfoot.dtx}
\batchinput{pdfcolparallel.dtx}
\batchinput{pdfcolparcolumns.dtx}
diff --git a/macros/latex/contrib/oberdiek/oberdiek.pdf b/macros/latex/contrib/oberdiek/oberdiek.pdf
index ae33dcf68a..1ee28ae509 100644
--- a/macros/latex/contrib/oberdiek/oberdiek.pdf
+++ b/macros/latex/contrib/oberdiek/oberdiek.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/oberdiek.tex b/macros/latex/contrib/oberdiek/oberdiek.tex
index 83bbce0aba..c8a2ae588b 100644
--- a/macros/latex/contrib/oberdiek/oberdiek.tex
+++ b/macros/latex/contrib/oberdiek/oberdiek.tex
@@ -10,7 +10,7 @@
\newcommand*{\Author}{Heiko Oberdiek}
\newcommand*{\Email}{ho-tex at tug.org}
-\newcommand*{\Date}{2021/11/15}
+\newcommand*{\Date}{2022/09/21}
% Copyright (C) 2006-2016 by
% Heiko Oberdiek
@@ -212,10 +212,6 @@
[\entrysep]
\entry{iflang}{Checks for the current language}%
[\entrysep]
-\entry{pagegrid}{Print page grid in background}%
-[\entrysep]
-\entry{pdfcol}{Handle new color stacks for \hologo{pdfTeX}}%
-[\entrysep]
\entry{pdfcolfoot}{Color stack for footnotes with \hologo{pdfTeX}}%
[\entrysep]
\entry{pdfcolparallel}{Color stacks support for parallel}%
@@ -450,26 +446,6 @@ based on macro \cs{languagename} or hyphenation patterns.
\tocinclude{iflang}
\newpage
-\subsection{\pkgsectformat{pagegrid}}
-\label{pagegrid}
-\begin{abstract}
-The \LaTeX\ package prints a page grid in the background.
-\end{abstract}
-\tocinclude{pagegrid}
-
-\newpage
-\subsection{\pkgsectformat{pdfcol}}
-\label{pdfcol}
-\begin{abstract}
-Since version 1.40 \pdfTeX\ supports color stacks.
-The driver file \xfile{pdftex.def} for package \xpackage{color}
-defines and uses a main color stack since version v0.04b.
-Package \xpackage{pdfcol} is intended for package writers.
-It defines macros for setting and maintaining new color stacks.
-\end{abstract}
-\tocinclude{pdfcol}
-
-\newpage
\subsection{\pkgsectformat{pdfcolfoot}}
\label{pdfcolfoot}
\begin{abstract}
diff --git a/macros/latex/contrib/oberdiek/pdfcolfoot.pdf b/macros/latex/contrib/oberdiek/pdfcolfoot.pdf
index d611ba65d2..bc2bcfc34f 100644
--- a/macros/latex/contrib/oberdiek/pdfcolfoot.pdf
+++ b/macros/latex/contrib/oberdiek/pdfcolfoot.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/pdfcolparallel.pdf b/macros/latex/contrib/oberdiek/pdfcolparallel.pdf
index 51c9014324..5bf37a6dea 100644
--- a/macros/latex/contrib/oberdiek/pdfcolparallel.pdf
+++ b/macros/latex/contrib/oberdiek/pdfcolparallel.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/pdfcolparcolumns.pdf b/macros/latex/contrib/oberdiek/pdfcolparcolumns.pdf
index 56a69feb08..9ef22b141b 100644
--- a/macros/latex/contrib/oberdiek/pdfcolparcolumns.pdf
+++ b/macros/latex/contrib/oberdiek/pdfcolparcolumns.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/pdfcrypt.pdf b/macros/latex/contrib/oberdiek/pdfcrypt.pdf
index 79740fa651..ebcfef66c0 100644
--- a/macros/latex/contrib/oberdiek/pdfcrypt.pdf
+++ b/macros/latex/contrib/oberdiek/pdfcrypt.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/pdfrender.pdf b/macros/latex/contrib/oberdiek/pdfrender.pdf
index ae0d3a5b51..f5d7da9a0f 100644
--- a/macros/latex/contrib/oberdiek/pdfrender.pdf
+++ b/macros/latex/contrib/oberdiek/pdfrender.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/protecteddef.pdf b/macros/latex/contrib/oberdiek/protecteddef.pdf
index 52d39ec04c..351db60331 100644
--- a/macros/latex/contrib/oberdiek/protecteddef.pdf
+++ b/macros/latex/contrib/oberdiek/protecteddef.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/resizegather.pdf b/macros/latex/contrib/oberdiek/resizegather.pdf
index 97a1ff7f44..7cbdc874d6 100644
--- a/macros/latex/contrib/oberdiek/resizegather.pdf
+++ b/macros/latex/contrib/oberdiek/resizegather.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/rotchiffre.pdf b/macros/latex/contrib/oberdiek/rotchiffre.pdf
index 15262166fd..db416d802d 100644
--- a/macros/latex/contrib/oberdiek/rotchiffre.pdf
+++ b/macros/latex/contrib/oberdiek/rotchiffre.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/scrindex.pdf b/macros/latex/contrib/oberdiek/scrindex.pdf
index d6a80e564c..0d5b4f9ff6 100644
--- a/macros/latex/contrib/oberdiek/scrindex.pdf
+++ b/macros/latex/contrib/oberdiek/scrindex.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/setouterhbox.pdf b/macros/latex/contrib/oberdiek/setouterhbox.pdf
index d63d0f6f4b..4c6388b5fb 100644
--- a/macros/latex/contrib/oberdiek/setouterhbox.pdf
+++ b/macros/latex/contrib/oberdiek/setouterhbox.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/settobox.pdf b/macros/latex/contrib/oberdiek/settobox.pdf
index 97e9a8862f..7c534622e3 100644
--- a/macros/latex/contrib/oberdiek/settobox.pdf
+++ b/macros/latex/contrib/oberdiek/settobox.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/stackrel.pdf b/macros/latex/contrib/oberdiek/stackrel.pdf
index c28caf4522..8cfb4f6e67 100644
--- a/macros/latex/contrib/oberdiek/stackrel.pdf
+++ b/macros/latex/contrib/oberdiek/stackrel.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/stampinclude.pdf b/macros/latex/contrib/oberdiek/stampinclude.pdf
index 1df073bb3a..853e3478c0 100644
--- a/macros/latex/contrib/oberdiek/stampinclude.pdf
+++ b/macros/latex/contrib/oberdiek/stampinclude.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/tabularht.pdf b/macros/latex/contrib/oberdiek/tabularht.pdf
index 7ef081099d..af03656d55 100644
--- a/macros/latex/contrib/oberdiek/tabularht.pdf
+++ b/macros/latex/contrib/oberdiek/tabularht.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/tabularkv.pdf b/macros/latex/contrib/oberdiek/tabularkv.pdf
index 25560a6b56..dd9bc6df3f 100644
--- a/macros/latex/contrib/oberdiek/tabularkv.pdf
+++ b/macros/latex/contrib/oberdiek/tabularkv.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/telprint.pdf b/macros/latex/contrib/oberdiek/telprint.pdf
index 0b8e6808b5..a01f02b13b 100644
--- a/macros/latex/contrib/oberdiek/telprint.pdf
+++ b/macros/latex/contrib/oberdiek/telprint.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/thepdfnumber.pdf b/macros/latex/contrib/oberdiek/thepdfnumber.pdf
index 8efaa9e500..a2a14e0cfc 100644
--- a/macros/latex/contrib/oberdiek/thepdfnumber.pdf
+++ b/macros/latex/contrib/oberdiek/thepdfnumber.pdf
Binary files differ
diff --git a/macros/latex/contrib/oberdiek/twoopt.pdf b/macros/latex/contrib/oberdiek/twoopt.pdf
index 5a1292e804..415203aef1 100644
--- a/macros/latex/contrib/oberdiek/twoopt.pdf
+++ b/macros/latex/contrib/oberdiek/twoopt.pdf
Binary files differ
diff --git a/macros/latex/contrib/pagegrid/README.md b/macros/latex/contrib/pagegrid/README.md
new file mode 100644
index 0000000000..2e9e50a1ec
--- /dev/null
+++ b/macros/latex/contrib/pagegrid/README.md
@@ -0,0 +1,12 @@
+# pagegrid package
+
+Version: 2022-09-21 v1.6
+
+This package prints a page grid in the background;
+
+## Copyright (C)
+* 2009 Heiko Oberdiek
+* 2016-2022 Oberdiek Package Support Group
+
+## License
+LATEX Project Public License, version 1.3c or later. \ No newline at end of file
diff --git a/macros/latex/contrib/oberdiek/pagegrid.dtx b/macros/latex/contrib/pagegrid/pagegrid.dtx
index 60c0794247..a38a4fe8de 100644
--- a/macros/latex/contrib/oberdiek/pagegrid.dtx
+++ b/macros/latex/contrib/pagegrid/pagegrid.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
% File: pagegrid.dtx
-% Version: 2016/05/16 v1.5
+% Version: 2022-09-21 v1.6
% Info: Print page grid in background
%
% Copyright (C)
% 2009 Heiko Oberdiek
-% 2016-2019 Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% 2016-2022 Oberdiek Package Support Group
+% https://github.com/ho-tex/pagegrid/issues
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -23,7 +23,7 @@
%
% The Current Maintainers of this work are
% Heiko Oberdiek and the Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% https://github.com/ho-tex/pagegrid/issues
%
% This work consists of the main source file pagegrid.dtx
% and the derived files
@@ -31,8 +31,8 @@
% pagegrid-test1.tex.
%
% Distribution:
-% CTAN:macros/latex/contrib/oberdiek/pagegrid.dtx
-% CTAN:macros/latex/contrib/oberdiek/pagegrid.pdf
+% CTAN:macros/latex/contrib/pagegrid/pagegrid.dtx
+% CTAN:macros/latex/contrib/pagegrid/pagegrid.pdf
%
% Unpacking:
% (a) If pagegrid.ins is present:
@@ -61,9 +61,9 @@
% pdflatex pagegrid.dtx
%
% Installation:
-% TDS:tex/latex/oberdiek/pagegrid.sty
-% TDS:doc/latex/oberdiek/pagegrid.pdf
-% TDS:source/latex/oberdiek/pagegrid.dtx
+% TDS:tex/latex/pagegrid/pagegrid.sty
+% TDS:doc/latex/pagegrid/pagegrid.pdf
+% TDS:source/latex/pagegrid/pagegrid.dtx
%
%<*ignore>
\begingroup
@@ -80,7 +80,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: pagegrid 2016/05/16 v1.5 Print page grid in background (HO)}
+\Msg{* Package: pagegrid 2022-09-21 v1.6 Print page grid in background (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -92,11 +92,11 @@
This is a generated file.
Project: pagegrid
-Version: 2016/05/16 v1.5
+Version: 2022-09-21 v1.6
Copyright (C)
2009 Heiko Oberdiek
- 2016-2019 Oberdiek Package Support Group
+ 2016-2022 Oberdiek Package Support Group
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -112,7 +112,7 @@ This work has the LPPL maintenance status "maintained".
The Current Maintainers of this work are
Heiko Oberdiek and the Oberdiek Package Support Group
-https://github.com/ho-tex/oberdiek/issues
+https://github.com/ho-tex/pagegrid/issues
This work consists of the main source file pagegrid.dtx
@@ -126,9 +126,9 @@ and the derived files
\generate{%
\file{pagegrid.ins}{\from{pagegrid.dtx}{install}}%
\file{pagegrid.drv}{\from{pagegrid.dtx}{driver}}%
- \usedir{tex/latex/oberdiek}%
+ \usedir{tex/latex/pagegrid}%
\file{pagegrid.sty}{\from{pagegrid.dtx}{package}}%
-% \usedir{doc/latex/oberdiek/test}%
+% \usedir{doc/latex/pagegrid/test}%
% \file{pagegrid-test1.tex}{\from{pagegrid.dtx}{test1}}%
}
@@ -156,7 +156,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pagegrid.drv}%
- [2016/05/16 v1.5 Print page grid in background (HO)]%
+ [2022-09-21 v1.6 Print page grid in background (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\begin{document}
@@ -170,9 +170,9 @@ and the derived files
% \GetFileInfo{pagegrid.drv}
%
% \title{The \xpackage{pagegrid} package}
-% \date{2016/05/16 v1.5}
+% \date{2022-09-21 v1.6}
% \author{Heiko Oberdiek\thanks
-% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}}
+% {Please report any issues at \url{https://github.com/ho-tex/pagegrid/issues}}}
%
% \maketitle
%
@@ -314,7 +314,7 @@ and the derived files
% \end{quote}
% \textbf{Note:}
% The double output of the page has side effects.
-% All whatits are executed twice, for example: file writing
+% All whatsits are executed twice, for example: file writing
% and anchor setting. Some unwanted actions are catched such
% as multiple \cs{label} definitions, duplicate entries in
% the table of contents. For bookmarks, use package \xpackage{bookmarks}.
@@ -402,7 +402,7 @@ and the derived files
\fi
\expandafter\x\csname ver@pagegrid.sty\endcsname
\ProvidesPackage{pagegrid}%
- [2016/05/16 v1.5 Print page grid in background (HO)]%
+ [2022-09-21 v1.6 Print page grid in background (HO)]%
% \end{macrocode}
%
% \begin{macrocode}
@@ -473,14 +473,17 @@ and the derived files
\RequirePackage{kvoptions}[2009/07/17]
% \end{macrocode}
% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname stockwidth\endcsname\relax
- \def\pagegrid@width{\paperwidth}%
- \def\pagegrid@height{\paperheight}%
-\else
- \def\pagegrid@width{\stockwidth}%
- \def\pagegrid@height{\stockheight}%
-\fi
+\def\pagegrid@width{\paperwidth}%
+\def\pagegrid@height{\paperheight}%
+\@ifundefined{stockwidth}{}
+ {%
+ \ifdim \stockwidth > 0pt\relax
+ \ifdim \stockheight > 0pt \relax
+ \def\pagegrid@width{\stockwidth}%
+ \def\pagegrid@height{\stockheight}%
+ \fi
+ \fi
+ }
% \end{macrocode}
%
% \begin{macrocode}
@@ -759,30 +762,11 @@ and the derived files
% \paragraph{Package.} This package is available on
% CTAN\footnote{\CTANpkg{pagegrid}}:
% \begin{description}
-% \item[\CTAN{macros/latex/contrib/oberdiek/pagegrid.dtx}] The source file.
-% \item[\CTAN{macros/latex/contrib/oberdiek/pagegrid.pdf}] Documentation.
+% \item[\CTAN{macros/latex/contrib/pagegrid/pagegrid.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/pagegrid/pagegrid.pdf}] Documentation.
% \end{description}
%
%
-% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}]
-% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
-%
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-% |unzip oberdiek.tds.zip -d ~/texmf|
-% \end{quote}
%
% \subsection{Package installation}
%
@@ -799,9 +783,9 @@ and the derived files
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% pagegrid.sty & tex/latex/oberdiek/pagegrid.sty\\
-% pagegrid.pdf & doc/latex/oberdiek/pagegrid.pdf\\
-% pagegrid.dtx & source/latex/oberdiek/pagegrid.dtx\\
+% pagegrid.sty & tex/latex/pagegrid/pagegrid.sty\\
+% pagegrid.pdf & doc/latex/pagegrid/pagegrid.pdf\\
+% pagegrid.dtx & source/latex/pagegrid/pagegrid.dtx\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
@@ -947,6 +931,9 @@ and the derived files
% \item
% Documentation updates.
% \end{Version}
+% \begin{Version}{2022-09-21 v1.6}
+% \item Adapted the test for stockwidth/stockheight to a change in the \LaTeX\ kernel.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/macros/latex/contrib/oberdiek/pagegrid.pdf b/macros/latex/contrib/pagegrid/pagegrid.pdf
index b5ea088818..589e3ea019 100644
--- a/macros/latex/contrib/oberdiek/pagegrid.pdf
+++ b/macros/latex/contrib/pagegrid/pagegrid.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfcol/README.md b/macros/latex/contrib/pdfcol/README.md
new file mode 100644
index 0000000000..e8281aeae1
--- /dev/null
+++ b/macros/latex/contrib/pdfcol/README.md
@@ -0,0 +1,18 @@
+# pdfcol
+
+Version: 2022-09-21 v1.7
+
+Macros for setting and maintaining new color stacks.
+
+Since version 1.40 pdfTeX supports color stacks.
+The driver file pdftex.def for package color
+defines and uses a main color stack since version v0.04b.
+Package pdfcol is intended for package writers.
+It defines macros for setting and maintaining new color stacks.
+
+## Copyright (C)
+* 2007 Heiko Oberdiek
+* 2016-2022 Oberdiek Package Support Group
+
+## License
+LATEX Project Public License, version 1.3c or later.
diff --git a/macros/latex/contrib/oberdiek/pdfcol.dtx b/macros/latex/contrib/pdfcol/pdfcol.dtx
index 8e30a6f451..7d8c4b3457 100644
--- a/macros/latex/contrib/oberdiek/pdfcol.dtx
+++ b/macros/latex/contrib/pdfcol/pdfcol.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
% File: pdfcol.dtx
-% Version: 2019/12/29 v1.6
+% Version: 2022-09-21 v1.7
% Info: Handle new color stacks for pdfTeX
%
% Copyright (C)
% 2007 Heiko Oberdiek
-% 2016-2019 Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% 2016-2022 Oberdiek Package Support Group
+% https://github.com/ho-tex/pdfcol/issues
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -23,7 +23,7 @@
%
% The Current Maintainers of this work are
% Heiko Oberdiek and the Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% https://github.com/ho-tex/pdfcol/issues
%
% The Base Interpreter refers to any `TeX-Format',
% because some files are installed in TDS:tex/generic//.
@@ -34,8 +34,8 @@
% pdfcol-test2.tex, pdfcol-test3.tex, pdfcol-test4.tex.
%
% Distribution:
-% CTAN:macros/latex/contrib/oberdiek/pdfcol.dtx
-% CTAN:macros/latex/contrib/oberdiek/pdfcol.pdf
+% CTAN:macros/latex/contrib/pdfcol/pdfcol.dtx
+% CTAN:macros/latex/contrib/pdfcol/pdfcol.pdf
%
% Unpacking:
% (a) If pdfcol.ins is present:
@@ -64,9 +64,9 @@
% pdflatex pdfcol.dtx
%
% Installation:
-% TDS:tex/generic/oberdiek/pdfcol.sty
-% TDS:doc/latex/oberdiek/pdfcol.pdf
-% TDS:source/latex/oberdiek/pdfcol.dtx
+% TDS:tex/generic/pdfcol/pdfcol.sty
+% TDS:doc/latex/pdfcol/pdfcol.pdf
+% TDS:source/latex/pdfcol/pdfcol.dtx
%
%<*ignore>
\begingroup
@@ -83,7 +83,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: pdfcol 2019/12/29 v1.6 Handle new color stacks for pdfTeX (HO)}
+\Msg{* Package: pdfcol 2022-09-21 v1.7 Handle new color stacks for pdfTeX (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -95,11 +95,11 @@
This is a generated file.
Project: pdfcol
-Version: 2019/12/29 v1.6
+Version: 2022-09-21 v1.7
Copyright (C)
2007 Heiko Oberdiek
- 2016-2019 Oberdiek Package Support Group
+ 2016-2022 Oberdiek Package Support Group
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -115,7 +115,7 @@ This work has the LPPL maintenance status "maintained".
The Current Maintainers of this work are
Heiko Oberdiek and the Oberdiek Package Support Group
-https://github.com/ho-tex/oberdiek/issues
+https://github.com/ho-tex/pdfcol/issues
The Base Interpreter refers to any `TeX-Format',
@@ -132,9 +132,9 @@ and the derived files
\generate{%
\file{pdfcol.ins}{\from{pdfcol.dtx}{install}}%
\file{pdfcol.drv}{\from{pdfcol.dtx}{driver}}%
- \usedir{tex/generic/oberdiek}%
+ \usedir{tex/generic/pdfcol}%
\file{pdfcol.sty}{\from{pdfcol.dtx}{package}}%
-% \usedir{doc/latex/oberdiek/test}%
+% \usedir{doc/latex/pdfcol/test}%
% \file{pdfcol-test1.tex}{\from{pdfcol.dtx}{test1}}%
% \file{pdfcol-test2.tex}{\from{pdfcol.dtx}{test2}}%
% \file{pdfcol-test3.tex}{\from{pdfcol.dtx}{test3}}%
@@ -165,7 +165,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pdfcol.drv}%
- [2019/12/29 v1.6 Handle new color stacks for pdfTeX (HO)]%
+ [2022-09-21 v1.7 Handle new color stacks for pdfTeX (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\begin{document}
@@ -179,9 +179,9 @@ and the derived files
% \GetFileInfo{pdfcol.drv}
%
% \title{The \xpackage{pdfcol} package}
-% \date{2019/12/29 v1.6}
+% \date{2022-09-21 v1.7}
% \author{Heiko Oberdiek\thanks
-% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}}
+% {Please report any issues at \url{https://github.com/ho-tex/pdfcol/issues}}}
%
% \maketitle
%
@@ -191,6 +191,7 @@ and the derived files
% defines and uses a main color stack since version v0.04b.
% Package \xpackage{pdfcol} is intended for package writers.
% It defines macros for setting and maintaining new color stacks.
+% It works also with lua\TeX.
% \end{abstract}
%
% \tableofcontents
@@ -217,12 +218,12 @@ and the derived files
%
% \begin{itemize}
% \item
-% \pdfTeX\ 1.40 or greater.
+% \pdfTeX\ 1.40 or greater or lua\TeX.
% \item
-% \pdfTeX in PDF mode. (I don't know a DVI driver that
+% \pdfTeX or lua\TeX\ in PDF mode. (I don't know a DVI driver that
% support several color stacks.)
% \item
-% \xfile{pdftex.def} 2007/01/02 v0.04b.
+% \xfile{pdftex.def} or \xfile{luatex.def} newer than 2007.
% \end{itemize}
% Package \xpackage{pdfcol} checks the requirements and
% sets switch \cs{ifpdfcolAvailable} accordingly.
@@ -236,7 +237,7 @@ and the derived files
% Otherwise the other interface macros in this section will
% be disabled with a message. Also the first use of such a
% macro will print a message. The messages are print to
-% the \xext{log} file only if \pdfTeX\ is not used in PDF mode.
+% the \xext{log} file only if \pdfTeX\ and lua\TeX\ not used in PDF mode.
%
% \begin{declcs}{pdfcolErrorNoStacks}
% \end{declcs}
@@ -246,7 +247,7 @@ and the derived files
% \begin{declcs}{pdfcolInitStack} \M{name}
% \end{declcs}
% A new color stack is initialized by \cs{pdfcolInitStack}.
-% The \meta{name} is used for indentifying the stack. It usually
+% The \meta{name} is used for identifying the stack. It usually
% consists of letters and digits. (The name must survive a \cs{csname}.)
%
% The intension of the macro is the definition of an additional
@@ -361,7 +362,7 @@ and the derived files
\fi
\expandafter\x\csname ver@pdfcol.sty\endcsname
\ProvidesPackage{pdfcol}%
- [2019/12/29 v1.6 Handle new color stacks for pdfTeX (HO)]%
+ [2022-09-21 v1.7 Handle new color stacks for pdfTeX (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
@@ -416,13 +417,12 @@ and the derived files
%
% \begin{macro}{\PDFCOL@RequirePackage}
% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname RequirePackage\endcsname\relax
- \def\PDFCOL@RequirePackage#1[#2]{\input #1.sty\relax}%
-\else
+\ifcsname RequirePackage\endcsname
\def\PDFCOL@RequirePackage#1[#2]{%
\RequirePackage{#1}[{#2}]%
}%
+\else
+ \def\PDFCOL@RequirePackage#1[#2]{\input #1.sty\relax}%
\fi
% \end{macrocode}
% \end{macro}
@@ -450,11 +450,10 @@ and the derived files
%
% \begin{macrocode}
\ltx@newif\ifPDFCOL@luacolor
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ver@luacolor.sty\endcsname\relax
- \PDFCOL@luacolorfalse
-\else
+\ifcsname ver@luacolor.sty\endcsname
\PDFCOL@luacolortrue
+\else
+ \PDFCOL@luacolorfalse
\fi
% \end{macrocode}
%
@@ -484,57 +483,18 @@ and the derived files
% \end{macrocode}
%
% \subsubsection{Check version of \pdfTeX}
-%
-% \begin{macrocode}
-\ifpdfcolAvailable
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdfcolorstack\endcsname\relax
- \pdfcolAvailablefalse
- \PDFCOL@Message{%
- Interface disabled because of too old pdfTeX.\MessageBreak
- Required is version 1.40+ for \string\pdfcolorstack
- }%
- \fi
-\fi
-\ifpdfcolAvailable
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname pdfcolorstack\endcsname\relax
- \pdfcolAvailablefalse
- \PDFCOL@Message{%
- Interface disabled because of too old pdfTeX.\MessageBreak
- Required is version 1.40+ for \string\pdfcolorstackinit
- }%
- \fi
-\fi
-% \end{macrocode}
+% The version check has been removed. We assume a new enough \pdfTeX.
%
% \subsubsection{Check \xfile{pdftex.def}}
-%
+% We no longer check the version but assume that it is new enough.
% \begin{macrocode}
\ifpdfcolAvailable
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname @pdfcolorstack\endcsname\relax
% \end{macrocode}
% Try to load package color if it is not yet loaded (\LaTeX\ case).
% \begin{macrocode}
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname ver@color.sty\endcsname\relax
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname documentclass\endcsname\relax
- \else
- \RequirePackage[pdftex]{color}\relax
- \fi
- \fi
- \begingroup\expandafter\expandafter\expandafter\endgroup
- \expandafter\ifx\csname @pdfcolorstack\endcsname\relax
- \pdfcolAvailablefalse
- \PDFCOL@Message{%
- Interface disabled because `pdftex.def'\MessageBreak
- is not loaded or it is too old.\MessageBreak
- Required is version 0.04b or greater%
- }%
- \fi
- \fi
+ \ifcsname documentclass\endcsname
+ \RequirePackage{color}
+ \fi
\fi
% \end{macrocode}
%
@@ -750,30 +710,10 @@ and the derived files
% \paragraph{Package.} This package is available on
% CTAN\footnote{\CTANpkg{pdfcol}}:
% \begin{description}
-% \item[\CTAN{macros/latex/contrib/oberdiek/pdfcol.dtx}] The source file.
-% \item[\CTAN{macros/latex/contrib/oberdiek/pdfcol.pdf}] Documentation.
-% \end{description}
-%
-%
-% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \item[\CTAN{macros/latex/contrib/pdfcol/pdfcol.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/pdfcol/pdfcol.pdf}] Documentation.
% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
%
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-% |unzip oberdiek.tds.zip -d ~/texmf|
-% \end{quote}
%
% \subsection{Package installation}
%
@@ -790,9 +730,9 @@ and the derived files
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% pdfcol.sty & tex/generic/oberdiek/pdfcol.sty\\
-% pdfcol.pdf & doc/latex/oberdiek/pdfcol.pdf\\
-% pdfcol.dtx & source/latex/oberdiek/pdfcol.dtx\\
+% pdfcol.sty & tex/generic/pdfcol/pdfcol.sty\\
+% pdfcol.pdf & doc/latex/pdfcol/pdfcol.pdf\\
+% pdfcol.dtx & source/latex/pdfcol/pdfcol.dtx\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
@@ -931,6 +871,9 @@ and the derived files
% \item
% \xpackage{iftex} package.
% \end{Version}
+% \begin{Version}{2022-09-21 v1.7}
+% \item Improved luatex compatitiblity, removed unneeded version checks.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/macros/latex/contrib/oberdiek/pdfcol.pdf b/macros/latex/contrib/pdfcol/pdfcol.pdf
index cfc5d41d3b..2c748d2c0f 100644
--- a/macros/latex/contrib/oberdiek/pdfcol.pdf
+++ b/macros/latex/contrib/pdfcol/pdfcol.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index 96ad581523..9ad760140f 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index 761c36edaf..d653c2ac21 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -60,8 +60,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\PLversion{1.2.5}
-\def\PLdate{3 Septembre 2022}
+\def\PLversion{1.2.6}
+\def\PLdate{22 Septembre 2022}
\tcbset{vignettes/.style={%
nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
@@ -233,6 +233,8 @@ Quelques commandes pour convertir bin/dec/hex avec certains détails.
Une commande pour, en \TikZ, créer un pixelart avec correction éventuelle.
+Une commande pour, en \TikZ, créer un SudoMaths non forcément $9\times9$.
+
\vspace{1.5cm}
\hfill{}\textit{Merci à Anne pour ses retours et sa relecture !}
@@ -3968,8 +3970,167 @@ D,-,-,D,-,D,D,F,F,F,F,F,F,D,D,-,-,-,-,D,-,-
\newpage
+\section{SudoMaths, en \TikZ}\label{sudomaths}
+
+\subsection{Introduction}
+
+\begin{codeidee}
+L'idée est de \textit{proposer} un environnement \TikZ, une commande permettant de tracer des grilles de SudoMaths.
+
+L'environnement créé, lié à \TikZ, trace la grille de SudoMaths (avec les blocs démarqués), et peut la remplir avec une liste d'éléments.
+\end{codeidee}
+
+\begin{codetex}[listing only]
+%grille classique non remplie, avec légendes H et V
+%les {} non nécessaires pour préciser que les cases seront "vides"
+\PLsudomaths{}
+\end{codetex}
+
+\begin{codesortie}
+\PLsudomaths{}
+\end{codesortie}
+
+\begin{codeinfo}
+La commande \ctex{PLsudomaths} crée donc la grille (remplie ou non), dans un environnement \TikZ, c'est \textit{c'est tout} !
+
+\smallskip
+
+Si on veut exploiter le tracé de la grille, on peut utiliser l'\textit{environnement} \ctex{PLenvsudomaths} dans lequel on peut rajouter toute commande en \TikZ{} !
+\end{codeinfo}
+
+\begin{codetex}[listing only]
+%grille "toute seule"
+\PLsudomaths[<options>]{<liste>}
+
+%grille avec ajout de code
+\begin{PLenvsudomaths}[<options>]{<grille>}
+ <commandes tikz> ;
+\end{PLenvsudomaths}
+\end{codetex}
+
+\pagebreak
+
+\subsection{Clés et options}
+
+\begin{codecles}
+Quelques \Cle{clés} sont disponibles pour cette commande :
+
+\begin{itemize}
+ \item la clé \Cle{epaisseurg} pour gérer l'épaisseur des traits épais ; \hfill~défaut \Cle{1.5pt}
+ \item la clé \Cle{epaisseur} pour gérer l'épaisseur des traits fins ; \hfill~défaut \Cle{0.5pt}
+ \item la clé \Cle{unite} qui est l'unité graphique de la figure ; \hfill~défaut \Cle{1cm}
+ \item la clé \Cle{couleurcase} pour la couleur (éventuelles) des cases ; \hfill~défaut \Cle{LightBlue!50}
+ \item la clé \Cle{couleurtexte} pour gérer la couleur du label des cases ; \hfill~défaut \Cle{blue}
+ \item la clé \Cle{nbcol} qui est le nombre de colonnes ; \hfill~défaut \Cle{9}
+ \item la clé \Cle{nbsubcol} qui est le nombre de sous-colonnes ; \hfill~défaut \Cle{3}
+ \item la clé \Cle{nblig} qui est le nombre de lignes ; \hfill~défaut \Cle{9}
+ \item la clé \Cle{nbsublig} qui est le nombre de sous-colonnes ; \hfill~défaut \Cle{3}
+ \item la clé \Cle{police} qui formatte le label des cases ; \hfill~défaut \Cle{\textbackslash{}normalfont\textbackslash{}normalsize}
+ \item le booléen \Cle{legendes} qui affiche ou non les légendes (H et V) des cases ; \hfill~défaut \Cle{true}
+ \item la clé \Cle{policeleg} qui formatte le label des légendes ; \hfill~défaut \Cle{\textbackslash{}normalfont\textbackslash{}normalsize}
+ \item la clé \Cle{listelegv} qui est la liste de la légende verticale ; \hfill~défaut \Cle{ABCD...WXYZ}
+ \item la clé \Cle{listelegh} qui est la liste de la légende horizontale ; \hfill~défaut \Cle{abcd...wxyz}
+ \item la clé \Cle{decallegende} qui est le décalage de la légende par rapport à la grille. \hfill~défaut \Cle{0.45}
+\end{itemize}
+\end{codecles}
+
+\begin{codeinfo}
+La liste éventuelle des éléments à rentrer dans le tableau est traitée par le package \ctex{listofitems}, et se présente sous la forme suivante : \ctex{ / / / ... / / § / / / ... / / § ... § / / / ... / / }
+
+\smallskip
+
+Il peut donc être intéressant de \textit{déclarer} la liste au préalable pour simplifier la saisie de la commande !
+\end{codeinfo}
+
+\begin{codeinfo}
+La \Cle{couleurcase} est gérée -- en interne -- par le caractère \ctex{*} qui permet de préciser qu'on veut que la case soit coloriée.
+\end{codeinfo}
+
+\begin{codetex}[listing only]
+%grille 6x6 avec blocs 2x3, avec coloration de cases (présentée sous forme de "cases")
+\def\grilleSuMa{%
+ (a)* / (b)* / / / (c)* / (d)* §%
+ (e)* / / / (f)* / (g)* / (h)* §%
+ / / (i)* / / / (j)* §%
+ / / (k)* / / (l)* / (m)* §%
+ (n)* / / (o)* / / / (p)* §%
+ / / / (q)* / / §%
+}
+
+\PLsudomaths[unite=0.75cm,nbcol=6,nbsubcol=2,nblig=6,nbsublig=3,police=\small\bfseries\ttfamily,%
+ couleurtexte=red,couleurcase=yellow!50,legendes=false]{\grilleSuMa}
+\end{codetex}
+
+\begin{codesortie}
+\def\grilleSuMa{%
+ (a)* / (b)* / / / (c)* / (d)* §%
+ (e)* / / / (f)* / (g)* / (h)* §%
+ / / (i)* / / / (j)* §%
+ / / (k)* / / (l)* / (m)* §%
+ (n)* / / (o)* / / / (p)* §%
+ / / / (q)* / / §%
+}
+
+\PLsudomaths[unite=0.75cm,nbcol=6,nbsubcol=2,nblig=6,nbsublig=3,police=\small\bfseries\ttfamily,couleurtexte=red,couleurcase=yellow!50,legendes=false]{\grilleSuMa}
+\end{codesortie}
+
+\pagebreak
+
+\begin{codeinfo}
+La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0\,;\,0)$ et $(\text{nbcol}\,;\,-\text{nblig})$, de sorte que les labels des cases sont situés au nœuds de coordonnées $(x,5\,;\,-y,5)$.
+\end{codeinfo}
+
+\begin{codetex}[listing only]
+%grille classique avec coloration de cases et commande tikz
+%graduations rajoutées pour la lecture des coordonnées
+\def\grilleSuMaB{%
+ */////4///§%
+ /*///3////§%
+ //*//////§%
+ ///*/////§%
+ ////*////§%
+ /////*///§%
+ //5*/////*/§%
+ /////B///*§%
+ *///9////Q/§%
+}
+
+\begin{PLenvsudomaths}[%
+ unite=0.66cm,police=\footnotesize\bfseries\ttfamily,couleurcase=ForestGreen!50,%
+ listelegv=QSDFGHJKL,listelegh=poiuytrez]{\grilleSuMaB}
+ \draw[red,very thick,<-] (7.5,-4.5) to[bend right] ++ (4,-1) node[right] {code rajouté...} ;
+\end{PLenvsudomaths}
+\end{codetex}
+
+\begin{codesortie}
+\def\grilleSuMaB{%
+ */////4///§%
+ /*///3////§%
+ //*//////§%
+ ///*/////§%
+ ////*////§%
+ /////*///§%
+ //5*/////*/§%
+ /////B///*§%
+ *///9////Q/§%
+}
+
+\begin{PLenvsudomaths}[%
+ unite=0.66cm,police=\footnotesize\bfseries\ttfamily,couleurcase=ForestGreen!50,%
+ listelegv=QSDFGHJKL,listelegh=poiuytrez]{\grilleSuMaB}
+ \draw[red,very thick,<-] (7.5,-4.5) to[bend right] ++ (4,-1) node[right] {code rajouté pour montrer la case \textsf{Ge}} ;
+ \foreach \x in {0,1,...,9} \draw[lightgray] (\x,-9) node[below,font=\scriptsize\ttfamily] {\x} ;
+ \foreach \y in {-1,-2,...,-9} \draw[lightgray] (9,\y) node[right,font=\scriptsize\ttfamily] {\y} ;
+ \draw[lightgray] (9,0) node[right,font=\scriptsize\ttfamily] {~0} ;
+\end{PLenvsudomaths}
+\end{codesortie}
+
+\newpage
+
\section{Historique}
+{\small \bverb|v1.2.6|~:~~~~Ajout d'un environnement pour des SudoMaths (page \pageref{sudomaths})
+
{\small \bverb|v1.2.5|~:~~~~Ajout de commandes pour des boîtes à moustaches (page \pageref{boiteamoustaches})
{\small \bverb|v1.2.4|~:~~~~Correction de quelques bugs mineurs, et mise à jour de la doc
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index 56dda985a4..7fdd37b256 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2022/09/03 v1.2.5 - Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2022/09/22 v1.2.6 - Aide pour l'utilisation de LaTeX en lycee]
+% 1.2.6 Ajout d'un environnement tikz pour des sudomaths personnalisés
% 1.2.5 Ajout d'une commande pour des boites à moustaches, en tikz
% 1.2.4 Correction de quelques bugs mineurs, et mise à jour de la doc
% 1.2.3 Ajout d'un environnement simplifié pour du code python
@@ -2011,7 +2012,7 @@
\def\BaMaxexmax{\fpeval{\BaMAxeMax+\BaMAxeElarg*\BaMaxelargeur}}
\draw[\BaMAxeEpaisseur,->] (\BaMaxexmin,0) -- (\BaMaxexmax,0) ;
\ifboolKV[boiteamoustachesaxe]{affvaleurs}
- {\foreach \x in \BaMAxeValeurs \draw[\BaMAxeEpaisseur] (\x,3pt)--(\x,-3pt) node[below=3pt] {\x} ;}
+ {\foreach \x in \BaMAxeValeurs \draw[\BaMAxeEpaisseur] (\x,3pt)--(\x,-3pt) node[below=3pt] {\num{\x}} ;}
{}
}
@@ -2051,4 +2052,131 @@
{}
}
+%================SUDOMATHS============= OK !!
+\defKV[PLTIKZSUDOM]{%
+ couleurtexte=\def\PLSMcoultexte{#1},%
+ epaisseur=\def\PLSMepf{#1},%
+ epaisseurg=\def\PLSMepg{#1},%
+ unite=\def\PLSMunite{#1},%
+ couleurcase=\def\PLSMcoulcase{#1},%
+ nbcol=\def\PLSMnbcol{#1},%
+ nbsubcol=\def\PLSMnbsubcol{#1},%
+ nblig=\def\PLSMnblig{#1},%
+ nbsublig=\def\PLSMnbsublig{#1},%
+ police=\def\PLSMfonte{#1},%
+ policeleg=\def\PLSMfonteleg{#1},%
+ listelegv=\def\PLSMlistelegv{#1},%
+ listelegh=\def\PLSMlistelegh{#1},%
+ decallegende=\def\PLSMdecalleg{#1}
+}
+
+\setKVdefault[PLTIKZSUDOM]{%
+ epaisseurg=1.5pt,%
+ epaisseur=0.5pt,%
+ unite=1cm,%
+ couleurcase=LightBlue!50,%
+ couleurtexte=blue,%
+ nbcol=9,%
+ nbsubcol=3,%
+ nblig=9,%
+ nbsublig=3,
+ police=\normalfont\normalsize,%
+ policeleg=\normalfont\sffamily,%
+ legendes=true,%
+ listelegv=ABCDEFGHIJKLMNOPQRSTUVWXYZ,%
+ listelegh=abcdefghijklmnopqrstuvwxyz,%
+ decallegende=0.45
+}
+
+\NewDocumentEnvironment{PLenvsudomaths}{ O{} m }
+ {
+ \useKVdefault[PLTIKZSUDOM]
+ \setKV[PLTIKZSUDOM]{#1}% on paramètres les nouvelles clés et on les simplifie
+ %calculs intermédiaires
+ \def\larcolinter{\inteval{\PLSMnbcol/\PLSMnbsubcol}}
+ \def\larliginter{\inteval{\PLSMnblig/\PLSMnbsublig}}
+ %lecture liste
+ \IfEq{#2}{}{}%
+ {%
+ \setsepchar[.]{§./}%
+ \readlist*\SPGrilleSudoMaths{#2}%
+ }
+ %débt envtik
+ \begin{tikzpicture}[x=\PLSMunite,y=\PLSMunite,line join=miter]
+ %cases
+ \IfEq{#2}{}{}%
+ {%
+ \foreach \i in {1,2,...,\PLSMnblig}{%
+ \foreach \j in {1,2,...,\PLSMnbcol}{%
+ \itemtomacro\SPGrilleSudoMaths[\i,\j]\SMcase
+ \IfSubStr{\SMcase}{*}%si on veut colorier via *
+ {%
+ \StrDel{\SMcase}{*}[\SMcaseb]%
+ \draw[draw=none,fill=\PLSMcoulcase] ({\j-1},{1-\i}) rectangle++ (1,-1) node[inner sep=0pt,outer sep=0pt,\PLSMcoultexte,font=\PLSMfonte,midway] {\SMcaseb} ;%
+ }
+ {%
+ \draw ({\j-0.5},{0.5-\i}) node[inner sep=0pt,outer sep=0pt,\PLSMcoultexte,font=\PLSMfonte] {\SMcase} ;%
+ }
+ }
+ }%
+ }
+ %grilles
+ \draw[line width=\PLSMepg] (0,0) rectangle ({\PLSMnbcol},{-\PLSMnblig}) ;
+ \draw[line width=\PLSMepf,xstep=1,ystep=1] (0,0) grid ({\PLSMnbcol},{-\PLSMnblig}) ;
+ \draw[line width=\PLSMepg,xstep=\larcolinter,ystep=\larliginter] (0,0) grid ({\PLSMnbcol},{-\PLSMnblig}) ;
+ %légendes
+ \ifboolKV[PLTIKZSUDOM]{legendes}
+ {%
+ \foreach \i in {1,2,...,\PLSMnbcol}{\draw ({\i-0.5},{\PLSMdecalleg}) node[inner sep=0pt,outer sep=0pt,font=\PLSMfonteleg] {\strut\StrChar{\PLSMlistelegh}{\i}} ;}
+ \foreach \j in {1,2,...,\PLSMnblig}{\draw ({-\PLSMdecalleg},{0.5-\j}) node[inner sep=0pt,outer sep=0pt,font=\PLSMfonteleg] {\StrChar{\PLSMlistelegv}{\j}} ;}
+ }{}
+ }
+ {
+ \end{tikzpicture}
+ }
+
+\NewDocumentCommand\PLsudomaths{ O{} m }{%
+ \useKVdefault[PLTIKZSUDOM]
+ \setKV[PLTIKZSUDOM]{#1}% on paramètres les nouvelles clés et on les simplifie
+ %calculs intermédiaires
+ \def\larcolinter{\inteval{\PLSMnbcol/\PLSMnbsubcol}}
+ \def\larliginter{\inteval{\PLSMnblig/\PLSMnbsublig}}
+ %lecture liste
+ \IfEq{#2}{}{}%
+ {%
+ \setsepchar[.]{§./}%
+ \readlist*\SPGrilleSudoMaths{#2}%
+ }
+ %débt envtik
+ \begin{tikzpicture}[x=\PLSMunite,y=\PLSMunite,line join=miter]
+ %cases
+ \IfEq{#2}{}{}%
+ {%
+ \foreach \i in {1,2,...,\PLSMnblig}{%
+ \foreach \j in {1,2,...,\PLSMnbcol}{%
+ \itemtomacro\SPGrilleSudoMaths[\i,\j]\SMcase
+ \IfSubStr{\SMcase}{*}%si on veut colorier via *
+ {%
+ \StrDel{\SMcase}{*}[\SMcaseb]%
+ \draw[draw=none,fill=\PLSMcoulcase] ({\j-1},{1-\i}) rectangle++ (1,-1) node[inner sep=0pt,outer sep=0pt,\PLSMcoultexte,font=\PLSMfonte,midway] {\SMcaseb} ;%
+ }
+ {%
+ \draw ({\j-0.5},{0.5-\i}) node[inner sep=0pt,outer sep=0pt,\PLSMcoultexte,font=\PLSMfonte] {\SMcase} ;%
+ }
+ }
+ }%
+ }
+ %grilles
+ \draw[line width=\PLSMepg] (0,0) rectangle ({\PLSMnbcol},{-\PLSMnblig}) ;
+ \draw[line width=\PLSMepf,xstep=1,ystep=1] (0,0) grid ({\PLSMnbcol},{-\PLSMnblig}) ;
+ \draw[line width=\PLSMepg,xstep=\larcolinter,ystep=\larliginter] (0,0) grid ({\PLSMnbcol},{-\PLSMnblig}) ;
+ %légendes
+ \ifboolKV[PLTIKZSUDOM]{legendes}
+ {%
+ \foreach \i in {1,2,...,\PLSMnbcol}{\draw ({\i-0.5},{\PLSMdecalleg}) node[inner sep=0pt,outer sep=0pt,font=\PLSMfonteleg] {\strut\StrChar{\PLSMlistelegh}{\i}} ;}
+ \foreach \j in {1,2,...,\PLSMnblig}{\draw ({-\PLSMdecalleg},{0.5-\j}) node[inner sep=0pt,outer sep=0pt,font=\PLSMfonteleg] {\StrChar{\PLSMlistelegv}{\j}} ;}
+ }{}
+ \end{tikzpicture}
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/semantex/semantex.pdf b/macros/latex/contrib/semantex/semantex.pdf
index 7bbf5313c2..2ed542a06f 100644
--- a/macros/latex/contrib/semantex/semantex.pdf
+++ b/macros/latex/contrib/semantex/semantex.pdf
Binary files differ
diff --git a/macros/latex/contrib/semantex/semantex.sty b/macros/latex/contrib/semantex/semantex.sty
index 325f2dbec5..8cdbecc789 100644
--- a/macros/latex/contrib/semantex/semantex.sty
+++ b/macros/latex/contrib/semantex/semantex.sty
@@ -1,5 +1,5 @@
\RequirePackage{xparse,l3keys2e,leftindex,semtex}
-\ProvidesExplPackage{semantex}{2021/08/23}{0.513}{}
+\ProvidesExplPackage{semantex}{2022/06/22}{0.520}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -10,7 +10,7 @@
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\tl_set:Nn\SemantexVersion{0.513}
+\tl_set:Nn\SemantexVersion{0.520}
\cs_set_eq:NN \semantex_keyval_parse:NNn \keyval_parse:NNn
\cs_set:Npn \semantex_singlekey_parse:Nn#1#2 { \clist_map_function:nN { #2 } #1 }
@@ -50,8 +50,8 @@
\bool_if:NF \g__semantex_semtex_file_was_opened_bool
{
\iow_open:Nn \g__semantex_semtex_file_stream_temp_iow { \jobname.semtex }
- \iow_now:Nn \g__semantex_semtex_file_stream_temp_iow { \DeclareClass {\SemantexBaseObject } }
- \iow_now:Nn \g__semantex_semtex_file_stream_temp_iow { \DeclareObject {\SemantexDelimiterSize } }
+ \iow_now:Nn \g__semantex_semtex_file_stream_temp_iow { \RegisterClass {\SemantexBaseObject } }
+ \iow_now:Nn \g__semantex_semtex_file_stream_temp_iow { \RegisterObject {\SemantexDelimiterSize } }
}
\cs_set:Npn\semantex_write_to_semtex_file:n##1
@@ -126,17 +126,17 @@
\cs_new_protected:Npn\semantex_write_class_declaration_to_semtex_file:n#1
{
- \semantex_write_to_semtex_file:n { \DeclareClass{#1} }
+ \semantex_write_to_semtex_file:n { \RegisterClass{#1} }
}
\cs_new_protected:Npn\semantex_write_object_declaration_to_semtex_file:n#1
{
- \semantex_write_to_semtex_file:n { \DeclareObject{#1} }
+ \semantex_write_to_semtex_file:n { \RegisterObject{#1} }
}
-\cs_new_protected:Npn\SemantexIDcommand#1
+\cs_new_protected:Npn\SemantexID#1
{
- \semantex_write_to_semtex_file:n { \SemantexID{#1} }
+ \semantex_write_to_semtex_file:n { \RegisterID{#1} }
}
\cs_set_eq:NN\SemantexRecordObject\semantex_write_object_declaration_to_semtex_file:n
@@ -148,11 +148,9 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\DeclareDocumentCommand\semantex_new_simple_class:Nw{mO{}} % new simple-type class
+\cs_new_protected:Npn\semantex_declare_simple_class:N#1 % new simple-type class
{
% #1 = class name
- % #2 = options
- \semantex_new_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
\DeclareDocumentCommand{#1}{m}
{
% the actual \#1 command
@@ -169,7 +167,7 @@
##1
}
}
- \exp_args:Nc\DeclareDocumentCommand{__semantex_new_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
+ \exp_args:Nc\DeclareDocumentCommand{__semantex_declare_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
{
% the command for creating a new object of class #1
% ##1 = command name, with backslash
@@ -177,13 +175,13 @@
% ##3 = options
\IfValueTF{##2}
{
- \semantex_new_object:NNn #1 ##1 {
+ \semantex_declare_object:NNn #1 ##1 {
\semantex_object_set_symbol:Nn ##1 { ##2 }
\semantex_object_set_keys:Nn ##1 { ##3 }
}
}
{
- \semantex_new_object:NNn #1 ##1 {
+ \semantex_declare_object:NNn #1 ##1 {
\semantex_object_set_keys:Nn ##1 { ##3 }
}
}
@@ -197,13 +195,23 @@
}
}
-\tl_set_eq:NN\NewSimpleClass\semantex_new_simple_class:Nw
+\NewDocumentCommand\DeclareSimpleClass{ m O{} }
+{
+ \semantex_declare_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
+ \semantex_declare_simple_class:N #1
+}
+
+\NewDocumentCommand\NewSimpleClass { m O{} }
+{
+ \semantex_new_class_and_do:NNnn #1 \DeclareSimpleClass { \semantex_class_set_keys:Nn #1 { #2 } }
+ {
+ \semantex_declare_simple_class:N #1
+ }
+}
-\DeclareDocumentCommand\semantex_new_symbol_class:Nw{mO{}} % new symbol-type class
+\cs_new_protected:Npn\semantex_declare_symbol_class:N #1 % new symbol-type class
{
% #1 = class name
- % #2 = options
- \semantex_new_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
\DeclareDocumentCommand{#1}{mo}
{
% the actual \#1 command
@@ -243,7 +251,7 @@
}
}
}
- \exp_args:Nc\DeclareDocumentCommand{__semantex_new_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
+ \exp_args:Nc\DeclareDocumentCommand{__semantex_declare_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
{
% the command for creating a new object of class #1
% ##1 = command name, with backslash
@@ -251,13 +259,13 @@
% ##3 = options
\IfValueTF{##2}
{
- \semantex_new_object:NNn #1 ##1 {
+ \semantex_declare_object:NNn #1 ##1 {
\semantex_object_set_symbol:Nn ##1 { ##2 }
\semantex_object_set_keys:Nn ##1 { ##3 }
}
}
{
- \semantex_new_object:NNn #1 ##1 {
+ \semantex_declare_object:NNn #1 ##1 {
\semantex_object_set_keys:Nn ##1 { ##3 }
}
}
@@ -281,14 +289,23 @@
}
}
-\tl_set_eq:NN\NewSymbolClass\semantex_new_symbol_class:Nw
+\NewDocumentCommand\DeclareSymbolClass{ m O{} }
+{
+ \semantex_declare_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
+ \semantex_declare_symbol_class:N #1
+}
-\DeclareDocumentCommand\semantex_new_variable_class:Nw{mO{}} % new variable-type class
+\NewDocumentCommand\NewSymbolClass { m O{} }
+{
+ \semantex_new_class_and_do:NNnn #1 \DeclareSymbolClass { \semantex_class_set_keys:Nn #1 { #2 } }
+ {
+ \semantex_declare_symbol_class:N #1
+ }
+}
+
+\cs_new_protected:Npn\semantex_declare_variable_class:N#1 % new variable-type class
{
% #1 = class name
- % #2 = options
- \semantex_new_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
- %\semantex_new_class:Nn #1 { #2 }
\DeclareDocumentCommand{#1}{mog}
{
% the actual \#1 command
@@ -375,7 +392,7 @@
}
}
}
- \exp_args:Nc\DeclareDocumentCommand{__semantex_new_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
+ \exp_args:Nc\DeclareDocumentCommand{__semantex_declare_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
{
% the command for creating a new object of class #1
% ##1 = command name, with backslash
@@ -383,13 +400,13 @@
% ##3 = options
\IfValueTF{##2}
{
- \semantex_new_object:NNn #1 ##1 {
+ \semantex_declare_object:NNn #1 ##1 {
\semantex_object_set_symbol:Nn ##1 { ##2 }
\semantex_object_set_keys:Nn ##1 { ##3 }
}
}
{
- \semantex_new_object:NNn #1 ##1 {
+ \semantex_declare_object:NNn #1 ##1 {
\semantex_object_set_keys:Nn ##1 { ##3 }
}
}
@@ -444,796 +461,20 @@
}
}
-\cs_set_eq:NN\NewVariableClass\semantex_new_variable_class:Nw
-
-\DeclareDocumentCommand\semantex_new_cohomology_class:Nw{mO{}} % new cohomology-type class
+\NewDocumentCommand\DeclareVariableClass{ m O{} }
{
- % #1 = class name
- % #2 = options
- \semantex_new_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
- \DeclareDocumentCommand{#1}{mogg}{
- % the actual \#1 command
- \IfValueTF{##2}
- {
- \IfValueTF { ##3 }
- {
- \str_if_eq:nnTF { ##3 }{ * }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { * } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_use_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { * } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_use_bullet:N #1
- }
- }
- }
- {
- \str_if_eq:nnTF { ##3 }{ ** }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { ** } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_use_double_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { ** } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_use_double_bullet:N #1
- }
- }
- }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { ##3 } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##3 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { ##3 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##3 }
- }
- }
- }
- }
- }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- }
- }
- }
- }
- {
- \IfValueTF { ##3 }
- {
- \str_if_eq:nnTF { ##3 }{ * }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { * } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_use_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { * } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_use_bullet:N #1
- }
- }
- }
- {
- \str_if_eq:nnTF { ##3 }{ ** }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { ** } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_use_double_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { ** } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_use_double_bullet:N #1
- }
- }
- }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { ##3 } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##3 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { ##3 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##3 }
- }
- }
- }
- }
- }
- {
- \IfValueTF { ##4 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- }
- }
- }
- }
- }
- \exp_args:Nc\DeclareDocumentCommand{__semantex_make_object_of_\semantex_class_to_register:N #1_with_options:nnw}{mmogg}
- {
- \IfValueTF{##3}
- {
- \IfValueTF { ##4 }
- {
- \str_if_eq:nnTF { ##4 }{ * }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { * } { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_use_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { * } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_use_bullet:N #1
- }
- }
- }
- {
- \str_if_eq:nnTF { ##4 }{ ** }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { ** } { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_use_double_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { ** } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_use_double_bullet:N #1
- }
- }
- }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { ##4 } { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##4 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##4 }
- }
- }
- }
- }
- }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- }
- }
- }
- }
- {
- \IfValueTF { ##4 }
- {
- \str_if_eq:nnTF { ##4 }{ * }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { * } { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_use_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { * } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_use_bullet:N #1
- }
- }
- }
- {
- \str_if_eq:nnTF { ##4 }{ ** }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { ** } { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_use_double_bullet:N #1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { ** } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_use_double_bullet:N #1
- }
- }
- }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { ##4 } { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##4 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_degree_default:Nn #1 { ##4 }
- }
- }
- }
- }
- }
- {
- \IfValueTF { ##5 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { ##5 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##5 }
- }
- }
- {
- % \semantex_add_to_existing_original_source_in_semtex_file:n { } % write nothing to file
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- }
- }
- }
- }
- }
- \exp_args:Nc\DeclareDocumentCommand{__semantex_new_object_of_\semantex_class_to_register:N #1:Nw}{mgO{}}
- {
- % the command for creating a new object of class #1
- % ##1 = command name, with backslash
- % ##2 = symbol
- % ##3 = options
- \IfValueTF{##2}
- {
- \semantex_new_object:NNn #1 { ##1 }{
- \semantex_object_set_symbol:Nn ##1 { ##2 }
- \semantex_object_set_keys:Nn ##1 { ##3 }
- }
- }
- {
- \semantex_new_object:NNn #1 { ##1 }{
- \semantex_object_set_keys:Nn ##1 { ##3 }
- }
- }
- % creates the object with name ##1
- \DeclareDocumentCommand{##1}{ogg}
- {
- % the actual \##1 command
- \IfValueTF{####1}
- {
- \IfValueTF{####2}
- {
- \str_if_eq:nnTF { ####2 } { * }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { * } { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_use_bullet:N ##1
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { * } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_use_bullet:N ##1
- }
- }
- }
- {
- \str_if_eq:nnTF { ####2 } { ** }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { ** } { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_use_double_bullet:N ##1
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { ** } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_use_double_bullet:N ##1
- }
- }
- }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { ####2 } { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_set_degree_default:Nn ##1 { ####2 }
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { ####2 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_set_degree_default:Nn ##1 { ####2 }
- }
- }
- }
- }
- }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1 ] }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- }
- }
- }
- }
- {
- \IfValueTF{####2}
- {
- \str_if_eq:nnTF { ####2 } { * }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { * } { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_use_bullet:N ##1
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { * } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_use_bullet:N ##1
- }
- }
- }
- {
- \str_if_eq:nnTF { ####2 } { ** }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { ** } { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_use_double_bullet:N ##1
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { ** } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_use_double_bullet:N ##1
- }
- }
- }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { ####2 } { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_degree_default:Nn ##1 { ####2 }
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { ####2 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_degree_default:Nn ##1 { ####2 }
- }
- }
- }
- }
- }
- {
- \IfValueTF{####3}
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { ####3 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_arg:Nn ##1 { ####3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 }
- \semantex_render_object:Nn ##1 { }
- }
- }
- }
- }
- }
+ \semantex_declare_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
+ \semantex_declare_variable_class:N #1
}
-\cs_set_eq:NN\NewCohomologyClass\semantex_new_cohomology_class:Nw
-
-\DeclareDocumentCommand\semantex_new_delimiter_class:Nw{mO{}} % new delimiter-type class
+\NewDocumentCommand\NewVariableClass { m O{} }
{
- % #1 = class name
- % #2 = options
- \semantex_new_class:Nn { #1 } { \semantex_class_set_keys:Nn #1 { #2 } }
- \DeclareDocumentCommand{#1}{mog} % maybe this does not even make sense for delimiters
- {
- \IfValueTF { ##2 }
- {
- \IfValueTF { ##3 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] { ##3 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } [ ##2 ] }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##2 }
- }
- }
- }
- {
- \IfValueTF { ##3 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } { ##3 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##3 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { #1 { ##1 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##1 }
- }
- }
- }
- }
- % the actual \#1 command
- \exp_args:Nc\DeclareDocumentCommand{__semantex_make_object_of_\semantex_class_to_register:N #1_with_options:nnw}{mmog}
- {
- \IfValueTF { ##3 }
- {
- \IfValueTF { ##4 }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] { ##4 } }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { [ ##3 ] }
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_keys:Nn #1 { ##3 }
- }
- }
- }
- {
- \IfValueTF { ##4 }
- {
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_add_to_existing_original_source_in_semtex_file:n
- { { ##4 } }
- \semantex_object_associated_to_class_do_output:N #1
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- \semantex_object_associated_to_class_set_arg:Nn #1 { ##4 }
- }
- }
- {
- % \semantex_add_to_existing_original_source_in_semtex_file:n { } % write nothing to file
- \semantex_render_object_associated_to_class:Nn #1 {
- \semantex_object_associated_to_class_set_symbol:Nn #1 { ##2 }
- ##1
- }
- }
- }
- }
- \exp_args:Nc\DeclareDocumentCommand{__semantex_new_object_of_\semantex_class_to_register:N #1:Nw}{mmmO{}}
+ \semantex_new_class_and_do:NNnn #1 \DeclareVariableClass { \semantex_class_set_keys:Nn #1 { #2 } }
{
- % the command for creating a new object of class #1
- % ##1 = command name, with backslash
- % ##2 = symbol
- % ##3 = options
- \semantex_new_object:NNn #1 { ##1 }{
- \semantex_object_set_left_par:Nn ##1 { ##2 }
- \semantex_object_set_right_par:Nn ##1 { ##3 }
- \semantex_object_set_keys:Nn ##1 { ##4 }
- }
- % creates the object with name ##1
- \DeclareDocumentCommand{##1}{og}
- {
- % the actual \##1 command
- \IfValueTF { ####1 }
- {
- \IfValueTF { ####2 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1] { ####2 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- \semantex_object_set_arg:Nn ##1 { ####2 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 [ ####1] }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_keys:Nn ##1 { ####1 }
- }
- }
- }
- {
- \IfValueTF { ####2 }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 { ####2 } }
- \semantex_render_object:Nn ##1 {
- \semantex_object_do_output:N ##1
- \semantex_object_set_arg:Nn ##1 { ####2 }
- }
- }
- {
- \semantex_write_original_source_to_semtex_file:n
- { ##1 }
- \semantex_render_object:Nn ##1 { }
- }
- }
- }
+ \semantex_declare_variable_class:N #1
}
}
-\cs_set_eq:NN\NewDelimiterClass\semantex_new_delimiter_class:Nw
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% COMMANDS FOR CREATING AND HANDLING CLASSES AND OJBECTS
@@ -1251,33 +492,48 @@
\cs_new:Npn\semantex_class_to_register:N#1
{
% #1 = name of class
- class_\cs_to_str:N #1
+ class_\token_to_str:N #1
}
\cs_new:Npn\semantex_class_to_associated_object_register:N#1
{
% #1 = name of class
- object_associated_to_class_\cs_to_str:N #1
+ object_associated_to_class_\token_to_str:N #1
}
\cs_new:Npn\semantex_object_to_register:N#1
{
% #1 = name of object
- object_\cs_to_str:N #1
+ object_\token_to_str:N #1
}
-\DeclareDocumentCommand\NewObject { m }
+\tl_new:N \g_semantex_class_SemantexBaseObject_register_tl
+
+\tl_set:Nx \g_semantex_class_SemantexBaseObject_register_tl { \semantex_class_to_register:N \SemantexBaseObject }
+
+\DeclareDocumentCommand\DeclareObject { m m }
{
% #1 = name of object
\semantex_class_if_exist:NTF #1
{
- \use:c { __semantex_new_object_of_\semantex_class_to_register:N #1:Nw }
+ \use:c { __semantex_declare_object_of_\semantex_class_to_register:N #1:Nw } #2
}
{
\msg_error:nnn { semantex } { created_object_of_unknown_class } { #1 }
}
}
+\DeclareDocumentCommand\NewObject { m m }
+{
+ \cs_if_exist:NTF #2
+ {
+ \msg_error:nnn { semantex } { created_object_with_already_defined_name } { #2 }
+ }
+ {
+ \DeclareObject #1 #2
+ }
+}
+
\DeclareDocumentCommand\UseClassInCommand { mo }
{
\semantex_class_if_exist:NTF #1
@@ -1306,7 +562,7 @@
\semantex_data_tl_provide:nn { #1 } { parent }
- \semantex_data_tl_set:nnn { #1 } { parent } { class_SemantexBaseObject }
+ \semantex_data_tl_set:nno { #1 } { parent } { \g_semantex_class_SemantexBaseObject_register_tl }
% The parent class by default is \SemantexBaseObject
\cs_set:cpn { __semantex_data_cs_#1_valuekey:nn } ##1##2 % command controlling valuekeys
@@ -1339,7 +595,7 @@
\cs_generate_variant:Nn \semantex_new_register:nn { xn }
-\cs_new_protected:Npn \semantex_new_class:Nn#1#2
+\cs_new_protected:Npn \semantex_declare_class:Nn#1#2
{
% create a new class
% #1 = name of class
@@ -1357,7 +613,24 @@
}
}
-\cs_set_protected:Npn \semantex_new_object:NNn#1#2#3
+\cs_new_protected:Npn \semantex_new_class_and_do:NNnn#1#2#3#4
+{
+ % create a new class
+ % #1 = name of class
+ % #2 = name of \Declare...Class variant of command, for error messages
+ % #3 = standard keyval setup
+ % #4 = code to execute if successful
+ \cs_if_exist:NTF #1
+ {
+ \msg_error:nnnn { semantex } { created_class_with_already_defined_name } { #1 } { #2 }
+ }
+ {
+ \semantex_declare_class:Nn #1 { #3 }
+ #4
+ }
+}
+
+\cs_set_protected:Npn \semantex_declare_object:NNn#1#2#3
{
% create a new object
% #1 = name of class
@@ -1427,56 +700,6 @@
\semantex_valuekey:nnn { \semantex_object_to_register:N #1 } { arg } { #2 }
}
-\cs_new_protected:Npn\semantex_object_associated_to_class_set_degree_default:Nn#1#2
-{
- \semantex_valuekey:nnn { \semantex_class_to_associated_object_register:N #1 } { degree~default } { #2 }
-}
-
-\cs_new_protected:Npn\semantex_object_set_degree_default:Nn#1#2
-{
- \semantex_valuekey:nnn { \semantex_object_to_register:N #1 } { degree~default } { #2 }
-}
-
-\cs_new_protected:Npn\semantex_object_associated_to_class_use_bullet:N#1
-{
- \semantex_singlekey:nn { \semantex_class_to_associated_object_register:N #1 } { * }
-}
-
-\cs_new_protected:Npn\semantex_object_use_bullet:N#1
-{
- \semantex_singlekey:nn { \semantex_object_to_register:N #1 } { * }
-}
-
-\cs_new_protected:Npn\semantex_object_associated_to_class_use_double_bullet:N#1
-{
- \semantex_singlekey:nn { \semantex_class_to_associated_object_register:N #1 } { * }
-}
-
-\cs_new_protected:Npn\semantex_object_use_double_bullet:N#1
-{
- \semantex_singlekey:nn { \semantex_object_to_register:N #1 } { * }
-}
-
-\cs_new_protected:Npn\semantex_object_associated_to_class_set_left_par:Nn#1#2
-{
- \semantex_data_tl_set:nnn { \semantex_class_to_associated_object_register:N #1 } { left~par } { #2 }
-}
-
-\cs_new_protected:Npn\semantex_object_set_left_par:Nn#1#2
-{
- \semantex_data_tl_set:nnn { \semantex_object_to_register:N #1 } { left~par } { #2 }
-}
-
-\cs_new_protected:Npn\semantex_object_associated_to_class_set_right_par:Nn#1#2
-{
- \semantex_data_tl_set:nnn { \semantex_class_to_associated_object_register:N #1 } { right~par } { #2 }
-}
-
-\cs_new_protected:Npn\semantex_object_set_right_par:Nn#1#2
-{
- \semantex_data_tl_set:nnn { \semantex_object_to_register:N #1 } { right~par } { #2 }
-}
-
\cs_new_protected:Npn\semantex_object_associated_to_class_set_class:Nn#1#2
{
\semantex_data_class_set:nn { \semantex_class_to_associated_object_register:N #1 } { #2 }
@@ -2449,7 +1672,7 @@
\use:c { g__semantex_data_tl_#1_#2 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #3 } { data_tl_not_found } { #2 }
}
@@ -2478,7 +1701,7 @@
\exp_not:v { g__semantex_data_tl_#1_#2 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #3 } { data_tl_not_found } { #2 }
}
@@ -2509,7 +1732,7 @@
\tl_set_eq:Nc #3 { g__semantex_data_tl_#1_#2 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #4 } { data_tl_not_found } { #2 }
}
@@ -2553,7 +1776,7 @@
\tl_set:cn { g__semantex_data_tl_#1_#2 } { #3 }
}
-\cs_generate_variant:Nn \semantex_data_tl_set:nnn { nnx }
+\cs_generate_variant:Nn \semantex_data_tl_set:nnn { nno, nnx }
\cs_new_protected:Npn \semantex_data_tl_put_right:nnn#1#2#3
{
@@ -2632,7 +1855,7 @@
\int_use:c { g__semantex_data_int_#1_#2 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #3 } { data_int_not_found } { #2 }
}
@@ -2642,7 +1865,7 @@
}
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #3 } { data_int_not_found } { #2 }
}
@@ -2673,7 +1896,7 @@
\int_set_eq:Nc#3 { g__semantex_data_int_#1_#2 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #4 } { data_int_not_found } { #2 }
}
@@ -2683,7 +1906,7 @@
}
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #4 } { data_int_not_found } { #2 }
}
@@ -2821,7 +2044,7 @@
\bool_if:cTF { g__semantex_data_bool_#1_if_#2 } { #3 } { #4 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
#4
}
@@ -2831,7 +2054,7 @@
}
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnx { #5 } { data_bool_not_found } { #2 }
}
@@ -3003,7 +2226,7 @@
\use:c { __semantex_data_cs_custom_valuekey_#1_#2:nn } { #4 } { #3 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnn { #4 } { valuekey_not_found } { #2 }
}
@@ -3027,7 +2250,7 @@
% #1 = register
% #2 = key
% #3 = value
- \use:c { __semantex_data_cs_custom_valuekey_class_SemantexBaseObject_#2:nn } { #1 } { #3 }
+ \use:c { __semantex_data_cs_custom_valuekey_\g_semantex_class_SemantexBaseObject_register_tl _#2:nn } { #1 } { #3 }
}
\cs_new_protected:Npn\semantex_singlekey:nn#1#2
@@ -3050,7 +2273,7 @@
\use:c { __semantex_data_cs_custom_singlekey_#1_#2:n } { #3 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_valuekey:nnn { #3 } { default } { #2 }
}
@@ -3080,7 +2303,7 @@
% the name of the register
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_valuekey:nnx { #3 } { default } { #2 }
}
@@ -3104,7 +2327,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_valuekey_#1_\tl_trim_spaces:n{#2}:nn } { ##1 } { ##2 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3127,7 +2350,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_singlekey_#1_\tl_trim_spaces:n{#2}:n } { ##1 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3151,7 +2374,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_two_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnn } { ##1 } { ##2 } { ##3 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3175,7 +2398,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_three_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnn } { ##1 } { ##2 } { ##3 } { ##4 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3199,7 +2422,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_four_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3223,7 +2446,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_five_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3247,7 +2470,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_six_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3271,7 +2494,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_seven_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } { ##8 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3295,7 +2518,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_eight_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } { ##8 } { ##9 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3319,7 +2542,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_nine_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } { ##8 } { ##9 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3349,7 +2572,7 @@
\use:c { __semantex_data_cs_custom_arg_valuekey_#1_#2:nn } { #4 } { #3 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_msg_error:nnn { #1 } { arg_valuekey_not_found } { #2 }
}
@@ -3379,7 +2602,7 @@
\use:c { __semantex_data_cs_custom_arg_singlekey_#1_#2:n } { #3 }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_arg_valuekey:nnn { #3 } { default } { #2 }
}
@@ -3409,7 +2632,7 @@
% the name of the register
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\semantex_arg_valuekey:nnx { #3 } { default } { #2 }
}
@@ -3443,7 +2666,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_valuekey_#1_\tl_trim_spaces:n{#2}:nn } { ##1 } { ##2 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3466,7 +2689,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_singlekey_#1_\tl_trim_spaces:n{#2}:n } { ##1 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3490,7 +2713,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_two_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnn } { ##1 } { ##2 } { ##3 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3514,7 +2737,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_three_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnn } { ##1 } { ##2 } { ##3 } { ##4 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3538,7 +2761,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_four_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3562,7 +2785,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_five_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3586,7 +2809,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_six_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3610,7 +2833,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_seven_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } { ##8 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3634,7 +2857,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_eight_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } { ##8 } { ##9 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -3658,7 +2881,7 @@
\exp_args:NNNo \exp_args:NNo\tl_set:No#3 { \use:c { __semantex_data_cs_custom_arg_nine_valuekey_#1_\tl_trim_spaces:n{#2}_auxiliary:nnnnnnnnn } { ##1 } { ##2 } { ##3 } { ##4 } { ##5 } { ##6 } { ##7 } { ##8 } { ##9 } }
}
{
- \str_if_eq:nnTF { #1 } { class_SemantexBaseObject }
+ \str_if_eq:nVTF { #1 } \g_semantex_class_SemantexBaseObject_register_tl
{
\tl_set:Nn #3 {}
}
@@ -7050,49 +6273,53 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\msg_new:nnnn { semantex } { semantex_setup_key_not_found } { Unknown~key~#1~passed~to~\SemantexSetup~on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { semantex_setup_key_not_found } { Unknown~key~#1~passed~to~\token_to_str:N\SemantexSetup~on~line~\msg_line_number: } {}
+
+\msg_new:nnnn { semantex } { semantex_setup_key_value_not_found } { Unknown~value~#2~passed~to~key~#1~in~\token_to_str:N\SemantexSetup~on~line~\msg_line_number: } {}
+
+\msg_new:nnnn { semantex } { valuekey_not_found } { Unknown~key~#2~passed~to~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { semantex_setup_key_value_not_found } { Unknown~value~#2~passed~to~key~#1~in~\SemantexSetup~on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { arg_valuekey_not_found } { Unknown~argument~key~#2~passed~to~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { valuekey_not_found } { Unknown~key~#2~passed~to~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { data_tl_not_found } { Unknown~data~#2~requested~from~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { arg_valuekey_not_found } { Unknown~argument~key~#2~passed~to~#1on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { data_int_not_found } { Unknown~integer~#2~requested~from~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { data_tl_not_found } { Unknown~data~#2~requested~from~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { data_bool_not_found } { Unknown~boolean~#2~requested~from~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { data_int_not_found } { Unknown~integer~#2~requested~from~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { data_cs_not_found } { Unknown~command~sequence~#2~requested~from~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { data_bool_not_found } { Unknown~boolean~#2~requested~from~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { data_prop_not_found } { Unknown~property~list~#2~requested~from~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { data_cs_not_found } { Unknown~command~sequence~#2~requested~from~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { key_value_not_found } { Unknown~value~#3~passed~to~key~#2~in~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { data_prop_not_found } { Unknown~property~list~#2~requested~from~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { arg_key_value_not_found } { Unknown~value~#3~passed~to~argument~key~#2~in~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { key_value_not_found } { Unknown~value~#3~passed~to~key~#2~in~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { class_already_defined } { Class~#1~already~defined;~you~tried~defining~it~again~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { arg_key_value_not_found } { Unknown~value~#3~passed~to~argument~key~#2~in~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { object_already_defined } { Object~#1~already~defined;~you~tried~defining~it~again~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { class_already_defined } { Class~#1 already~defined;~you~tried~defining~it~again~on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { class_not_found } { Unknown~class~#3~declared~as~#2~of~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { object_already_defined } { Object~#1 already~defined;~you~tried~defining~it~again~on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { object_not_found } { You~set~#1~as~#2~of~unknown~object~#3~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { class_not_found } { Unknown~class~#3 declared~as~#2~of~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { created_object_of_unknown_class } { Unknown~class~#1~declared~as~class~of~#2~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { object_not_found } { You~set~#1 as~#2~of~unknown~object~#3 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { created_object_with_already_defined_name } { Command~#1~already~defined;~you~can~use~\token_to_str:N\DeclareObject~to~override~existing~commands. } {}
-\msg_new:nnnn { semantex } { created_object_of_unknown_class } { Unknown~class~#1 declared~as~class~of~#2 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { created_class_with_already_defined_name } { Command~#1~already~defined;~you~can~use~\token_to_str:N #2~to~override~existing~commands. } {}
-\msg_new:nnnn { semantex } { used_unknown_class } { Unknown~class~#1 received~by~\token_to_str:N\UseClassInCommand~on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { used_unknown_class } { Unknown~class~#1~received~by~\token_to_str:N\UseClassInCommand~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { setup_unknown_class } { You~tried~setting~up~an~unknown~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { setup_unknown_class } { You~tried~setting~up~an~unknown~#1~on~line~\msg_line_number: } {}
-\msg_new:nnnn { semantex } { setup_unknown_object } { You~tried~setting~up~an~unknown~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { setup_unknown_object } { You~tried~setting~up~an~unknown~#1~on~line~\msg_line_number: } {}
\msg_new:nnnn { semantex } { created_a_SemantexBaseObject } { Never~create~objects~of~class~\token_to_str:N\SemantexBaseObject;~create~a~new~class~yourself~instead.~You~created~the~object~#1 on~line~\msg_line_number: } {}
\msg_new:nnnn { semantex } { SemantexThis_in_input_stream } { The~command~\token_to_str:N\SemantexThis~was~found~outside~a~class~or~object~on~line~\msg_line_number:;~did~you~forget~to~use~set~keys~x={...}? } {}
-\msg_new:nnnn { semantex } { generic_error } { #2~#1 on~line~\msg_line_number: } {}
+\msg_new:nnnn { semantex } { generic_error } { #2~#1~on~line~\msg_line_number: } {}
\cs_generate_variant:Nn \msg_error:nnnn { nnnx }
@@ -7101,10 +6328,9 @@
\cs_new_protected:Npn\semantex_error_output_format:nN#1#2
{
\tl_set:Nn \l__semantex_error_output_format_temp { #1 }
- \tl_replace_all:Nnn \l__semantex_error_output_format_temp { object_associated_to_class_ } { object~of~class~\cs:w }
- \tl_replace_all:Nnn \l__semantex_error_output_format_temp { object_ } { object~\cs:w }
- \tl_replace_all:Nnn \l__semantex_error_output_format_temp { class_ } { class~\cs:w }
- \tl_put_right:Nn \l__semantex_error_output_format_temp { \cs_end: }
+ \tl_replace_all:Nnn \l__semantex_error_output_format_temp { object_associated_to_class_ } { object~of~class~ }
+ \tl_replace_all:Nnn \l__semantex_error_output_format_temp { object_ } { object~ }
+ \tl_replace_all:Nnn \l__semantex_error_output_format_temp { class_ } { class~ }
\tl_trim_spaces:N \l__semantex_error_output_format_temp
\tl_set_eq:NN #2 \l__semantex_error_output_format_temp
}
@@ -7172,7 +6398,7 @@
{define~keys[1]}{execute={ \semantex_define_valuekeys:nn { ##1 } { #1 } }},
}
-\semantex_new_simple_class:Nw \SemantexBaseObject [
+\NewSimpleClass \SemantexBaseObject [
define~keys[1]={
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -7686,7 +6912,6 @@
},
},
{default}{sep~i={#1}},
- {degree~default}{sep~d={#1}},
{arg}{ execute={ \semantex_arg_singlekeys_set:nn { ##1 } { #1 } } },
{*~with~other~sep}{
d~*~with~other~sep={#1},
@@ -9456,12 +8681,12 @@
},
]
-\cs_set_eq:NN\__semantex_old_version_of_semantex_new_object_of_class_SemantexBaseObject:Nw \__semantex_new_object_of_class_SemantexBaseObject:Nw
+\cs_set_eq:cc { __semantex_old_version_of_semantex_declare_object_of_\g_semantex_class_SemantexBaseObject_register_tl :Nw } { __semantex_declare_object_of_\g_semantex_class_SemantexBaseObject_register_tl :Nw }
-\cs_set_protected:Npn \__semantex_new_object_of_class_SemantexBaseObject:Nw#1
+\cs_set_protected:Npn \__semantex_declare_object_of_class_SemantexBaseObject:Nw#1
{
\msg_error:nnn { semantex } { created_a_SemantexBaseObject } { #1 }
- \__semantex_old_version_of_semantex_new_object_of_class_SemantexBaseObject:Nw #1
+ \use:c { __semantex_old_version_of_semantex_declare_object_of_\g_semantex_class_SemantexBaseObject_register_tl :Nw } #1
}
diff --git a/macros/latex/contrib/semantex/semantex.tex b/macros/latex/contrib/semantex/semantex.tex
index 3b2630da08..a377e0f217 100644
--- a/macros/latex/contrib/semantex/semantex.tex
+++ b/macros/latex/contrib/semantex/semantex.tex
@@ -42,19 +42,6 @@
\usepackage[nameinlink]{cleveref}
-\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.513)}
-\date{\today}
-\author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})}
-
-\hypersetup{
- pdfauthor={Sebastian Ørsted},
- pdftitle={SemanTeX: semantic, keyval-based mathematics},
- %pdfsubject={},
- %pdfkeywords={},
- %pdfproducer={Latex with hyperref, or other system},
- %pdfcreator={pdflatex, or other tool},
-}
-
\usepackage{showexpl}
\lstset{%
@@ -103,6 +90,19 @@
\usepackage{semantex}
+\title{Seman\!\TeX: semantic, keyval-based mathematics (v\SemantexVersion)}
+\date{\today}
+\author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})}
+
+\hypersetup{
+ pdfauthor={Sebastian Ørsted},
+ pdftitle={SemanTeX: semantic, keyval-based mathematics (v\SemantexVersion)},
+ %pdfsubject={},
+ %pdfkeywords={},
+ %pdfproducer={Latex with hyperref, or other system},
+ %pdfcreator={pdflatex, or other tool},
+}
+
\SemantexSetup{
semtex file=true,
}
@@ -1761,7 +1761,7 @@ by default, so we shall have to turn them on first:
}
\end{lstlisting}
The key \lstinline!other sep! is a key that controls the separator
-between the current argument and the previous argument (it will only be printed if there was a previous argument). By default, this separator is a comma. So in the syntax~\lstinline!\co{*}{\vX,coef=\vR}!,
+between the current argument and the previous argument (it will only be printed if there was a previous argument). By default, this separator is a comma. So in the syntax~\lstinline!\co[*]{\vX,coef=\vR}!,
there are two arguments, \lstinline!\vX! and~\lstinline!\vR!, and the separator is a semicolon.
We shall later (see~\cref{ch:parse_coho_coef})
see another, possibly more natural way to write cohomology with coefficients, and which avoids turning on keyval syntax in the argument.
@@ -1867,7 +1867,9 @@ $ \vP[command=\overline,return,
upper left=*] $
\end{LTXexample}
-\chapter{The \texorpdfstring{\texttt{Symbol}}{Symbol} class type (Example: Derived tensor products and fibre products)}
+\chapter{The \texorpdfstring{\texttt{Symbol}}{Symbol} class type (Example: Derived tensor products and fibre products)}\label{chap:symbol_class}
+
+\begingroup
\NewSymbolClass\MyBinaryOperator[
define keys={
@@ -1933,6 +1935,12 @@ $\vX[*] \tensor[\vR] \vY[*]$
$\vk \tensor[\vA,der] \vk$,
$\vX \fibre[\vY,der] \vX$
\end{LTXexample}
+Later (in~\cref{sec:smart_binary_operators}), we shall see another, more advanced
+solution for binary operators which also allows us to express the application of the operator
+on \( \vn \)~elements.
+
+
+\endgroup
\chapter{Paired delimiters}
@@ -1977,12 +1985,12 @@ $\norm[\infty]{\vx}$
We can also create for more complicated constructions, like sets.
The following is inspired from the \pack{mathtools} package where a similar construction is created using the commands from that package. My impression is that Lars Madsen is the main mastermind behind the code I use for the \lstinline!\where!~construction:
\begin{lstlisting}
-\newcommand\wherecommand[1]{
- \nonscript\:
+\newcommand\wherecommand[1]{%
+ \nonscript\:%
#1\vert
\allowbreak
- \nonscript\:
- \mathopen{}
+ \nonscript\:%
+ \mathopen{}%
}
\NewObject\MyVar\where{ \wherecommand{\SemantexDelimiterSize} }
@@ -1995,12 +2003,12 @@ The following is inspired from the \pack{mathtools} package where a similar cons
% this turns off all keyval syntax in the argument
]
\end{lstlisting}
-\newcommand\wherecommand[1]{
- \nonscript\:
+\newcommand\wherecommand[1]{%
+ \nonscript\:%
#1\vert
\allowbreak
- \nonscript\:
- \mathopen{}
+ \nonscript\:%
+ \mathopen{}%
}
\NewObject\MyVar\where{ \wherecommand{\SemantexDelimiterSize} }
@@ -2848,6 +2856,104 @@ As you see, we use the \lstinline!d!~key to tell the command what superscript it
\]
\end{LTXexample}
+\section{Example: Smart binary operators}\label{sec:smart_binary_operators}
+
+\begingroup
+
+\NewVariableClass\MyBinaryOperator[
+ set arg dots=\dotsb,
+ never par,
+ prepend keys[1]={
+ {arg}{
+ return,
+ set keys x={
+ set arg sep=\SemantexDataGetExpNot{symbol},
+ },
+ },
+ },
+ parse options={
+ int if greater T={ \SemantexIntGet{number of arguments} } { 0 }
+ {
+ symbol={},
+ output=\MyVar,
+ },
+ },
+]
+
+\NewObject\MyBinaryOperator\mult{\cdot}
+\NewObject\MyBinaryOperator\tensor{\otimes}
+
+\NewVariableClass\InvisibleBinaryOperator[parent=\MyBinaryOperator, set arg dots=\dotsm]
+\NewObject\InvisibleBinaryOperator\invmult{}
+\NewObject\InvisibleBinaryOperator\spacemult{\,}
+
+In~\cref{chap:symbol_class}, we saw a simple solution for binary operators using the \lstinline!Symbol!~class.
+But that solution only printed the operator itself. However, in semantic markup systems, it is ofen desirable
+to also be able to explicitly typeset applications of the operator on \( \vn \)~arguments, like this:
+\begin{LTXexample}
+Applying the tensor product~$\tensor$ to $\vn$~elements, we get
+\[
+ \tensor{ \vx[1], \vx[2], ...,
+ \vx[\vn] }.
+\]
+Applying the multiplication operator~$\mult$ to $\vn$~elements, we get
+\[
+ \mult{ \vx[1], \vx[2], ...,
+ \vx[\vn] }.
+\]
+\end{LTXexample}
+
+This can be accomplished using the \lstinline!parse!~routine as follows:
+
+\begin{lstlisting}
+\NewVariableClass\MyBinaryOperator[
+ set arg dots=\dotsb,
+ never par,
+ prepend keys[1]={
+ {arg}{
+ return,
+ set keys x={
+ set arg sep=\SemantexDataGetExpNot{symbol},
+ },
+ },
+ },
+ parse options={
+ int if greater T={ \SemantexIntGet{number of arguments} } { 0 }
+ {
+ symbol={},
+ output=\MyVar,
+ },
+ },
+]
+
+\NewObject\MyBinaryOperator\tensor{\otimes}
+\NewObject\MyBinaryOperator\mult{\cdot}
+\end{lstlisting}
+
+In mathematical texts, the multiplication symbols in that last equation would usually be omitted.
+However, if we want to make the syntax fully semantic, we should also type these multiplication operators explicitly, even if they will be invisible in the final output.
+We do this by changing the argument dots and creating an object with an empty symbol.
+Alternatively, if we want to insert a space between the variables being multiplied,
+we can set the symbol to~\lstinline!\,!:
+\begin{lstlisting}
+\NewVariableClass\InvisibleBinaryOperator[parent=\MyBinaryOperator,
+ set arg dots=\dotsm]
+\NewObject\InvisibleBinaryOperator\invmult{}
+\NewObject\InvisibleBinaryOperator\spacemult{\,}
+\end{lstlisting}
+\begin{LTXexample}
+In mathematical texts, we denote the product of \( \vn \)~elements simply by
+\[
+ \invmult{ \vx[1], \vx[2], ...,
+ \vx[\vn] }
+ =
+ \spacemult{ \vx[1], \vx[2], ...,
+ \vx[\vn] }.
+\]
+\end{LTXexample}
+
+\endgroup
+
\chapter{\texorpdfstring{\texttt{stripsemantex}}{stripsemantex} -- stripping your document of \texorpdfstring{\semantex}{SemanTeX} markup}
\semantex{} is a big, heavy package, and it might raise eyebrows if you try using it in submissions to journals. On top of that, \url{arXiv.org}
@@ -2993,7 +3099,7 @@ Let us take a look at the commands defined by \pack{semtex}:
\mylst!\SemantexDoubleBullet!
The commands that contain the bullets we use in \semantex,
- i.e.~the superscript in~\( \co{*} \).
+ i.e.~the superscript in~\( \co[*] \).
These bullets are smaller (and prettier, in my opinion)
than the standard \lstinline!\bullet! command from~\LaTeX.
@@ -3053,8 +3159,8 @@ Suppose in the following that you \TeX\ document is called~\texttt{mydoc.tex}.
After this step, another document will have been created in the same
folder, called~\lstinline!mydoc_prestripped.tex!. It will look just like \texttt{mydoc.tex},
- but in the document body, each \semantex{} markup command will now
- have a command \mylst!\SemantexIDcommand{$\<a unique ID\>$}!
+ but in the document body, each command defined using \semantex{} will now
+ have an expression of the form~\mylst!\SemantexID{$\<a unique ID\>$}!
preceding it.
\item\label{pt:pre_strip_point}
@@ -3079,6 +3185,9 @@ Suppose in the following that you \TeX\ document is called~\texttt{mydoc.tex}.
left. You will then have to remove these few commands from your document manually.
\end{enumerate}
+\newpage
+\section{Stripping comments from the document}
+
Apart from the machinery for stripping \semantex{} markup from documents,
the package \pack{stripsemantex} also provides the command~\lstinline!\StripSemantexStripComments!,
which is in principle completely unrelated to \semantex{} itself.
@@ -3583,14 +3692,6 @@ In the following sections, we include the full list.
e.g.~the~\lstinline!1! in~\lstinline!\vf[1]!.
By default, this keys has been set to be equal to~\lstinline!sep i!,
but it is meant to be changeable by the user.
-
- \item
- \mylst!degree default={$\<value\>$}!
-
- This is the key where the grading goes.
- It is the one used by the (now deprecated) \lstinline!Cohomology! class type.
- By default, this key has been set to be equal to~\lstinline!sep d!,
- but it is meant to be changeable by the user.
\item
\mylst!*!
@@ -5701,39 +5802,6 @@ Let me add that \semantex{} uses a very clear separation between the input synta
The last class type, called \lstinline!Simple!,
is the class type of the class~\lstinline!\SemantexBaseObject!. This class is pretty useless as all it does is print its symbol, without allowing any keyval syntax. So you simply should not use it.
-There are also a few extra class types which are now deprecated, as their syntax will only cause confusion.
-They are still included for backwards compatibility, but I highly discourage their use:
-
-\begin{itemize}
- \item \lstinline!Cohomology!:
- A new class is declared with the
- syntax
- \begin{lstlisting}
- \NewCohomologyClass@\usercommand\<Class\>@[@\<options\>@]
- \end{lstlisting}
- A new object is declared by
- \begin{lstlisting}
- \NewObject@\usercommand\<Class\>@@\usercommand\<object\>@{@\<symbol\>@}[@\<options\>@]
- \end{lstlisting}
- The syntax for this object is
- \begin{lstlisting}
- @\usercommand\<object\>@[@\<options\>@]{@\<degree\>@}{@\<argument\>@}
- \end{lstlisting}
- \item \lstinline!Delimiter!:
- A new class is declared with the syntax
- \begin{lstlisting}
- \NewDelimiterClass@\usercommand\<Class\>@[@\<options\>@]
- \end{lstlisting}
- A new object is declared by
- \begin{lstlisting}
- \NewObject@\usercommand\<Class\>@@\usercommand\<object\>@{@\<left bracket\>@}{@\<right bracket\>@}[@\<options\>@]
- \end{lstlisting}
- The syntax for this object is
- \begin{lstlisting}
- @\usercommand\<object\>@[@\<options\>@]{@\<argument\>@}
- \end{lstlisting}
-\end{itemize}
-
\section{The predefined data}
By default, the following data are defined for each class or object and are accessible via
@@ -5773,7 +5841,7 @@ the programming keys and commands:
\lstinline!par size!
(token list):
the size of the argument parentheses.
- Here, the value~\lstinline!normal! means normal size
+ The value~\lstinline!normal! means normal size
parentheses,
\lstinline!auto! and~\lstinline!*!
mean auto-scaled parentheses using~\lstinline!\left ...\right!.
@@ -5796,7 +5864,7 @@ the programming keys and commands:
\lstinline!spar size!
(token list):
the size of the symbol parentheses (for use with the \lstinline!spar!~routine).
- Here, the value~\lstinline!normal! means normal size
+ The value~\lstinline!normal! means normal size
parentheses,
\lstinline!auto! and~\lstinline!*!
mean auto-scaled parentheses using~\lstinline!\left ...\right!.
diff --git a/macros/latex/contrib/semantex/stripsemantex.lua b/macros/latex/contrib/semantex/stripsemantex.lua
index f50648dd23..30d4c58be6 100644
--- a/macros/latex/contrib/semantex/stripsemantex.lua
+++ b/macros/latex/contrib/semantex/stripsemantex.lua
@@ -55,7 +55,7 @@ end
addIDsToRegisters = function(str)
str = removeStricttexFormatting(str)
- content = content:gsub('\\' .. str .. '([^%a])' ,'\\SemantexIDcommand{}\\' .. str .. '%1')
+ content = content:gsub('\\' .. str .. '([^%a])' ,'\\SemantexID{}\\' .. str .. '%1')
-- '%f[^%a]' does not work here, as it will not react if the last character of str is a number,
-- which stricttex allows.
-- Because of this choice, there will be an issue if you use stricttex and let
@@ -64,33 +64,33 @@ addIDsToRegisters = function(str)
end
removeSuperfluousIDs = function()
- local p = content:find('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)')
+ local p = content:find('([^\\]%%[^\n]-)\\SemantexID{}([^\n]-\n)')
while p do
- content = content:gsub('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)','%1%2')
- p = content:find('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)')
+ content = content:gsub('([^\\]%%[^\n]-)\\SemantexID{}([^\n]-\n)','%1%2')
+ p = content:find('([^\\]%%[^\n]-)\\SemantexID{}([^\n]-\n)')
end
- content = content:gsub('parent(%s*)=(%s*)\\SemantexIDcommand{}','parent%1=%2')
- content = content:gsub('class(%s*)=(%s*)\\SemantexIDcommand{}','class%1=%2')
- content = content:gsub('clone(%s*)=(%s*)\\SemantexIDcommand{}','clone%1=%2')
- content = content:gsub('copy(%s*)=(%s*)\\SemantexIDcommand{}','copy%1=%2')
- content = content:gsub('\\New(%w+)Class(%s*{?)\\SemantexIDcommand{}','\\New%1Class%2')
- content = content:gsub('\\NewObject(%s*{?%s*)\\SemantexIDcommand{}(\\%w+%s*}?%s*{?%s*)\\SemantexIDcommand{}', '\\NewObject%1%2')
- content = content:gsub('\\SetupClass(%s*{?%s*)\\SemantexIDcommand{}', '\\SetupClass%1')
- content = content:gsub('\\SetupObject(%s*{?%s*)\\SemantexIDcommand{}', '\\SetupObject%1')
+ content = content:gsub('parent(%s*)=(%s*)\\SemantexID{}','parent%1=%2')
+ content = content:gsub('class(%s*)=(%s*)\\SemantexID{}','class%1=%2')
+ content = content:gsub('clone(%s*)=(%s*)\\SemantexID{}','clone%1=%2')
+ content = content:gsub('copy(%s*)=(%s*)\\SemantexID{}','copy%1=%2')
+ content = content:gsub('\\New(%w+)Class(%s*{?)\\SemantexID{}','\\New%1Class%2')
+ content = content:gsub('\\NewObject(%s*{?%s*)\\SemantexID{}(\\%w+%s*}?%s*{?%s*)\\SemantexID{}', '\\NewObject%1%2')
+ content = content:gsub('\\SetupClass(%s*{?%s*)\\SemantexID{}', '\\SetupClass%1')
+ content = content:gsub('\\SetupObject(%s*{?%s*)\\SemantexID{}', '\\SetupObject%1')
end
addNumbersToIDs = function()
local n = 0
- local p,q = string.find(content,'\\SemantexIDcommand{}')
+ local p,q = string.find(content,'\\SemantexID{}')
while q do
n = n + 1
content = content:sub(1,q-1) .. n .. content:sub(q,-1)
- p, q = string.find(content,'\\SemantexIDcommand{}')
+ p, q = string.find(content,'\\SemantexID{}')
end
end
semantexIDluacommand = function(id, source, output)
- local p, q = string.find(content, '\\SemantexIDcommand{' .. id .. '}')
+ local p, q = string.find(content, '\\SemantexID{' .. id .. '}')
while p do
content = content:sub(1,p-1) .. content:sub(q+1,-1)
@@ -228,12 +228,12 @@ semantexIDluacommand = function(id, source, output)
else
content = content:sub(1,p-1) .. output .. content:sub(p,-1)
end
- p, q = string.find(content, '\\SemantexIDcommand{' .. id .. '}')
+ p, q = string.find(content, '\\SemantexID{' .. id .. '}')
end
end
stripRemainingSemantexIDs = function()
- content = content:gsub('\\SemantexIDcommand{%d+}', '')
+ content = content:gsub('\\SemantexID{%d+}', '')
end
removeParenthesisCommands = function()
diff --git a/macros/latex/contrib/semantex/stripsemantex.sty b/macros/latex/contrib/semantex/stripsemantex.sty
index 4e5dafc2ee..1dd814689c 100644
--- a/macros/latex/contrib/semantex/stripsemantex.sty
+++ b/macros/latex/contrib/semantex/stripsemantex.sty
@@ -1,5 +1,5 @@
\RequirePackage{xparse}
-\ProvidesExplPackage{stripsemantex}{2021/08/23}{0.513}{}
+\ProvidesExplPackage{stripsemantex}{2022/09/22}{0.530}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -40,12 +40,12 @@
openFile('\lua_escape:e{#1}_prestripped.tex')
}
- \cs_set:Npn\DeclareObject##1
+ \cs_set:Npn\RegisterObject##1
{
\lua_now:e { addIDsToRegisters ( '\cs_to_str:N ##1' ) }
}
- \cs_set:Npn\DeclareClass##1{
+ \cs_set:Npn\RegisterClass##1{
\lua_now:e { addIDsToRegisters ( '\cs_to_str:N ##1' ) }
}
@@ -76,7 +76,7 @@
openFile('\lua_escape:e{#1}_prestripped.tex')
}
- \DeclareDocumentCommand\SemantexID{ m t{\BeginSource} }
+ \DeclareDocumentCommand\RegisterID{ m t{\BeginSource} }
{
\IfBooleanT{##2}
{
@@ -94,9 +94,9 @@
}
}
- \cs_set:Npn\DeclareObject##1{}
+ \cs_set:Npn\RegisterObject##1{}
- \cs_set:Npn\DeclareClass##1{}
+ \cs_set:Npn\RegisterClass##1{}
\cs_set:Npn\BeginSource##1\EndSource\BeginOutput##2\EndOutput{}
@@ -109,17 +109,17 @@
\bool_if:NTF \g_stripsemantex_something_left_to_strip_bool
{
- \cs_set:Npn\DeclareObject##1
+ \cs_set:Npn\RegisterObject##1
{
\lua_now:e { addIDsToRegisters ( '\cs_to_str:N ##1' ) }
}
- \cs_set:Npn\DeclareClass##1
+ \cs_set:Npn\RegisterClass##1
{
\lua_now:e { addIDsToRegisters ( '\cs_to_str:N ##1' ) }
}
- \cs_set:Npn\SemantexID##1 {}
+ \cs_set:Npn\RegisterID##1 {}
\cs_set:Npn\BeginSource##1\EndSource\BeginOutput##2\EndOutput {}