From bea33e16f382ecf8188f0b613d553f8367f8d0d3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 9 Jun 2023 20:19:52 +0000 Subject: latex2e (9jun23) git-svn-id: svn://tug.org/texlive/trunk@67314 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/amsmath/amsbsy.sty | 2 +- Master/texmf-dist/tex/latex/amsmath/amscd.sty | 2 +- Master/texmf-dist/tex/latex/amsmath/amsgen.sty | 2 +- Master/texmf-dist/tex/latex/amsmath/amsmath.sty | 8 +- Master/texmf-dist/tex/latex/amsmath/amsopn.sty | 2 +- Master/texmf-dist/tex/latex/amsmath/amstext.sty | 2 +- Master/texmf-dist/tex/latex/amsmath/amsxtra.sty | 2 +- Master/texmf-dist/tex/latex/base/alltt.sty | 2 +- Master/texmf-dist/tex/latex/base/ansinew.def | 2 +- Master/texmf-dist/tex/latex/base/applemac.def | 2 +- Master/texmf-dist/tex/latex/base/article.cls | 4 +- Master/texmf-dist/tex/latex/base/article.sty | 2 +- Master/texmf-dist/tex/latex/base/ascii.def | 2 +- Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty | 10 +- Master/texmf-dist/tex/latex/base/atveryend-ltx.sty | 6 +- Master/texmf-dist/tex/latex/base/bezier.sty | 2 +- Master/texmf-dist/tex/latex/base/bk10.clo | 4 +- Master/texmf-dist/tex/latex/base/bk11.clo | 4 +- Master/texmf-dist/tex/latex/base/bk12.clo | 4 +- Master/texmf-dist/tex/latex/base/book.cls | 4 +- Master/texmf-dist/tex/latex/base/book.sty | 2 +- Master/texmf-dist/tex/latex/base/cp1250.def | 2 +- Master/texmf-dist/tex/latex/base/cp1252.def | 2 +- Master/texmf-dist/tex/latex/base/cp1257.def | 2 +- Master/texmf-dist/tex/latex/base/cp437.def | 2 +- Master/texmf-dist/tex/latex/base/cp437de.def | 2 +- Master/texmf-dist/tex/latex/base/cp850.def | 2 +- Master/texmf-dist/tex/latex/base/cp852.def | 2 +- Master/texmf-dist/tex/latex/base/cp858.def | 2 +- Master/texmf-dist/tex/latex/base/cp865.def | 2 +- Master/texmf-dist/tex/latex/base/decmulti.def | 2 +- Master/texmf-dist/tex/latex/base/doc.sty | 63 +- Master/texmf-dist/tex/latex/base/docstrip.tex | 2 +- Master/texmf-dist/tex/latex/base/exscale.sty | 2 +- Master/texmf-dist/tex/latex/base/fix-cm.sty | 2 +- Master/texmf-dist/tex/latex/base/fixltx2e.sty | 2 +- Master/texmf-dist/tex/latex/base/flafter.sty | 2 +- Master/texmf-dist/tex/latex/base/fleqn.clo | 2 +- Master/texmf-dist/tex/latex/base/fleqn.sty | 2 +- Master/texmf-dist/tex/latex/base/fltrace.sty | 2 +- Master/texmf-dist/tex/latex/base/fontenc.sty | 2 +- Master/texmf-dist/tex/latex/base/fontmath.cfg | 2 +- Master/texmf-dist/tex/latex/base/fontmath.ltx | 2 +- Master/texmf-dist/tex/latex/base/fonttext.cfg | 2 +- Master/texmf-dist/tex/latex/base/fonttext.ltx | 2 +- Master/texmf-dist/tex/latex/base/graphpap.sty | 2 +- Master/texmf-dist/tex/latex/base/hyphen.ltx | 2 +- Master/texmf-dist/tex/latex/base/idx.tex | 2 +- Master/texmf-dist/tex/latex/base/ifthen.sty | 2 +- Master/texmf-dist/tex/latex/base/inputenc.sty | 2 +- Master/texmf-dist/tex/latex/base/lablst.tex | 2 +- Master/texmf-dist/tex/latex/base/latex.ltx | 1204 ++++++++--- Master/texmf-dist/tex/latex/base/latex209.def | 2 +- Master/texmf-dist/tex/latex/base/latexrelease.sty | 2106 ++++++++++++++++++-- Master/texmf-dist/tex/latex/base/latexsym.sty | 2 +- Master/texmf-dist/tex/latex/base/latin1.def | 2 +- Master/texmf-dist/tex/latex/base/latin10.def | 2 +- Master/texmf-dist/tex/latex/base/latin2.def | 2 +- Master/texmf-dist/tex/latex/base/latin3.def | 2 +- Master/texmf-dist/tex/latex/base/latin4.def | 2 +- Master/texmf-dist/tex/latex/base/latin5.def | 2 +- Master/texmf-dist/tex/latex/base/latin9.def | 2 +- Master/texmf-dist/tex/latex/base/lcyenc.dfu | 2 +- Master/texmf-dist/tex/latex/base/leqno.clo | 2 +- Master/texmf-dist/tex/latex/base/leqno.sty | 2 +- Master/texmf-dist/tex/latex/base/letter.cls | 2 +- Master/texmf-dist/tex/latex/base/letter.sty | 2 +- Master/texmf-dist/tex/latex/base/ltluatex.lua | 3 +- Master/texmf-dist/tex/latex/base/ltluatex.tex | 4 +- Master/texmf-dist/tex/latex/base/ltnews.cls | 42 +- Master/texmf-dist/tex/latex/base/ltxcheck.tex | 2 +- Master/texmf-dist/tex/latex/base/ltxdoc.cfg | 2 +- Master/texmf-dist/tex/latex/base/ltxdoc.cls | 9 +- Master/texmf-dist/tex/latex/base/ltxguide.cls | 2 +- Master/texmf-dist/tex/latex/base/ly1enc.dfu | 2 +- Master/texmf-dist/tex/latex/base/macce.def | 2 +- Master/texmf-dist/tex/latex/base/makeidx.sty | 2 +- Master/texmf-dist/tex/latex/base/minimal.cls | 2 +- Master/texmf-dist/tex/latex/base/newlfont.sty | 2 +- Master/texmf-dist/tex/latex/base/next.def | 2 +- Master/texmf-dist/tex/latex/base/nfssfont.tex | 2 +- Master/texmf-dist/tex/latex/base/oldlfont.sty | 2 +- Master/texmf-dist/tex/latex/base/omlcmm.fd | 4 +- Master/texmf-dist/tex/latex/base/omlcmr.fd | 4 +- Master/texmf-dist/tex/latex/base/omlenc.def | 2 +- Master/texmf-dist/tex/latex/base/omllcmm.fd | 2 +- Master/texmf-dist/tex/latex/base/omscmr.fd | 4 +- Master/texmf-dist/tex/latex/base/omscmsy.fd | 4 +- Master/texmf-dist/tex/latex/base/omsenc.def | 2 +- Master/texmf-dist/tex/latex/base/omsenc.dfu | 2 +- Master/texmf-dist/tex/latex/base/omslcmsy.fd | 2 +- Master/texmf-dist/tex/latex/base/omxcmex.fd | 4 +- Master/texmf-dist/tex/latex/base/omxlcmex.fd | 2 +- Master/texmf-dist/tex/latex/base/openbib.sty | 2 +- Master/texmf-dist/tex/latex/base/ot1cmdh.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1cmfib.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1cmfr.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1cmr.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1cmss.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1cmtt.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1cmvtt.fd | 4 +- Master/texmf-dist/tex/latex/base/ot1enc.def | 2 +- Master/texmf-dist/tex/latex/base/ot1enc.dfu | 2 +- Master/texmf-dist/tex/latex/base/ot1lcmss.fd | 2 +- Master/texmf-dist/tex/latex/base/ot1lcmtt.fd | 2 +- Master/texmf-dist/tex/latex/base/ot2enc.dfu | 2 +- Master/texmf-dist/tex/latex/base/ot4enc.def | 2 +- Master/texmf-dist/tex/latex/base/preload.cfg | 2 +- Master/texmf-dist/tex/latex/base/preload.ltx | 2 +- Master/texmf-dist/tex/latex/base/proc.cls | 2 +- Master/texmf-dist/tex/latex/base/proc.sty | 2 +- Master/texmf-dist/tex/latex/base/report.cls | 4 +- Master/texmf-dist/tex/latex/base/report.sty | 2 +- Master/texmf-dist/tex/latex/base/sfonts.def | 2 +- Master/texmf-dist/tex/latex/base/shortvrb.sty | 4 +- Master/texmf-dist/tex/latex/base/showidx.sty | 2 +- Master/texmf-dist/tex/latex/base/size10.clo | 4 +- Master/texmf-dist/tex/latex/base/size11.clo | 4 +- Master/texmf-dist/tex/latex/base/size12.clo | 4 +- Master/texmf-dist/tex/latex/base/slides.cls | 2 +- Master/texmf-dist/tex/latex/base/slides.def | 2 +- Master/texmf-dist/tex/latex/base/slides.sty | 2 +- Master/texmf-dist/tex/latex/base/structuredlog.sty | 6 +- Master/texmf-dist/tex/latex/base/syntonly.sty | 2 +- Master/texmf-dist/tex/latex/base/t1cmdh.fd | 4 +- Master/texmf-dist/tex/latex/base/t1cmfib.fd | 4 +- Master/texmf-dist/tex/latex/base/t1cmfr.fd | 4 +- Master/texmf-dist/tex/latex/base/t1cmr.fd | 4 +- Master/texmf-dist/tex/latex/base/t1cmss.fd | 4 +- Master/texmf-dist/tex/latex/base/t1cmtt.fd | 4 +- Master/texmf-dist/tex/latex/base/t1cmvtt.fd | 4 +- Master/texmf-dist/tex/latex/base/t1enc.def | 2 +- Master/texmf-dist/tex/latex/base/t1enc.dfu | 2 +- Master/texmf-dist/tex/latex/base/t1enc.sty | 2 +- Master/texmf-dist/tex/latex/base/t1lcmss.fd | 2 +- Master/texmf-dist/tex/latex/base/t1lcmtt.fd | 2 +- Master/texmf-dist/tex/latex/base/t2aenc.dfu | 2 +- Master/texmf-dist/tex/latex/base/t2benc.dfu | 2 +- Master/texmf-dist/tex/latex/base/t2cenc.dfu | 2 +- Master/texmf-dist/tex/latex/base/testpage.tex | 2 +- .../tex/latex/base/textcomp-2018-08-11.sty | 2 +- Master/texmf-dist/tex/latex/base/textcomp.sty | 2 +- Master/texmf-dist/tex/latex/base/tracefnt.sty | 2 +- Master/texmf-dist/tex/latex/base/ts1cmr.fd | 4 +- Master/texmf-dist/tex/latex/base/ts1cmss.fd | 4 +- Master/texmf-dist/tex/latex/base/ts1cmtt.fd | 4 +- Master/texmf-dist/tex/latex/base/ts1cmvtt.fd | 4 +- Master/texmf-dist/tex/latex/base/ts1enc.def | 2 +- Master/texmf-dist/tex/latex/base/ts1enc.dfu | 2 +- Master/texmf-dist/tex/latex/base/tuenc.def | 2 +- Master/texmf-dist/tex/latex/base/tulmdh.fd | 2 +- Master/texmf-dist/tex/latex/base/tulmr.fd | 2 +- Master/texmf-dist/tex/latex/base/tulmss.fd | 2 +- Master/texmf-dist/tex/latex/base/tulmssq.fd | 2 +- Master/texmf-dist/tex/latex/base/tulmtt.fd | 2 +- Master/texmf-dist/tex/latex/base/tulmvtt.fd | 2 +- Master/texmf-dist/tex/latex/base/ucmr.fd | 4 +- Master/texmf-dist/tex/latex/base/ucmss.fd | 4 +- Master/texmf-dist/tex/latex/base/ucmtt.fd | 5 +- Master/texmf-dist/tex/latex/base/ulasy.fd | 2 +- Master/texmf-dist/tex/latex/base/ullasy.fd | 2 +- Master/texmf-dist/tex/latex/base/utf8-2018.def | 2 +- Master/texmf-dist/tex/latex/base/utf8.def | 2 +- Master/texmf-dist/tex/latex/base/utf8enc.dfu | 2 +- Master/texmf-dist/tex/latex/base/x2enc.dfu | 2 +- .../texmf-dist/tex/latex/firstaid/everysel-ltx.sty | 2 +- .../texmf-dist/tex/latex/firstaid/filehook-ltx.sty | 2 +- .../latex2e-first-aid-for-external-files.ltx | 88 +- .../latex/latex-lab/bib-latex-lab-testphase.ltx | 43 + .../block-tagging-latex-lab-testphase.ltx | 48 + .../latex/latex-lab/documentmetadata-support.ltx | 6 +- .../latex-lab/firstaid-latex-lab-testphase.ltx | 44 + .../latex/latex-lab/float-latex-lab-testphase.ltx | 42 + .../tex/latex/latex-lab/glyphtounicode-cmex.tex | 141 ++ .../latex-lab/graphic-latex-lab-testphase.ltx | 42 + .../tex/latex/latex-lab/latex-lab-amsmath.ltx | 64 + .../tex/latex/latex-lab/latex-lab-footmisc.ltx | 6 +- .../tex/latex/latex-lab/latex-lab-footnotes.ltx | 499 +++-- .../latex/latex-lab/latex-lab-kernel-changes.sty | 110 + .../tex/latex/latex-lab/latex-lab-mathpkg.ltx | 51 + .../tex/latex/latex-lab/latex-lab-mathtagging.ltx | 660 ++++++ .../tex/latex/latex-lab/latex-lab-mathtools.ltx | 152 ++ .../latex/latex-lab/latex-lab-testphase-bib.sty | 178 ++ .../latex-lab-testphase-block-tagging.sty | 1426 +++++++++++++ .../latex-lab/latex-lab-testphase-firstaid.sty | 103 + .../latex/latex-lab/latex-lab-testphase-float.sty | 265 +++ .../latex-lab/latex-lab-testphase-graphic.sty | 694 +++++++ .../latex/latex-lab/latex-lab-testphase-math.sty | 45 + .../latex-lab/latex-lab-testphase-minipage.sty | 120 ++ .../latex-lab/latex-lab-testphase-new-or-1.sty | 83 + .../latex-lab/latex-lab-testphase-new-or-2.sty | 169 ++ .../latex/latex-lab/latex-lab-testphase-new-or.sty | 169 -- .../latex/latex-lab/latex-lab-testphase-sec.sty | 412 ++++ .../latex/latex-lab/latex-lab-testphase-text.sty | 83 + .../latex/latex-lab/latex-lab-testphase-toc.sty | 575 ++++++ .../latex/latex-lab/math-latex-lab-testphase.ltx | 42 + .../latex-lab/minipage-latex-lab-testphase.ltx | 46 + .../latex-lab/new-or-1-latex-lab-testphase.ltx | 42 + .../latex/latex-lab/new-or-latex-lab-testphase.ltx | 11 +- .../latex-lab/phase-I-latex-lab-testphase.ltx | 6 +- .../latex-lab/phase-II-latex-lab-testphase.ltx | 13 +- .../latex-lab/phase-III-latex-lab-testphase.ltx | 54 + .../latex-lab/sec-tagging-latex-lab-testphase.ltx | 42 + .../latex/latex-lab/tagpdf-latex-lab-testphase.ltx | 13 +- .../latex/latex-lab/text-latex-lab-testphase.ltx | 43 + .../latex-lab/toc-tagging-latex-lab-testphase.ltx | 44 + Master/texmf-dist/tex/latex/tools/.tex | 2 +- Master/texmf-dist/tex/latex/tools/afterpage.sty | 2 +- Master/texmf-dist/tex/latex/tools/array.sty | 2 +- Master/texmf-dist/tex/latex/tools/bm.sty | 2 +- Master/texmf-dist/tex/latex/tools/calc.sty | 2 +- Master/texmf-dist/tex/latex/tools/dcolumn.sty | 2 +- Master/texmf-dist/tex/latex/tools/delarray.sty | 2 +- Master/texmf-dist/tex/latex/tools/e.tex | 2 +- Master/texmf-dist/tex/latex/tools/enumerate.sty | 2 +- Master/texmf-dist/tex/latex/tools/fontsmpl.sty | 2 +- Master/texmf-dist/tex/latex/tools/fontsmpl.tex | 2 +- Master/texmf-dist/tex/latex/tools/ftnright.sty | 2 +- Master/texmf-dist/tex/latex/tools/h.tex | 2 +- Master/texmf-dist/tex/latex/tools/hhline.sty | 2 +- Master/texmf-dist/tex/latex/tools/indentfirst.sty | 2 +- Master/texmf-dist/tex/latex/tools/layout.sty | 2 +- Master/texmf-dist/tex/latex/tools/longtable.sty | 2 +- Master/texmf-dist/tex/latex/tools/multicol.sty | 25 +- Master/texmf-dist/tex/latex/tools/q.tex | 2 +- Master/texmf-dist/tex/latex/tools/r.tex | 2 +- Master/texmf-dist/tex/latex/tools/rawfonts.sty | 2 +- Master/texmf-dist/tex/latex/tools/s.tex | 2 +- Master/texmf-dist/tex/latex/tools/shellesc.sty | 12 +- Master/texmf-dist/tex/latex/tools/showkeys.sty | 10 +- Master/texmf-dist/tex/latex/tools/somedefs.sty | 2 +- Master/texmf-dist/tex/latex/tools/tabularx.sty | 2 +- Master/texmf-dist/tex/latex/tools/thb.sty | 2 +- Master/texmf-dist/tex/latex/tools/thc.sty | 2 +- Master/texmf-dist/tex/latex/tools/thcb.sty | 2 +- Master/texmf-dist/tex/latex/tools/theorem.sty | 2 +- Master/texmf-dist/tex/latex/tools/thm.sty | 2 +- Master/texmf-dist/tex/latex/tools/thmb.sty | 2 +- Master/texmf-dist/tex/latex/tools/thp.sty | 2 +- Master/texmf-dist/tex/latex/tools/trace.sty | 2 +- Master/texmf-dist/tex/latex/tools/varioref.sty | 2 +- Master/texmf-dist/tex/latex/tools/verbatim.sty | 2 +- Master/texmf-dist/tex/latex/tools/verbtest.tex | 2 +- Master/texmf-dist/tex/latex/tools/x.tex | 2 +- Master/texmf-dist/tex/latex/tools/xr.sty | 2 +- Master/texmf-dist/tex/latex/tools/xspace.sty | 2 +- 246 files changed, 9419 insertions(+), 1222 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/block-tagging-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/glyphtounicode-cmex.tex create mode 100644 Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathpkg.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtagging.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block-tagging.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-math.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-1.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-2.sty delete mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty create mode 100644 Master/texmf-dist/tex/latex/latex-lab/math-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/new-or-1-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/phase-III-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/sec-tagging-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx create mode 100644 Master/texmf-dist/tex/latex/latex-lab/toc-tagging-latex-lab-testphase.ltx (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/amsmath/amsbsy.sty b/Master/texmf-dist/tex/latex/amsmath/amsbsy.sty index ab82e6e6eeb..7fe98338670 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amsbsy.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amsbsy.sty @@ -7,7 +7,7 @@ %% amsbsy.dtx %% %% Copyright (C) 1995, 1999 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/tex/latex/amsmath/amscd.sty b/Master/texmf-dist/tex/latex/amsmath/amscd.sty index cfbd7be6622..2b5c20ec5fc 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amscd.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amscd.sty @@ -7,7 +7,7 @@ %% amscd.dtx %% %% Copyright (C) 1995, 1999 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/tex/latex/amsmath/amsgen.sty b/Master/texmf-dist/tex/latex/amsmath/amsgen.sty index 0d47226b066..6ac9e8a7291 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amsgen.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amsgen.sty @@ -7,7 +7,7 @@ %% amsgen.dtx %% %% Copyright (C) 1995, 1999 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/tex/latex/amsmath/amsmath.sty b/Master/texmf-dist/tex/latex/amsmath/amsmath.sty index 6d657743501..580461feb56 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amsmath.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amsmath.sty @@ -7,7 +7,7 @@ %% amsmath.dtx %% %% Copyright (C) 1995, 1999, 2000, 2013 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -27,7 +27,7 @@ \providecommand\DeclareCurrentRelease[2]{} \DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty} \DeclareCurrentRelease{}{2019-04-01} -\ProvidesPackage{amsmath}[2022/04/08 v2.17n AMS math features] +\ProvidesPackage{amsmath}[2023/05/13 v2.17o AMS math features] \edef\@temp{\catcode 96=\number\catcode 96 } \catcode\string `\`=12 \def\do#1{\catcode\number`#1=\number\catcode`#1} @@ -2766,8 +2766,8 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}% } \fi \fi -\@saveprimitive\leqno\@@leqno -\@saveprimitive\eqno\@@eqno +\let\@@eqno\eqno +\let\@@leqno\leqno \def\eqno{\@@eqno\let\eqno\relax\let\leqno\relax} \def\leqno{\@@leqno\let\leqno\relax\let\eqno\relax} \let\veqno=\@@eqno diff --git a/Master/texmf-dist/tex/latex/amsmath/amsopn.sty b/Master/texmf-dist/tex/latex/amsmath/amsopn.sty index 38628c2b9f5..1b9d4ec392c 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amsopn.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amsopn.sty @@ -7,7 +7,7 @@ %% amsopn.dtx %% %% Copyright (C) 1995, 1999 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/tex/latex/amsmath/amstext.sty b/Master/texmf-dist/tex/latex/amsmath/amstext.sty index ac1297b7b11..01c656d27c0 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amstext.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amstext.sty @@ -7,7 +7,7 @@ %% amstext.dtx %% %% Copyright (C) 1995, 1999 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/tex/latex/amsmath/amsxtra.sty b/Master/texmf-dist/tex/latex/amsmath/amsxtra.sty index a34f3604d5b..52fcbe43ab1 100644 --- a/Master/texmf-dist/tex/latex/amsmath/amsxtra.sty +++ b/Master/texmf-dist/tex/latex/amsmath/amsxtra.sty @@ -7,7 +7,7 @@ %% amsxtra.dtx %% %% Copyright (C) 1995, 1999 American Mathematical Society. -%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society. +%% Copyright (C) 2016-2023 LaTeX Project and American Mathematical Society. %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c diff --git a/Master/texmf-dist/tex/latex/base/alltt.sty b/Master/texmf-dist/tex/latex/base/alltt.sty index e79e0862641..c7409fe365a 100644 --- a/Master/texmf-dist/tex/latex/base/alltt.sty +++ b/Master/texmf-dist/tex/latex/base/alltt.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ansinew.def b/Master/texmf-dist/tex/latex/base/ansinew.def index c941e68cb5d..8d1d09ea85a 100644 --- a/Master/texmf-dist/tex/latex/base/ansinew.def +++ b/Master/texmf-dist/tex/latex/base/ansinew.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/applemac.def b/Master/texmf-dist/tex/latex/base/applemac.def index 3938259fa9c..3fbc4cff384 100644 --- a/Master/texmf-dist/tex/latex/base/applemac.def +++ b/Master/texmf-dist/tex/latex/base/applemac.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/article.cls b/Master/texmf-dist/tex/latex/base/article.cls index 1488c02e760..d5084603f5d 100644 --- a/Master/texmf-dist/tex/latex/base/article.cls +++ b/Master/texmf-dist/tex/latex/base/article.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{article} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol diff --git a/Master/texmf-dist/tex/latex/base/article.sty b/Master/texmf-dist/tex/latex/base/article.sty index c1f4f6c6070..cbd94b3df15 100644 --- a/Master/texmf-dist/tex/latex/base/article.sty +++ b/Master/texmf-dist/tex/latex/base/article.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ascii.def b/Master/texmf-dist/tex/latex/base/ascii.def index ae9b42af78f..86dbf872058 100644 --- a/Master/texmf-dist/tex/latex/base/ascii.def +++ b/Master/texmf-dist/tex/latex/base/ascii.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty b/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty index e9fee034661..8bdc7c1b662 100644 --- a/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty +++ b/Master/texmf-dist/tex/latex/base/atbegshi-ltx.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,12 +42,12 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %% -%% Copyright (C) 2020-2022 -%% Frank Mittelbach, LaTeX Team +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, The LaTeX Project %% %%% From File: ltshipout.dtx -\providecommand\ltshipoutversion{v1.0m} -\providecommand\ltshipoutdate{2022/08/26} +\providecommand\ltshipoutversion{v1.0n} +\providecommand\ltshipoutdate{2022/11/08} \ProvidesPackage{atbegshi-ltx} [2021/01/10 v1.0c Emulation of the original atbegshi^^Jpackage with kernel methods] diff --git a/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty b/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty index 2a6db6d67d4..2f63091fb5d 100644 --- a/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty +++ b/Master/texmf-dist/tex/latex/base/atveryend-ltx.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,8 +42,8 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0n} -\providecommand\ltfilehookdate{2022/08/18} +\providecommand\ltfilehookversion{v1.0o} +\providecommand\ltfilehookdate{2023/04/02} \ProvidesPackage{atveryend-ltx} [2020/08/19 v1.0a Emulation of the original atveryend package^^Jwith kernel methods] diff --git a/Master/texmf-dist/tex/latex/base/bezier.sty b/Master/texmf-dist/tex/latex/base/bezier.sty index 91ac946ffd8..d786d454783 100644 --- a/Master/texmf-dist/tex/latex/base/bezier.sty +++ b/Master/texmf-dist/tex/latex/base/bezier.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/bk10.clo b/Master/texmf-dist/tex/latex/base/bk10.clo index 3befcaa3945..d0a27151f32 100644 --- a/Master/texmf-dist/tex/latex/base/bk10.clo +++ b/Master/texmf-dist/tex/latex/base/bk10.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{bk10.clo} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xpt\@xiipt diff --git a/Master/texmf-dist/tex/latex/base/bk11.clo b/Master/texmf-dist/tex/latex/base/bk11.clo index 5bec4cf1184..8fb3375e2ef 100644 --- a/Master/texmf-dist/tex/latex/base/bk11.clo +++ b/Master/texmf-dist/tex/latex/base/bk11.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{bk11.clo} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xipt{13.6}% diff --git a/Master/texmf-dist/tex/latex/base/bk12.clo b/Master/texmf-dist/tex/latex/base/bk12.clo index b38d1c7c590..73b7d496dce 100644 --- a/Master/texmf-dist/tex/latex/base/bk12.clo +++ b/Master/texmf-dist/tex/latex/base/bk12.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{bk12.clo} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xiipt{14.5}% diff --git a/Master/texmf-dist/tex/latex/base/book.cls b/Master/texmf-dist/tex/latex/base/book.cls index 28a99524e79..18f0e8d59d1 100644 --- a/Master/texmf-dist/tex/latex/base/book.cls +++ b/Master/texmf-dist/tex/latex/base/book.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{book} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol diff --git a/Master/texmf-dist/tex/latex/base/book.sty b/Master/texmf-dist/tex/latex/base/book.sty index e52d7ae685f..86444d5aa97 100644 --- a/Master/texmf-dist/tex/latex/base/book.sty +++ b/Master/texmf-dist/tex/latex/base/book.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp1250.def b/Master/texmf-dist/tex/latex/base/cp1250.def index aee11b800c2..275eae0b384 100644 --- a/Master/texmf-dist/tex/latex/base/cp1250.def +++ b/Master/texmf-dist/tex/latex/base/cp1250.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp1252.def b/Master/texmf-dist/tex/latex/base/cp1252.def index c1d6ef2cec2..ed4ad38d00f 100644 --- a/Master/texmf-dist/tex/latex/base/cp1252.def +++ b/Master/texmf-dist/tex/latex/base/cp1252.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp1257.def b/Master/texmf-dist/tex/latex/base/cp1257.def index a959b5793a2..24018898d18 100644 --- a/Master/texmf-dist/tex/latex/base/cp1257.def +++ b/Master/texmf-dist/tex/latex/base/cp1257.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp437.def b/Master/texmf-dist/tex/latex/base/cp437.def index 730da2cd07f..a23ff74b70e 100644 --- a/Master/texmf-dist/tex/latex/base/cp437.def +++ b/Master/texmf-dist/tex/latex/base/cp437.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp437de.def b/Master/texmf-dist/tex/latex/base/cp437de.def index 124e89ede50..207223c1784 100644 --- a/Master/texmf-dist/tex/latex/base/cp437de.def +++ b/Master/texmf-dist/tex/latex/base/cp437de.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp850.def b/Master/texmf-dist/tex/latex/base/cp850.def index df640c78323..50d9a083a32 100644 --- a/Master/texmf-dist/tex/latex/base/cp850.def +++ b/Master/texmf-dist/tex/latex/base/cp850.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp852.def b/Master/texmf-dist/tex/latex/base/cp852.def index 6551253c681..d1a42292cfb 100644 --- a/Master/texmf-dist/tex/latex/base/cp852.def +++ b/Master/texmf-dist/tex/latex/base/cp852.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp858.def b/Master/texmf-dist/tex/latex/base/cp858.def index 99af92f4a52..6a4527b1152 100644 --- a/Master/texmf-dist/tex/latex/base/cp858.def +++ b/Master/texmf-dist/tex/latex/base/cp858.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/cp865.def b/Master/texmf-dist/tex/latex/base/cp865.def index dcae5746c73..1aeca6908f2 100644 --- a/Master/texmf-dist/tex/latex/base/cp865.def +++ b/Master/texmf-dist/tex/latex/base/cp865.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/decmulti.def b/Master/texmf-dist/tex/latex/base/decmulti.def index c9c88431531..2c7282aaba1 100644 --- a/Master/texmf-dist/tex/latex/base/decmulti.def +++ b/Master/texmf-dist/tex/latex/base/decmulti.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/doc.sty b/Master/texmf-dist/tex/latex/base/doc.sty index bbaa9a9937e..17ecafd6c6a 100644 --- a/Master/texmf-dist/tex/latex/base/doc.sty +++ b/Master/texmf-dist/tex/latex/base/doc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -53,7 +53,7 @@ \DeclareCurrentRelease{v3}{2022-06-01} \ProvidesPackage{doc} - [2022/07/03 v3.0k + [2022/11/13 v3.0m Standard LaTeX documentation package V3 (FMi)] %% %% Package `doc' to use with LaTeX 2e @@ -292,38 +292,28 @@ \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim \@setupverbvisiblespace \MacroFont \@vobeyspaces \@sxverbatim} -\def\@verbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi - \leftskip\@totalleftmargin\rightskip\z@ - \parindent\z@\parfillskip\@flushglue\parskip\z@ - \@@par - \@tempswafalse - \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par - \penalty\interlinepenalty +\def\@verbatim{\trivlist \item\relax + \if@minipage\else\vskip\parskip\fi + \leftskip\@totalleftmargin\rightskip\z@ + \parindent\z@\parfillskip\@flushglue\parskip\z@ + \language\l@nohyphenation + \@@par + \@tempswafalse + \def\par{% + \if@tempswa + \leavevmode \null \@@par\penalty\interlinepenalty + \else + \@tempswatrue + \ifhmode\@@par\penalty\interlinepenalty\fi + \fi \check@percent}% - \obeylines - \let\do\do@noligs \verbatim@nolig@list - \let\do\@makeother \dospecials} + \let\do\@makeother \dospecials + \obeylines \verbatim@font \@noligs + \everypar \expandafter{\the\everypar \unpenalty}% +} {\catcode`\%=12 \long\gdef\check@percent#1{\ifx #1%\let\next\@empty \else \let\next=#1\fi \next}} -\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi - \bgroup \let\do\do@noligs \verbatim@nolig@list - \ttfamily \verb@eol@error \let\do\@makeother \dospecials - \@ifstar{\@sverb}{\@vobeyspaces \frenchspacing \@sverb}} -\let\verb@balance@group\@empty -\def\verb@egroup{\global\let\verb@balance@group\@empty\egroup} -\begingroup - \obeylines% - \gdef\verb@eol@error{\obeylines% - \def^^M{\verb@egroup\@latex@error{% - \noexpand\verb command ended by end of line}\@ehc}}% -\endgroup -\def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-} -\def\do@noligs#1{% - \catcode`#1\active - \begingroup - \lccode`\~=`#1\relax - \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1}}} \newcount\macro@cnt \macro@cnt=0 \newskip\MacroTopsep \MacroTopsep = 7pt plus 2pt minus 2pt \begingroup @@ -360,16 +350,11 @@ \let\next\macro@name \else \let\next\short@macro \fi \next} -\begingroup -\catcode`\&=12 -\gdef\short@macro#1{\begingroup - \uccode`\&=\expandafter`\string#1% - \uppercase{\def\x{\def\macro@namepart{&}}}% - \expandafter\endgroup\x +\def\short@macro#1{% + \edef\macro@namepart{\string#1}% \maybe@index@short@macro\macro@namepart \scan@allowedfalse#1% \scan@allowedtrue } -\endgroup \def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}% \futurelet\next\more@macroname} \def\more@macroname{\ifcat\noexpand\next a% @@ -447,7 +432,7 @@ } \cs_set_eq:NN \maybe@index@macro \__doc_maybe_index:o \cs_new:Npn \__doc_maybe_index_short:o #1 { - \exp_args:Nf \__doc_maybe_index_aux:nN { \tl_to_str:o {#1} } + \exp_args:No \__doc_maybe_index_aux:nN #1 \SpecialShortIndex } \cs_set_eq:NN \maybe@index@short@macro \__doc_maybe_index_short:o @@ -479,7 +464,7 @@ {\cs_to_str:N \^^M } {\def\reserved@a{ \string \space \actualchar } \def\reserved@b { \space } \let\reserved@c \@empty } - { } {\def\reserved@a{ \string \space \actualchar } + { ~ } {\def\reserved@a{ \string \space \actualchar } \def\reserved@b { \space } \let\reserved@c \@empty } {\c_left_brace_str} { \def\reserved@a{ \bgroup \actualchar } diff --git a/Master/texmf-dist/tex/latex/base/docstrip.tex b/Master/texmf-dist/tex/latex/base/docstrip.tex index a04954ae4a8..fa6dbc7cc18 100644 --- a/Master/texmf-dist/tex/latex/base/docstrip.tex +++ b/Master/texmf-dist/tex/latex/base/docstrip.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/exscale.sty b/Master/texmf-dist/tex/latex/base/exscale.sty index 1863d30d4ca..6963e460dce 100644 --- a/Master/texmf-dist/tex/latex/base/exscale.sty +++ b/Master/texmf-dist/tex/latex/base/exscale.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fix-cm.sty b/Master/texmf-dist/tex/latex/base/fix-cm.sty index 2308c89ad89..a3b9cdb159d 100644 --- a/Master/texmf-dist/tex/latex/base/fix-cm.sty +++ b/Master/texmf-dist/tex/latex/base/fix-cm.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fixltx2e.sty b/Master/texmf-dist/tex/latex/base/fixltx2e.sty index d0f5fd64e07..6ad616e364a 100644 --- a/Master/texmf-dist/tex/latex/base/fixltx2e.sty +++ b/Master/texmf-dist/tex/latex/base/fixltx2e.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/flafter.sty b/Master/texmf-dist/tex/latex/base/flafter.sty index a20588cd7cc..1e63489fc05 100644 --- a/Master/texmf-dist/tex/latex/base/flafter.sty +++ b/Master/texmf-dist/tex/latex/base/flafter.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fleqn.clo b/Master/texmf-dist/tex/latex/base/fleqn.clo index d7e3559b77a..2c359bb5140 100644 --- a/Master/texmf-dist/tex/latex/base/fleqn.clo +++ b/Master/texmf-dist/tex/latex/base/fleqn.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fleqn.sty b/Master/texmf-dist/tex/latex/base/fleqn.sty index 95fc2382cd8..87a4373fcad 100644 --- a/Master/texmf-dist/tex/latex/base/fleqn.sty +++ b/Master/texmf-dist/tex/latex/base/fleqn.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fltrace.sty b/Master/texmf-dist/tex/latex/base/fltrace.sty index 1f6ccd47118..6b6c5d2b48e 100644 --- a/Master/texmf-dist/tex/latex/base/fltrace.sty +++ b/Master/texmf-dist/tex/latex/base/fltrace.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fontenc.sty b/Master/texmf-dist/tex/latex/base/fontenc.sty index d1aa2ccd41f..4e2ab3f175b 100644 --- a/Master/texmf-dist/tex/latex/base/fontenc.sty +++ b/Master/texmf-dist/tex/latex/base/fontenc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fontmath.cfg b/Master/texmf-dist/tex/latex/base/fontmath.cfg index 07c5e9da740..90df936090f 100644 --- a/Master/texmf-dist/tex/latex/base/fontmath.cfg +++ b/Master/texmf-dist/tex/latex/base/fontmath.cfg @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fontmath.ltx b/Master/texmf-dist/tex/latex/base/fontmath.ltx index e0bf5b2b610..f7b757f2352 100644 --- a/Master/texmf-dist/tex/latex/base/fontmath.ltx +++ b/Master/texmf-dist/tex/latex/base/fontmath.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fonttext.cfg b/Master/texmf-dist/tex/latex/base/fonttext.cfg index 2d15d5b3516..5dfa252040f 100644 --- a/Master/texmf-dist/tex/latex/base/fonttext.cfg +++ b/Master/texmf-dist/tex/latex/base/fonttext.cfg @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/fonttext.ltx b/Master/texmf-dist/tex/latex/base/fonttext.ltx index 5ec0a9b4292..5acce723ccf 100644 --- a/Master/texmf-dist/tex/latex/base/fonttext.ltx +++ b/Master/texmf-dist/tex/latex/base/fonttext.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/graphpap.sty b/Master/texmf-dist/tex/latex/base/graphpap.sty index f6163a85d5e..d13dd84d277 100644 --- a/Master/texmf-dist/tex/latex/base/graphpap.sty +++ b/Master/texmf-dist/tex/latex/base/graphpap.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/hyphen.ltx b/Master/texmf-dist/tex/latex/base/hyphen.ltx index e4e9fb40f8d..4a33216714a 100644 --- a/Master/texmf-dist/tex/latex/base/hyphen.ltx +++ b/Master/texmf-dist/tex/latex/base/hyphen.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/idx.tex b/Master/texmf-dist/tex/latex/base/idx.tex index bc0dd710218..04c8ef69591 100644 --- a/Master/texmf-dist/tex/latex/base/idx.tex +++ b/Master/texmf-dist/tex/latex/base/idx.tex @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2022 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % diff --git a/Master/texmf-dist/tex/latex/base/ifthen.sty b/Master/texmf-dist/tex/latex/base/ifthen.sty index d09c133511f..db0c04e05d0 100644 --- a/Master/texmf-dist/tex/latex/base/ifthen.sty +++ b/Master/texmf-dist/tex/latex/base/ifthen.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/inputenc.sty b/Master/texmf-dist/tex/latex/base/inputenc.sty index 22c61bdb9bb..f1861718935 100644 --- a/Master/texmf-dist/tex/latex/base/inputenc.sty +++ b/Master/texmf-dist/tex/latex/base/inputenc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/lablst.tex b/Master/texmf-dist/tex/latex/base/lablst.tex index 0821b0e4f06..b0a3ac1ab60 100644 --- a/Master/texmf-dist/tex/latex/base/lablst.tex +++ b/Master/texmf-dist/tex/latex/base/lablst.tex @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2022 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % diff --git a/Master/texmf-dist/tex/latex/base/latex.ltx b/Master/texmf-dist/tex/latex/base/latex.ltx index daf5ff1c8ef..d8c3df4c6d7 100644 --- a/Master/texmf-dist/tex/latex/base/latex.ltx +++ b/Master/texmf-dist/tex/latex/base/latex.ltx @@ -61,7 +61,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -432,6 +432,7 @@ \def\extrafloats#1{% \ifnum#1>\z@ \count@\numexpr\float@count-1\relax + \ifnum\count@<266 \ch@ck0\m@ne\insert\fi \ch@ck0\count@\count \ch@ck1\count@\dimen \ch@ck2\count@\skip @@ -440,8 +441,7 @@ \global\expandafter\e@alloc@chardef \csname bx@\the\float@count\endcsname\float@count \@cons\@freelist{\csname bx@\the\float@count\endcsname}% -\expandafter -\extrafloats\expandafter{\numexpr#1-1\relax}% +\expandafter\extrafloats\expandafter{\the\numexpr#1-1\expandafter}% \fi}% \fi \def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count} @@ -705,8 +705,8 @@ %%% From File: ltvers.dtx \def\fmtname{LaTeX2e} \edef\fmtversion - {2022-11-01} -\def\patch@level{1} + {2023-06-01} +\def\patch@level{0} \edef\development@branch@name{} \iffalse \def\reserved@a#1/#2/#3\@nil{% @@ -732,19 +732,22 @@ \fi \let\reserved@a\relax \fi +\newtoks\LaTeXReleaseInfo +\everyjob\expandafter{\the\everyjob\the\LaTeXReleaseInfo} +\let\show@release@info\typeout \ifnum0\ifnum\patch@level=0 \ifx\development@branch@name\@empty 1\fi\fi>0 % - \everyjob\expandafter{\the\everyjob - \typeout{\fmtname\space <\fmtversion>}} + \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo + \show@release@info{\fmtname\space <\fmtversion>}} \immediate \write16{\fmtname \space<\fmtversion>} \else\ifnum\patch@level>0 - \everyjob\expandafter{\the\everyjob - \typeout{\fmtname\space <\fmtversion> patch level \patch@level}} + \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo + \show@release@info{\fmtname\space <\fmtversion> patch level \patch@level}} \immediate \write16{\fmtname\space <\fmtversion> patch level \patch@level} \else - \everyjob\expandafter{\the\everyjob - \typeout{\fmtname\space <\fmtversion> + \LaTeXReleaseInfo\expandafter{\the\LaTeXReleaseInfo + \show@release@info{\fmtname\space <\fmtversion> pre-release-\number-\patch@level\space \ifx\development@branch@name\@undefined \else \ifx\development@branch@name\@empty \else @@ -1519,13 +1522,35 @@ \long\def\declare@commandcopy#1#2#3#4{% \edef\reserved@a{\@expl@cs@to@str@@N#3}% \@ifundefined\reserved@a{#1}{#2}% - {\robust@command@act - \@declarecommandcopylisthook#4% - \declare@commandcopy@let{#3#4}}} + {\declare@commandcopy@do{#3}{#4}}} +\long\def\declare@commandcopy@do#1#2{% + \robust@command@act + \@declarecommandcopylisthook#2% + \declare@commandcopy@let{#1#2}} \def\@declarecommandcopylisthook{% {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}% {\@if@newcommand \@copy@newcommand}} \long\def\declare@commandcopy@let#1#2{\let#1=#2\relax} +\def\NewEnvironmentCopy{% + \declare@environmentcopy + {\@firstofone}% + {\@firstoftwo\@notdefinable}} +\def\RenewEnvironmentCopy{% + \declare@environmentcopy + {\@latex@error{Environment \reserved@a\space undefined}\@ehc + \@firstofone}% + {\@firstofone}} +\def\DeclareEnvironmentCopy{% + \declare@environmentcopy + {\@firstofone}% + {\@firstofone}} +\long\def\declare@environmentcopy#1#2#3#4{% + \edef\reserved@a{\@ifundefined{#3}{end#3}{#3}}% + \@ifundefined\reserved@a + {\def\reserved@a{#3}#1}% + {\def\reserved@a{#3}#2}% + {\ExpandArgs{cc}\declare@commandcopy@do{#3}{#4}% + \ExpandArgs{cc}\declare@commandcopy@do{end#3}{end#4}}} \long\def\ShowCommand#1{% \robust@command@act \@showcommandlisthook#1% @@ -1585,9 +1610,10 @@ \robust@command@chk@safe#1% {\@if@newcommand#1% {\@show@newcommand}% - {\show}}% - {\show}% + {\@show@macro}}% + {\@show@macro}% #1} +\let\@show@macro\show \long\def\@if@newcommand#1{% \edef\reserved@a{% \noexpand\@protected@testopt @@ -1615,13 +1641,59 @@ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% \expandafter\@show@newcommand@aux \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname - \expandafter{#1}} -\long\def\@show@newcommand@aux#1#2{% + \expandafter{#1}\@show@tokens} +\long\def\@show@newcommand@aux#1#2#3{% \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}% - \edef\reserved@a{% - default \string##1=\expandafter\detokenize\@gobblethree#2.^^J% - \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}% - \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}} + #3{default \string##1=\expandafter\detokenize\@gobblethree#2.^^J% + \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}} +\long\def\@show@tokens#1{% + \edef\reserved@a{#1}% + \showtokens\expandafter + \expandafter\expandafter{\expandafter\reserved@a}} +\def\ShowEnvironment#1{% + \expandafter\@show@environment\csname #1\endcsname} +\long\def\@show@environment#1{% + \robust@command@act + \@showenvironmentlisthook#1% + \@show@normalenv#1} +\def\@showenvironmentlisthook{% + {\@if@DeclareRobustCommand \@show@DeclareRobustCommand@env}% + {\@if@newcommand \@show@newcommand@env}} +\long\def\@show@newcommand@env#1{% + \@show@environment@begin#1% + \expandafter\@show@newcommand@aux + \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname + \expandafter{#1}\@show@typeout + \@show@environment@end#1} +\long\def\@show@DeclareRobustCommand@env#1{% + \@show@environment@begin#1% + \begingroup + \let\@show@tokens\@show@typeout + \let\@show@macro\@show@nonstop + \expandafter\show@kernel@robust@command + \csname\@expl@cs@to@str@@N#1 \endcsname + \endgroup + \@show@environment@end#1} +\long\def\@show@environment@begin#1{% + \typeout{> \string\begin{\@expl@cs@to@str@@N#1}=environment:}% + \typeout{\@expl@cs@argument@spec@@N#1->% + \@expl@cs@replacement@spec@@N#1.^^J}} +\long\def\@show@normalenv#1{% + \@show@environment@begin#1% + \@show@environment@end#1} +\long\def\@show@environment@end#1{% + \expandafter\@show@environment@end@aux + \csname end\@expl@cs@to@str@@N#1\endcsname#1} +\long\def\@show@environment@end@aux#1#2{% + \@show@tokens{\string\end{\@expl@cs@to@str@@N#2}% + \ifx\relax#1=undefined% + \else:^^J\@expl@cs@argument@spec@@N#1->% + \@expl@cs@replacement@spec@@N#1% + \fi}} +\def\@show@nonstop#1{% + \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:^^J% + \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1.}} +\def\@show@typeout#1{\typeout{> #1.^^J}} \def\@ifundefined#1{% \ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}} \long\def\@ifundefin@d@i#1\fi#2{\fi @@ -1731,8 +1803,8 @@ \xdef#1{\the\toks@}% \endgroup} %%% From File: ltcmd.dtx -\def\ltcmdversion{v1.1a} -\def\ltcmddate{2022-08-16} +\def\ltcmdversion{v1.1e} +\def\ltcmddate{2023-05-26} \message{document commands,} \ExplSyntaxOn \tl_new:N \l__cmd_arg_spec_tl @@ -2014,10 +2086,10 @@ \int_zero:N \l__cmd_current_arg_int \__cmd_tl_mapthread_function:NNN \l__cmd_args_tl \l__cmd_defaults_tl \__cmd_defaults_def:nn - \cs_generate_from_arg_count:NNVo \__cmd_tmp:w \cs_set:Npn + \cs_generate_from_arg_count:NNno \__cmd_tmp:w \cs_set:Npn \l__cmd_current_arg_int \l__cmd_tmpa_tl } -\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo } +\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno } \cs_new_protected:Npn \__cmd_defaults_def:nn { \int_incr:N \l__cmd_current_arg_int @@ -2801,7 +2873,9 @@ \__cmd_set_eq_if_exist:cc { #1 ~ \c_space_tl } { #2 ~ \c_space_tl } \__cmd_set_eq_if_exist:cc { #1 ~ defaults } { #2 ~ defaults } \exp_after:wN \__cmd_copy_expandable_signature:NnNNNNnnn #4 {#1} {#2} - \cs_set_nopar:Npx #3 + \token_if_protected_macro:NTF #4 + { \cs_set_protected_nopar:Npx }{ \cs_set_nopar:Npx } + #3 { \exp_after:wN \__cmd_copy_expandable:NnNNNNnnn #4 {#1} {#2} } } \cs_new:Npn \__cmd_copy_expandable:NnNNNNnnn #1 #2 #3 #4 #5 #6 #7 #8 #9 @@ -2938,19 +3012,26 @@ \cs_new_protected:Npn \__cmd_show_command:N #1 { \exp_after:wN \__cmd_show_command:NnNNwN #1 \q__cmd #1 } \cs_new_protected:Npn \__cmd_show_command:NnNNwN #1 #2 #3 #4 #5 \q__cmd #6 - { \__cmd_show_command_aux:nNNn { document~command } #6 #4 {#2} } + { + \__cmd_show_command_aux:NnNNn \tl_show:x + { document~command } #6 #4 {#2} + } \cs_new_protected:Npn \__cmd_show_expandable:N #1 { \exp_after:wN \__cmd_show_expandable:NnNNNNnN #1 #1 } \cs_new_protected:Npn \__cmd_show_expandable:NnNNNNnN #1 #2 #3 #4 #5 #6 #7 #8 - { \__cmd_show_command_aux:nNNn { expandable~document~command } #8 #5 {#2} } -\cs_new_protected:Npn \__cmd_show_command_aux:nNNn #1 #2 #3 #4 { - \__cmd_split_signature:n {#4} - \tl_show:x + \exp_args:NNe \__cmd_show_command_aux:NnNNn \tl_show:x + { \token_if_protected_macro:NF #8 { expandable~ } document~command } + #8 #5 {#2} + } +\cs_new_protected:Npn \__cmd_show_command_aux:NnNNn #1 #2 #3 #4 #5 + { + \__cmd_split_signature:n {#5} + #1 { - \token_to_str:N #2 = #1: \iow_newline: + \token_to_str:N #3 = #2: \iow_newline: \tl_use:N \l__cmd_tmpa_tl - -> \cs_replacement_spec:N #3 + -> \cs_replacement_spec:N #4 } } \cs_new_protected:Npn \__cmd_show_environment:N #1 @@ -2967,12 +3048,14 @@ { \use:x { - \__cmd_show_command_aux:nNNn { document~environment } + \__cmd_show_command_aux:NnNNn \__cmd_show:x { document~environment } { \exp_not:N \begin {#3} } \exp_not:c { environment~ #3 ~ code } {#2} } } +\cs_new_protected:Npn \__cmd_show:x #1 + { \iow_term:x { > ~ #1 . \iow_newline: } } \cs_new_protected:Npn \__cmd_show_environment_end:N #1 { \exp_args:NNx \__cmd_check_end:Nn \l__cmd_tmpa_tl { \cs_to_str:N #1 } @@ -2980,6 +3063,8 @@ } \tl_gput_right:Nn \@showcommandlisthook { { \__kernel_cmd_if_xparse:NTF \__cmd_show:N } } +\tl_gput_right:Nn \@showenvironmentlisthook + { { \__kernel_cmd_if_xparse:NTF \__cmd_show:N } } \cs_new_protected:Npn \__cmd_split_signature:n #1 { \int_set:Nn \l__cmd_current_arg_int { 1 } @@ -3390,6 +3475,7 @@ \tl_set:Nn \l__cmd_signature_tl {#1} \group_begin: \tex_escapechar:D = 92 \scan_stop: + \tex_endlinechar:D = `\^^M \scan_stop: \tl_clear:N \l__cmd_v_arg_tl \peek_remove_spaces:n { @@ -3407,8 +3493,8 @@ } \cs_new_protected:Npn \__cmd_grab_v_group_end: { - \exp_args:NNNo - \group_end: + \exp_args:NNNo + \group_end: \tl_set:Nn \l__cmd_v_arg_tl { \l__cmd_v_arg_tl } } \cs_new_protected:Npn \__cmd_grab_v_aux_test:N #1 @@ -3486,7 +3572,6 @@ { \cs_set_eq:NN \do \char_set_catcode_other:N \dospecials - \tex_endlinechar:D = `\^^M \scan_stop: \bool_if:NTF \l__cmd_long_bool { \char_set_catcode_other:n { \tex_endlinechar:D } } { \char_set_catcode_parameter:n { \tex_endlinechar:D } } @@ -4535,8 +4620,8 @@ \ExplSyntaxOff %%% From File: lthooks.dtx -\def\lthooksversion{v1.0v} -\def\lthooksdate{2022/06/15} +\def\lthooksversion{v1.1e} +\def\lthooksdate{2023/06/06} \ExplSyntaxOn \bool_new:N \g__hook_debug_bool \cs_new_eq:NN \__hook_debug:n \use_none:n @@ -4567,61 +4652,77 @@ \tl_new:N \g__hook_hook_curr_name_tl \seq_new:N \g__hook_name_stack_seq \cs_new_eq:NN \__hook_tmp:w ? +\tl_const:Nn \c__hook_empty_tl { } +\tl_const:Nn \c__hook_nine_parameters_tl { #1#2#3#4#5#6#7#8#9 } \cs_generate_variant:Nn \tl_gremove_once:Nn { Nx } \cs_generate_variant:Nn \tl_show:n { x } \cs_generate_variant:Nn \tl_log:n { x } +\cs_generate_variant:Nn \tl_set:Nn { Ne } +\cs_generate_variant:Nn \cs_replacement_spec:N { c } +\cs_generate_variant:Nn \prop_put:Nnn { Nne } +\cs_generate_variant:Nn \str_count:n { e } \scan_new:N \s__hook_mark -\cs_new:Npn \__hook_clean_to_scan:w #1 \s__hook_mark { } -\cs_new_protected:Npn \__hook_tl_set:Nn #1#2 - { \cs_set_nopar:Npx #1 { \__kernel_exp_not:w {#2} } } -\cs_new_protected:Npn \__hook_tl_set:Nx #1#2 - { \cs_set_nopar:Npx #1 {#2} } -\cs_generate_variant:Nn \__hook_tl_set:Nn { c } -\cs_generate_variant:Nn \__hook_tl_set:Nx { c } +\cs_new:Npn \__hook_use_none_delimit_by_s_mark:w #1 \s__hook_mark { } +\cs_new:Npn \__hook_use_i_delimit_by_s_mark:nw #1 #2 \s__hook_mark {#1} +\cs_new_protected:Npn \__hook_tl_set:cn #1#2 + { \cs_set_nopar:cpx {#1} { \__kernel_exp_not:w {#2} } } \cs_new_protected:Npn \__hook_tl_gset:Nn #1#2 { \cs_gset_nopar:Npx #1 { \__kernel_exp_not:w {#2} } } -\cs_new_protected:Npn \__hook_tl_gset:No #1#2 - { \cs_gset_nopar:Npx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } } \cs_new_protected:Npn \__hook_tl_gset:Nx #1#2 { \cs_gset_nopar:Npx #1 {#2} } -\cs_generate_variant:Nn \__hook_tl_gset:Nn { c } -\cs_generate_variant:Nn \__hook_tl_gset:No { c } +\cs_generate_variant:Nn \__hook_tl_gset:Nn { c, co } \cs_generate_variant:Nn \__hook_tl_gset:Nx { c } \cs_new_protected:Npn \__hook_tl_gput_right:Nn #1#2 { \__hook_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } } -\cs_generate_variant:Nn \__hook_tl_gput_right:Nn { No, cn } +\cs_generate_variant:Nn \__hook_tl_gput_right:Nn { Ne, cn } \cs_new_protected:Npn \__hook_tl_gput_left:Nn #1#2 { \__hook_tl_gset:Nx #1 { \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} } } -\cs_generate_variant:Nn \__hook_tl_gput_left:Nn { No } \cs_new_eq:NN \__hook_tl_gset_eq:NN \tl_gset_eq:NN \cs_new_protected:Npn \__hook_tl_gclear:N #1 { \__hook_tl_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \__hook_tl_gclear:N { c } - \cs_new_protected:Npn \hook_new:n #1 - { \__hook_normalize_hook_args:Nn \__hook_new:n {#1} } -\cs_new_protected:Npn \__hook_new:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new:nn {#1} { 0 } } +\cs_new_protected:Npn \hook_new_with_args:nn #1 #2 + { \__hook_normalize_hook_args:Nn \__hook_new:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_new:nn #1 #2 { \__hook_if_declared:nTF {#1} { \msg_error:nnn { hooks } { exists } {#1} } { \tl_new:c { g__hook_#1_declared_tl } - \__hook_make_usable:n {#1} + \cs_undefine:c { __hook~#1 } + \cs_undefine:c { c__hook_#1_parameter_tl } + \__hook_make_usable:nn {#1} {#2} + \__hook_update_hook_code:n {#1} } } -\cs_new_protected:Npn \__hook_make_usable:n #1 +\cs_new_protected:Npn \__hook_make_usable:nn #1 #2 { - \tl_if_exist:cF { __hook~#1 } + \__hook_if_usable:nF {#1} { \seq_gput_right:Nn \g__hook_all_seq {#1} - \tl_new:c { __hook~#1 } + \__kernel_cs_parm_from_arg_count:nnF + { \tl_const:cn { c__hook_#1_parameter_tl } } {#2} + { + \msg_error:nnnn { hooks } { too-many-args } {#1} {#2} + \tl_const:cx { c__hook_#1_parameter_tl } + { \exp_not:V \c__hook_nine_parameters_tl } + } + \__hook_normalise_cs_args:nn { _toplevel } {#1} + \__hook_normalise_cs_args:nn { _next } {#1} + \__hook_code_gset:nn {#1} { } \__hook_init_structure:n {#1} - \clist_new:c { g__hook_#1_labels_clist } - \tl_new:c { g__hook_#1_reversed_tl } + \__hook_normalise_code_pool:n {#1} + \clist_if_exist:cF { g__hook_#1_labels_clist } + { + \clist_new:c { g__hook_#1_labels_clist } + \tl_new:c { g__hook_#1_reversed_tl } + } \__hook_include_legacy_code_chunk:n {#1} } } @@ -4630,27 +4731,53 @@ \__hook_if_structure_exist:nF {#1} { \prop_new:c { g__hook_#1_code_prop } - \tl_new:c { __hook_toplevel~#1 } - \tl_new:c { __hook_next~#1 } + \__hook_toplevel_gset:nn {#1} { } + \__hook_next_gset:nn {#1} { } } } \cs_new_protected:Npn \hook_new_reversed:n #1 - { \__hook_normalize_hook_args:Nn \__hook_new_reversed:n {#1} } -\cs_new_protected:Npn \__hook_new_reversed:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new_reversed:nn {#1} { 0 } } +\cs_new_protected:Npn \hook_new_reversed_with_args:nn #1 #2 + { \__hook_normalize_hook_args:Nn \__hook_new_reversed:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_new_reversed:nn #1 #2 { - \__hook_new:n {#1} - \tl_gset:cn { g__hook_#1_reversed_tl } { - } + \__hook_if_declared:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \__hook_new:nn {#1} {#2} + \tl_gset:cn { g__hook_#1_reversed_tl } { - } + } } \cs_new_protected:Npn \hook_new_pair:nn #1#2 - { \hook_new:n {#1} \hook_new_reversed:n {#2} } + { \__hook_normalize_hook_args:Nnn \__hook_new_pair:nnn {#1} {#2} { 0 } } +\cs_new_protected:Npn \hook_new_pair_with_args:nnn #1#2#3 + { \__hook_normalize_hook_args:Nnn \__hook_new_pair:nnn {#1} {#2} {#3} } +\cs_new_protected:Npn \__hook_new_pair:nnn #1 #2 #3 + { + \__hook_if_declared:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \__hook_if_declared:nTF {#2} + { \msg_error:nnn { hooks } { exists } {#2} } + { + \__hook_new:nn {#1} {#3} + \__hook_new_reversed:nn {#2} {#3} + } + } + } \cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1 { \tl_if_exist:cT { @#1hook } { \tl_if_empty:cF { @#1hook } { - \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1} - { legacy } { @#1hook } + \__hook_replacing_args_false: + \use:e + { + \__hook_hook_gput_code_do:nnn {#1} { legacy } + { \exp_not:v { @#1hook } } + } + \__hook_replacing_args_reset: \__hook_tl_gclear:c { @#1hook } } } @@ -4666,7 +4793,7 @@ { \bool_lazy_and:nnTF { \tl_if_exist_p:c { g__hook_#1_declared_tl } } - { ! \tl_if_exist_p:c { __hook~#1 } } + { ! \cs_if_exist_p:c { __hook~#1 } } { \prg_return_true: } { \prg_return_false: } } @@ -4680,7 +4807,7 @@ \__hook_if_declared:nF {#1} { \tl_new:c { g__hook_#1_declared_tl } - \__hook_make_usable:n {#1} + \__hook_make_usable:nn {#1} { 0 } \tl_gset:cx { g__hook_#1_reversed_tl } { \__hook_if_generic_reversed:nT {#1} { - } } \__hook_update_hook_code:n {#1} @@ -4827,23 +4954,45 @@ } { \tl_gset:Nn \g__hook_hook_curr_name_tl {#1} } } -\cs_new_protected:Npn \hook_gput_code:nnn #1 #2 - { \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} } +\cs_new_protected:Npn \hook_gput_code:nnn #1 #2 #3 + { + \__hook_replacing_args_false: + \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} {#3} + \__hook_replacing_args_reset: + } +\cs_new_protected:Npn \hook_gput_code_with_args:nnn #1 #2 #3 + { + \__hook_replacing_args_true: + \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} {#3} + \__hook_replacing_args_reset: + } \cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3 { + \__hook_chk_args_allowed:nn {#1} { AddToHook } \__hook_if_execute_immediately:nTF {#1} - {#3} { - \__hook_if_usable:nTF {#1} + \__hook_if_replacing_args:TF { - \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} - \__hook_update_hook_code:n {#1} - } - { - \__hook_if_disabled:nTF {#1} - { \msg_error:nnn { hooks } { hook-disabled } {#1} } - { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } + \msg_error:nnnn { hooks } { one-time-args } + {#1} { AddToHook } } + { } + \use:n + } + { \__hook_gput_code_store:nnn {#1} {#2} } + {#3} + } +\cs_new_protected:Npn \__hook_gput_code_store:nnn #1 #2 #3 + { + \__hook_if_usable:nTF {#1} + { + \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} + \__hook_update_hook_code:n {#1} + } + { + \__hook_if_disabled:nTF {#1} + { \msg_error:nnn { hooks } { hook-disabled } {#1} } + { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } } } \cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 @@ -4857,18 +5006,57 @@ \str_if_eq:eeTF { top-level } { \__hook_currname_or_default: } { \__hook_init_structure:n {#1} - \__hook_tl_gput_right:cn { __hook_toplevel~#1 } {#3} + \__hook_cs_gput_right:nnn { _toplevel } {#1} {#3} } { \msg_error:nnn { hooks } { misused-top-level } {#1} } } { - \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl + \exp_args:Nx \__hook_prop_gput_labeled_cleanup:nnn + { + \__hook_if_replacing_args:TF + { \exp_not:n } + { \__hook_double_hashes:n } + {#3} + } + {#1} {#2} + } + } +\cs_new_protected:Npn \__hook_prop_gput_labeled_cleanup:nnn #1 #2 #3 + { + \tl_set:Nn \l__hook_return_tl {#1} + \__hook_if_replacing_args:TF + { + \__hook_if_usable:nT {#2} { - \prop_gput:cno { g__hook_#1_code_prop } {#2} - { \l__hook_return_tl #3 } + \__hook_set_normalise_fn:nn {#2} + { Invalid~code~added~\msg_line_context: } + \__hook_normalise_fn:nn {#3} {#1} + \prop_get:NnN \l__hook_work_prop {#3} \l__hook_return_tl } - { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} } } + { } + \exp_args:NcV \__hook_prop_gput_labeled_do:Nnn + { g__hook_#2_code_prop } \l__hook_return_tl {#3} + } +\cs_new_protected:Npn \__hook_prop_gput_labeled_do:Nnn #1 #2 #3 + { + \prop_get:NnNTF #1 {#3} \l__hook_return_tl + { \prop_gput:Nno #1 {#3} { \l__hook_return_tl #2 } } + { \prop_gput:Nnn #1 {#3} {#2} } + } +\cs_new_protected:Npn \__hook_chk_args_allowed:nn #1 #2 + { + \__hook_if_replacing_args:TF + { + \__hook_if_declared:nT {#1} + { \tl_if_empty:cT { c__hook_#1_parameter_tl } { \use_ii:nn } } + \use_none:n + { + \msg_error:nnnn { hooks } { without-args } {#1} {#2} + \__hook_replacing_args_false: + } + } + { } } \cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3 { @@ -4878,14 +5066,14 @@ \cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} - \hook_gput_code:nnn + \__hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn {#1} } \cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} - \hook_gput_next_code:nn + \__hook_gput_next_code:nn \__hook_gput_next_do:nn {#1} } @@ -4897,8 +5085,12 @@ \__hook_if_usable:nF {#5} { \str_if_eq:nnT {#1} { cmd } - { \__hook_try_put_cmd_hook:n {#5} } - \__hook_make_usable:n {#5} + { + \__hook_try_put_cmd_hook:n {#5} + \__hook_make_usable:nn {#5} { 9 } + \use_none:nnn + } + \__hook_make_usable:nn {#5} { 0 } } \__hook_if_generic_reversed:nT {#5} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } @@ -4938,17 +5130,6 @@ { #3 / #5 / #4 } #1 #2 { #3 / #5 / #4 } } -\prg_new_conditional:Npnn \__hook_if_file_hook:w - #1 / #2 \s__hook_mark #3 { TF } - { - \__hook_if_generic:nTF {#3} - { - \str_if_eq:nnTF {#1} { file } - { \prg_return_true: } - { \prg_return_false: } - } - { \prg_return_false: } - } \clist_map_inline:nn { cmd , env , file , package , class , include } { \tl_const:cn { c__hook_generic_#1/./before_tl } { + } @@ -4964,6 +5145,8 @@ \tl_const:cn { c__hook_deprecated_#1/./after_tl } { } } \tl_const:cn { c__hook_deprecated_include/./end_tl } { } +\tl_const:cn { c__hook_parameter_cmd/./before_tl } { #1#2#3#4#5#6#7#8#9 } +\tl_const:cn { c__hook_parameter_cmd/./after_tl } { #1#2#3#4#5#6#7#8#9 } \cs_new_protected:Npn \hook_gremove_code:nn #1 #2 { \__hook_normalize_hook_args:Nnn \__hook_gremove_code:nn {#1} {#2} } \cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 @@ -4973,12 +5156,12 @@ \str_if_eq:nnTF {#2} {*} { \prop_gclear:c { g__hook_#1_code_prop } - \__hook_tl_gclear:c { __hook_toplevel~#1 } - \__hook_tl_gclear:c { __hook_next~#1 } + \__hook_toplevel_gset:nn {#1} { } + \__hook_next_gset:nn {#1} { } } { \str_if_eq:nnTF {#2} { top-level } - { \__hook_tl_gclear:c { __hook_toplevel~#1 } } + { \__hook_toplevel_gset:nn {#1} { } } { \prop_gpop:cnNF { g__hook_#1_code_prop } {#2} \l__hook_return_tl { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } @@ -4996,9 +5179,206 @@ { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } -\prop_new:c {g__hook_??_code_prop} -\prop_new:c {__hook~??} -\tl_new:c {g__hook_??_reversed_tl} +\cs_new_protected:Npn \__hook_cs_gput_right:nnn #1 #2 + { + \if:w T + \__hook_if_declared:nF {#2} { F } + \tl_if_empty:cF { c__hook_#2_parameter_tl } { F } + T + \exp_after:wN \__hook_cs_gput_right_fast:nnn + \else: + \exp_after:wN \__hook_cs_gput_right_slow:nnn + \fi: + {#1} {#2} + } +\cs_new_protected:Npn \__hook_cs_gput_right_fast:nnn #1 #2 #3 + { \cs_gset:cpx { __hook#1~#2 } { \exp_not:v { __hook#1~#2 } \exp_not:n {#3} } } +\cs_new_protected:Npn \__hook_cs_gput_right_slow:nnn #1 #2 #3 + { + \cs_if_exist:cF { __hook#1~#2 } + { \__hook_code_gset_aux:nnn {#1} {#2} { } } + \__hook_code_gset_auxi:eeen + { + \__hook_if_declared:nTF {#2} + { \tl_use:c { c__hook_#2_parameter_tl } } + { + \__hook_if_generic:nTF {#2} + { \__hook_generic_parameter:n {#2} } + { \c__hook_nine_parameters_tl } + } + } + { + \exp_args:NNo \exp_args:No \__hook_double_hashes:n + { + \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: + { \__hook_braced_cs_parameter:n { __hook#1~#2 } } + } + } + { + \__hook_if_replacing_args:TF + { \exp_not:n } + { \__hook_double_hashes:n } + {#3} + } + { __hook#1~#2 } + } +\cs_new_protected:Npn \__hook_code_gset_auxi:nnnn #1 #2 #3 #4 + { \cs_gset:cpn {#4} #1 { #2 #3 } } +\cs_generate_variant:Nn \__hook_code_gset_auxi:nnnn { eeen } +\cs_new_protected:Npn \__hook_code_gset:nn + { \__hook_code_gset_aux:nnn { } } +\cs_new_protected:Npn \__hook_toplevel_gset:nn + { \__hook_code_gset_aux:nnn { _toplevel } } +\cs_new_protected:Npn \__hook_next_gset:nn + { \__hook_code_gset_aux:nnn { _next } } +\cs_new_protected:Npn \__hook_code_gset_aux:nnn #1 #2 #3 + { + \cs_gset:cpn { __hook#1~#2 \exp_last_unbraced:Ne } + { \__hook_parameter:n {#2} } + {#3} + } +\cs_generate_variant:Nn \__hook_code_gset:nn { ne } +\cs_new_protected:Npn \__hook_normalise_cs_args:nn #1 #2 + { + \cs_if_exist:cT { __hook#1~#2 } + { + \__hook_code_gset_auxi:eeen + { \tl_use:c { c__hook_#2_parameter_tl } } + { + \exp_args:NNo \exp_args:No \__hook_double_hashes:n + { + \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: + { \__hook_braced_cs_parameter:n { __hook#1~#2 } } + } + } + { } + { __hook#1~#2 } + } + } +\cs_new_protected:Npn \__hook_normalise_code_pool:n #1 + { + \__hook_set_normalise_fn:nn {#1} { Offending~label:~'##1' } + \prop_clear:N \l__hook_work_prop + \prop_map_function:cN { g__hook_#1_code_prop } \__hook_normalise_fn:nn + \prop_gset_eq:cN { g__hook_#1_code_prop } \l__hook_work_prop + } +\cs_new_protected:Npn \__hook_set_normalise_fn:nn #1 #2 + { + \cs_set:Npn \__hook_tmp:w ##1##2##3##4##5##6##7##8##9 { } + \tl_set:Ne \l__hook_tmpb_tl + { \__hook_braced_cs_parameter:n { __hook_tmp:w } } + \group_begin: + \__hook_tl_set:cn { c__hook_hash_tl } { \exp_not:N \c__hook_hashes_tl } + \use:e + { + \group_end: + \tl_set:Nn \exp_not:N \l__hook_tmpb_tl { \l__hook_tmpb_tl } + } + \exp_last_unbraced:NNf + \cs_set:Npn \__hook_tmp:w { \__hook_parameter:n {#1} } { } + \tl_set:Ne \l__hook_tmpa_tl { \__hook_braced_cs_parameter:n { __hook_tmp:w } } + \cs_gset_protected:Npx \__hook_normalise_fn:nn ##1 ##2 + { + \group_begin: + \int_set:Nn \tex_escapechar:D { -1 } + \cs_set:cpn + { + hook~'#1'. ^^J + (hooks) \prg_replicate:nn { 13 } { ~ } + #2 % more message text + } + \exp_not:v { c__hook_#1_parameter_tl } + {##2} + \group_end: + \cs_set:Npn \exp_not:N \__hook_tmp:w + \exp_not:V \c__hook_nine_parameters_tl + { + \prop_put:Nne \exp_not:N \l__hook_work_prop + {##1} { \exp_not:N \__hook_double_hashes:n {##2} } + } + \exp_not:N \__hook_tmp:w + \exp_not:V \l__hook_tmpa_tl + \exp_args:No \exp_not:o + { \exp_after:wN \__hook_tmp:w \l__hook_tmpb_tl } + } + } +\cs_new_eq:NN \__hook_normalise_fn:nn ? +\prg_new_conditional:Npnn \__hook_cs_if_empty:c #1 { p, T, F, TF } + { + \if:w \scan_stop: \__hook_replacement_spec:c {#1} \scan_stop: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_new:Npn \__hook_replacement_spec:c #1 + { + \exp_args:Nc \token_if_macro:NT {#1} + { \cs_replacement_spec:c {#1} } + } +\cs_new:Npn \__hook_braced_cs_parameter:n #1 + { + \exp_last_unbraced:Ne \__hook_braced_hidden_loop:w + { \exp_args:Nc \__hook_cs_parameter_count:N {#1} } ? \s__hook_mark + } +\cs_new:Npn \__hook_braced_hidden_loop:w #1 + { + \if:w ? #1 + \__hook_use_i_delimit_by_s_mark:nw + \fi: + { \exp_not:N \c__hook_hash_tl #1 } + \__hook_braced_hidden_loop:w + } +\cs_new:Npn \__hook_cs_parameter_count:N #1 + { + \exp_last_unbraced:Nf \__hook_cs_parameter_count:w + { \token_if_macro:NT #1 { \cs_parameter_spec:N #1 } } + ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w + ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w + ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w + \s__hook_mark + } +\cs_new:Npn \__hook_cs_parameter_count:w #1#2 #3#4 #5#6 #7#8 + { #2 #4 #6 #8 \__hook_cs_parameter_count:w } +\cs_new:Npn \__hook_cs_end:w #1 \s__hook_mark { } +\cs_new:Npn \__hook_braced_parameter:n #1 + { + \if_case:w + \int_eval:n + { \exp_args:Nv \str_count:n { c__hook_#1_parameter_tl } / 3 } + \exp_stop_f: + \or: {##1} + \or: {##1} {##2} + \or: {##1} {##2} {##3} + \or: {##1} {##2} {##3} {##4} + \or: {##1} {##2} {##3} {##4} {##5} + \or: {##1} {##2} {##3} {##4} {##5} {##6} + \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} + \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} + \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} {##9} + \else: + \msg_expandable_error:nnn { latex2e } { should-not-happen } + { Invalid~parameter~spec. } + \fi: + } +\cs_new:Npn \__hook_parameter:n #1 + { + \cs:w c__hook_ + \tl_if_exist:cTF { c__hook_#1_parameter_tl } + { #1_parameter } { empty } + _tl \cs_end: + } +\cs_new:Npn \__hook_generic_parameter:n #1 + { \__hook_generic_parameter:w #1 / / / \s__hook_mark } +\cs_new:Npn \__hook_generic_parameter:w #1 / #2 / #3 / #4 \s__hook_mark + { + \cs_if_exist_use:cF { c__hook_parameter_#1/./#3_tl } + { \c__hook_empty_tl } + } +\prop_new:c { g__hook_??_code_prop } +\prop_new:c { __hook~?? } +\tl_new:c { g__hook_??_reversed_tl } +\tl_const:cn { c__hook_??_parameter_tl } { } \cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4 { \__hook_normalize_hook_rule_args:Nnnnn \__hook_gset_rule:nnnn @@ -5011,13 +5391,13 @@ \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1} {#2} {#3} {#4} - \__hook_clean_to_scan:w + \__hook_use_none_delimit_by_s_mark:w } \__hook_if_execute_immediately:nT {#1} { \msg_error:nnnnnn { hooks } { rule-too-late } {#1} {#2} {#3} {#4} - \__hook_clean_to_scan:w + \__hook_use_none_delimit_by_s_mark:w } \__hook_init_structure:n {#1} \__hook_rule_gclear:nnn {#1} {#2} {#4} @@ -5082,23 +5462,29 @@ \cs_end: } \cs_new_eq:NN \__hook_update_hook_code:n \use_none:n -\cs_new_protected:Npn \__hook_initialize_all: { - \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n - \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } - \seq_map_inline:Nn \g__hook_all_seq +\cs_new_protected:Npn \__hook_initialize_all: + { + \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n + \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } + \seq_map_inline:Nn \g__hook_all_seq { + \tl_if_empty:cTF { c__hook_##1_parameter_tl } + { \__hook_replacing_args_false: } + { \__hook_replacing_args_true: } \__hook_update_hook_code:n {##1} + \__hook_replacing_args_reset: } - \__hook_debug:n - { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:} - \prop_map_inline:Nn \g__hook_used_prop - { \iow_term:x{^^J~ ##1~ ->~ - \exp_not:v {__hook~##1}~ } - } - } - \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n - \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n -} + \__hook_debug:n + { + \iow_term:x { ^^J All~initialized~(non-empty)~hooks: } + \prop_map_inline:Nn \g__hook_used_prop + { + \iow_term:x + { ^^J ~ ##1 ~ -> ~ \cs_replacement_spec:c { __hook~##1 } ~ } + } + } + \__hook_post_initialization_defs: + } \cs_new_protected:Npn \__hook_initialize_hook_code:n #1 { \__hook_debug:n @@ -5108,10 +5494,10 @@ { \prop_if_empty:cTF { g__hook_#1_code_prop } { - \__hook_tl_gset:co { __hook~#1 } + \__hook_code_gset:ne {#1} { - \cs:w __hook_toplevel~#1 \exp_after:wN \cs_end: - \cs:w __hook_next~#1 \cs_end: + \exp_not:c { __hook_toplevel~#1 } \__hook_braced_parameter:n {#1} + \exp_not:c { __hook_next~#1 } \__hook_braced_parameter:n {#1} } } { @@ -5202,8 +5588,15 @@ \__hook_debug_label_data:N \l__hook_work_prop \iow_term:x{====================} } - \exp_args:NNo \__hook_tl_gput:Nn #1 { \cs:w __hook_toplevel~#3 \cs_end: } - \__hook_tl_gput_right:No #1 { \cs:w __hook_next~#3 \cs_end: } + \exp_args:NNe \__hook_tl_gput:Nn #1 + { \exp_not:c { __hook_toplevel~#3 } \__hook_braced_parameter:n {#3} } + \__hook_tl_gput_right:Ne #1 + { \exp_not:c { __hook_next~#3 } \__hook_braced_parameter:n {#3} } + \use:e + { + \cs_gset:cpn { __hook~#3 } \use:c { c__hook_#3_parameter_tl } + { \exp_not:V #1 } + } } \cs_generate_variant:Nn \__hook_initialize_single:NNn { cc } \cs_new:Npn \__hook_tl_gput:Nn { \ERROR } @@ -5330,7 +5723,20 @@ } \__hook_preamble_hook:n {#1} \__hook_log_cmd:x - { ^^J ->~The~ \__hook_if_generic:nT {#1} { generic~ } hook~'#1': } + { + ^^J ->~The~ + \__hook_if_generic:nT {#1} { generic~ } + hook~'#1' + \__hook_if_disabled:nF {#1} + { + \exp_args:Nf \__hook_print_args:nn {#1} + { + \int_eval:n + { \str_count:e { \__hook_parameter:n {#1} } / 3 } + } + } + : + } \__hook_if_usable:nF {#1} { \__hook_log_line:x { The~hook~is~not~declared. } } \__hook_if_disabled:nT {#1} @@ -5343,7 +5749,12 @@ { \__hook_log_line_indent:x { --- } } { \prop_map_inline:cn { g__hook_#1_code_prop } - { \__hook_log_line_indent:x { ##1~->~\tl_to_str:n {##2} } } + { + \exp_after:wN \cs_set:Npn \exp_after:wN \__hook_tmp:w + \c__hook_nine_parameters_tl {##2} + \__hook_log_line_indent:x + { ##1~->~\cs_replacement_spec:N \__hook_tmp:w } + } } \__hook_log_line:x { @@ -5353,16 +5764,19 @@ } \__hook_log_line_indent:x { - \tl_if_empty:cTF { __hook_toplevel~#1 } + \__hook_cs_if_empty:cTF { __hook_toplevel~#1 } { --- } - { -> ~ \exp_args:Nv \tl_to_str:n { __hook_toplevel~#1 } } + { -> ~ \cs_replacement_spec:c { __hook_toplevel~#1 } } } \__hook_log_line:x { Extra~code~for~next~invocation: } \__hook_log_line_indent:x { - \tl_if_empty:cTF { __hook_next~#1 } + \__hook_cs_if_empty:cTF { __hook_next~#1 } { --- } - { ->~ \exp_args:Nv \__hook_log_next_code:n { __hook_next~#1 } } + { + -> ~ \exp_last_unbraced:Nf \__hook_log_next_code:w + { \cs_replacement_spec:c { __hook_next~#1 } } + } } \__hook_log_line:x { Rules: } \bool_set_true:N \l__hook_tmpa_bool @@ -5397,7 +5811,7 @@ \@spaces \clist_if_empty:cTF { g__hook_#1_labels_clist } { --- } - { \clist_use:cn {g__hook_#1_labels_clist} { ,~ } } + { \clist_use:cn { g__hook_#1_labels_clist } { ,~ } } } } { @@ -5411,8 +5825,19 @@ } } } -\cs_new:Npn \__hook_log_next_code:n #1 - { \exp_args:No \tl_to_str:n { \use_none:nn #1 } } +\exp_last_unbraced:NNNNo +\cs_new:Npn \__hook_log_next_code:w #1 \c_right_brace_str { } +\cs_new:Npn \__hook_print_args:nn #1 #2 + { + \int_compare:nNnT {#2} > { 0 } + { + \__hook_if_declared:nT {#1} { \use_none:nnn } + \__hook_if_cmd_hook:nT {#1} + { \use_i:nnn { ~ (unknown ~ } } + \use:n { ~ (#2 ~ } + argument \int_compare:nNnT {#2} > { 1 } { s } ) + } + } \cs_new_protected:Npn \__hook_list_rules:nn #1 #2 { \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2} @@ -5458,105 +5883,147 @@ } \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } } } -\cs_new_protected:Npn \hook_gput_next_code:nn #1 - { \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} } +\cs_new_protected:Npn \hook_gput_next_code:nn #1 #2 + { + \__hook_replacing_args_false: + \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} {#2} + \__hook_replacing_args_reset: + } +\cs_new_protected:Npn \hook_gput_next_code_with_args:nn #1 #2 + { + \__hook_replacing_args_true: + \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} {#2} + \__hook_replacing_args_reset: + } \cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2 { \__hook_if_disabled:nTF {#1} { \msg_error:nnn { hooks } { hook-disabled } {#1} } { \__hook_if_structure_exist:nTF {#1} - { \__hook_gput_next_do:nn {#1} {#2} } - { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} } + { \__hook_gput_next_do:nn } + { \__hook_try_declaring_generic_next_hook:nn } + {#1} {#2} } } \cs_new_protected:Npn \__hook_gput_next_do:nn #1 { - \exp_args:Nc \__hook_gput_next_do:Nnn - { __hook_next~#1 } {#1} - } -\cs_new_protected:Npn \__hook_gput_next_do:Nnn #1 #2 - { - \tl_if_empty:cT { __hook~#2 } - { \__hook_update_hook_code:n {#2} } - \tl_if_empty:NT #1 - { \__hook_tl_gset:Nn #1 { \__hook_clear_next:n {#2} } } - \__hook_tl_gput_right:Nn #1 + \__hook_init_structure:n {#1} + \__hook_chk_args_allowed:nn {#1} { AddToHookNext } + \__hook_cs_if_empty:cT { __hook~#1 } + { \__hook_update_hook_code:n {#1} } + \__hook_cs_if_empty:cT { __hook_next~#1 } + { \__hook_next_gset:nn {#1} { \__hook_clear_next:n {#1} } } + \__hook_cs_gput_right:nnn { _next } {#1} } \cs_new_protected:Npn \hook_gclear_next_code:n #1 { \__hook_normalize_hook_args:Nn \__hook_clear_next:n {#1} } \cs_new_protected:Npn \__hook_clear_next:n #1 - { \cs_gset_eq:cN { __hook_next~#1 } \c_empty_tl } + { \__hook_next_gset:nn {#1} { } } \cs_new_protected:Npn \hook_use:n #1 { - \tl_if_exist:cT { __hook~#1 } - { - \__hook_preamble_hook:n {#1} - \cs:w __hook~#1 \cs_end: - } + \__hook_preamble_hook:n {#1} + \__hook_use_initialized:n {#1} } \cs_new:Npn \__hook_use_initialized:n #1 { \if_cs_exist:w __hook~#1 \cs_end: - \cs:w __hook~#1 \exp_after:wN \cs_end: + \cs:w __hook~#1 \use_i:nn \fi: + \use_none:n + \cs_end: } \cs_new_protected:Npn \__hook_preamble_hook:n #1 - { \__hook_initialize_hook_code:n {#1} } + { + \if_cs_exist:w __hook~#1 \cs_end: + \__hook_initialize_hook_code:n {#1} + \fi: + } +\cs_new_protected:Npn \hook_use:nnw #1 + { + \__hook_preamble_hook:n {#1} + \__hook_use_initialized:nnw {#1} + } +\cs_new:Npn \__hook_use_initialized:nnw #1 #2 + { + \cs:w + \if_cs_exist:w __hook~#1 \cs_end: + __hook~#1 + \else: + use_none: \prg_replicate:nn {#2} { n } + \fi: + \cs_end: + } +\cs_new_protected:Npn \__hook_post_initialization_defs: + { + \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n + \cs_gset_eq:NN \hook_use:nnw \__hook_use_initialized:nnw + \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n + \cs_gset_eq:NN \__hook_post_initialization_defs: \prg_do_nothing: + } \cs_new_protected:Npn \hook_use_once:n #1 { \__hook_if_execute_immediately:nF {#1} - { \__hook_normalize_hook_args:Nn \__hook_use_once:n { \use:n {#1} } } + { \__hook_normalize_hook_args:Nn \__hook_use_once:nn { \use:n {#1} } { 0 } } + } +\cs_new_protected:Npn \hook_use_once:nnw #1 #2 + { + \__hook_if_execute_immediately:nF {#1} + { \__hook_normalize_hook_args:Nn \__hook_use_once:nn { \use:n {#1} } {#2} } } -\cs_new_protected:Npn \__hook_use_once:n #1 +\cs_new_protected:Npn \__hook_use_once:nn #1 #2 { \__hook_preamble_hook:n {#1} \__hook_use_once_set:n {#1} - \__hook_use_initialized:n {#1} - \__hook_use_once_clear:n {#1} + \__hook_replacing_args_false: + \__hook_cs_gput_right:nnn { _next } {#1} { \__hook_use_once_clear:n {#1} } + \__hook_replacing_args_reset: + \__hook_if_usable:nTF {#1} + { \__hook_use_initialized:n {#1} } + { + \int_compare:nNnT {#2} > { 0 } + { \use:c { use_none: \prg_replicate:nn {#2} { n } } } + } } \cs_new_protected:Npn \__hook_use_once_set:n #1 { \__hook_tl_gset:cn { g__hook_#1_reversed_tl } { I } } \cs_new_protected:Npn \__hook_use_once_clear:n #1 { - \__hook_tl_gclear:c { __hook~#1 } - \__hook_tl_gclear:c { __hook_next~#1 } - \__hook_tl_gclear:c { __hook_toplevel~#1 } + \__hook_code_gset:nn {#1} { } + \__hook_next_gset:nn {#1} { } + \__hook_toplevel_gset:nn {#1} { } \prop_gclear_new:c { g__hook_#1_code_prop } } \prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF } { - \__hook_if_usable:nTF {#1} - { - \exp_after:wN \__hook_clean_to_scan:w - \if:w I \cs:w g__hook_#1_reversed_tl \cs_end: - \s__hook_mark \prg_return_true: - \else: - \s__hook_mark \prg_return_false: + \exp_after:wN \__hook_use_none_delimit_by_s_mark:w + \if:w I + \if_cs_exist:w g__hook_#1_reversed_tl \cs_end: + \cs:w g__hook_#1_reversed_tl \exp_after:wN \cs_end: \fi: - } - { \prg_return_false: } + X + \s__hook_mark \prg_return_true: + \else: + \s__hook_mark \prg_return_false: + \fi: } - \prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } { - \__hook_if_structure_exist:nTF {#1} - { - \bool_lazy_and:nnTF - { \prop_if_empty_p:c { g__hook_#1_code_prop } } - { - \bool_lazy_and_p:nn - { \tl_if_empty_p:c { __hook_toplevel~#1 } } - { \tl_if_empty_p:c { __hook_next~#1 } } - } - { \prg_return_true: } - { \prg_return_false: } - } - { \prg_return_true: } + \if:w + T + \prop_if_exist:cT { g__hook_#1_code_prop } + { \prop_if_empty:cF { g__hook_#1_code_prop } { F } } + \__hook_cs_if_empty:cF { __hook_toplevel~#1 } { F } + \__hook_cs_if_empty:cF { __hook_next~#1 } { F } + T + \prg_return_true: + \else: + \prg_return_false: + \fi: } \prg_new_conditional:Npnn \__hook_if_usable:n #1 { p , T , F , TF } { - \tl_if_exist:cTF { __hook~#1 } + \cs_if_exist:cTF { __hook~#1 } { \prg_return_true: } { \prg_return_false: } } @@ -5574,7 +6041,7 @@ } \prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF } { - \exp_after:wN \__hook_clean_to_scan:w + \exp_after:wN \__hook_use_none_delimit_by_s_mark:w \if:w - \cs:w g__hook_#1_reversed_tl \cs_end: \s__hook_mark \prg_return_true: \else: @@ -5601,6 +6068,19 @@ } { \prg_return_false: } } +\prg_new_conditional:Npnn \__hook_if_cmd_hook:n #1 { T } + { \__hook_if_cmd_hook:w #1 / / / \s__hook_mark } +\cs_new:Npn \__hook_if_cmd_hook:w #1 / #2 / #3 / #4 \s__hook_mark + { + \if:w Y + \str_if_eq:nnF {#1} { cmd } { N } + \tl_if_exist:cF { c__hook_generic_#1/./#3_tl } { N } + Y + \prg_return_true: + \else: + \prg_return_false: + \fi: + } \prg_new_conditional:Npnn \__hook_if_generic_reversed:n #1 { T } { \__hook_if_generic_reversed:w #1 / / / \scan_stop: } \cs_new:Npn \__hook_if_generic_reversed:w #1 / #2 / #3 / #4 \scan_stop: @@ -5611,6 +6091,31 @@ \prg_return_false: \fi: } +\seq_new:N \g__hook_replacing_stack_seq +\cs_new:Npn \__hook_misused_if_replacing_args:nn #1 #2 + { + \msg_expandable_error:nnn { latex2e } { should-not-happen } + { Misused~\__hook_if_replacing_args:. } + } +\cs_new:Npn \__hook_if_replacing_args:TF + { \__hook_misused_if_replacing_args:nn } +\cs_new_protected:Npn \__hook_replacing_args_true: + { + \seq_gpush:No \g__hook_replacing_stack_seq + { \__hook_if_replacing_args:TF } + \cs_set:Npn \__hook_if_replacing_args:TF { \use_i:nn } + } +\cs_new_protected:Npn \__hook_replacing_args_false: + { + \seq_gpush:No \g__hook_replacing_stack_seq + { \__hook_if_replacing_args:TF } + \cs_set:Npn \__hook_if_replacing_args:TF { \use_ii:nn } + } +\cs_new_protected:Npn \__hook_replacing_args_reset: + { + \seq_gpop:NN \g__hook_replacing_stack_seq \l__hook_return_tl + \cs_gset_eq:NN \__hook_if_replacing_args:TF \l__hook_return_tl + } \prop_gput:Nnn \g_msg_module_type_prop { hooks } { LaTeX } \prop_gput:Nnn \g_msg_module_type_prop { latex2e } { LaTeX } \prop_gput:Nnn \g_msg_module_name_prop { latex2e } { kernel } @@ -5629,6 +6134,32 @@ { There~ already~ exists~ a~ hook~ declaration~ with~ this~ name.\\ Please~ use~ a~ different~ name~ for~ your~ hook.} +\msg_new:nnnn { hooks } { too-many-args } + { Too~many~arguments~for~hook~'#1'. } + { + You~tried~to~declare~a~hook~with~#2~arguments,~but~a~ + hook~can~only~have~up~to~nine.~LaTeX~will~define~this~ + hook~with~nine~arguments. + } +\msg_new:nnnn { hooks } { without-args } + { Hook~'#1'~has~no~arguments. } + { + You~tried~to~use~\iow_char:N\\#2WithArguments~ + on~a~hook~that~takes~no~arguments.\\ + Check~the~usage~of~the~hook~or~use~\iow_char:N\\#2~instead.\\ + \\ + LaTeX~will~use~\iow_char:N\\#2. + } +\msg_new:nnnn { hooks } { one-time-args } + { You~can't~have~arguments~in~used~one-time~hook~'#1'. } + { + You~tried~to~use~\iow_char:N\\#2WithArguments~ + on~a~one-time~hook~that~has~already~been~used.~ + You~have~to~add~the~code~before~the~hook~is~used,~ + or~add~the~code~without~arguments~using~\iow_char:N\\#2~instead.\\ + \\ + LaTeX~will~use~\iow_char:N\\#2. + } \msg_new:nnnn { hooks } { hook-disabled } { Cannot~add~code~to~disabled~hook~'#1'. } { @@ -5723,15 +6254,30 @@ Generic~hook~'#1/#2/#3'~is~deprecated. \\ Use~hook~'#1/#3/#2'~instead. } -\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} } -\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} } -\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} } -\NewDocumentCommand \ActivateGenericHook { m }{ \hook_activate_generic:n {#1} } -\NewDocumentCommand \DisableGenericHook { m }{ \hook_disable_generic:n {#1} } +\NewDocumentCommand \NewHook { m } + { \hook_new:n {#1} } +\NewDocumentCommand \NewReversedHook { m } + { \hook_new_reversed:n {#1} } +\NewDocumentCommand \NewMirroredHookPair { mm } + { \hook_new_pair:nn {#1}{#2} } +\NewDocumentCommand \NewHookWithArguments { mm } + { \hook_new_with_args:nn {#1} {#2} } +\NewDocumentCommand \NewReversedHookWithArguments { mm } + { \hook_new_reversed_with_args:nn {#1} {#2} } +\NewDocumentCommand \NewMirroredHookPairWithArguments { mmm } + { \hook_new_pair_with_args:nnn {#1} {#2} {#3} } +\NewDocumentCommand \ActivateGenericHook { m } + { \hook_activate_generic:n {#1} } +\NewDocumentCommand \DisableGenericHook { m } + { \hook_disable_generic:n {#1} } \NewDocumentCommand \AddToHook { m o +m } { \hook_gput_code:nnn {#1} {#2} {#3} } +\NewDocumentCommand \AddToHookWithArguments { m o +m } + { \hook_gput_code_with_args:nnn {#1} {#2} {#3} } \NewDocumentCommand \AddToHookNext { m +m } { \hook_gput_next_code:nn {#1} {#2} } +\NewDocumentCommand \AddToHookNextWithArguments { m +m } + { \hook_gput_next_code_with_args:nn {#1} {#2} } \NewDocumentCommand \ClearHookNext { m } { \hook_gclear_next_code:n {#1} } \NewDocumentCommand \RemoveFromHook { m o } @@ -5750,6 +6296,8 @@ } \cs_new:Npn \UseHook { \hook_use:n } \cs_new:Npn \UseOneTimeHook { \hook_use_once:n } +\cs_new:Npn \UseHookWithArguments { \hook_use:nnw } +\cs_new:Npn \UseOneTimeHookWithArguments { \hook_use_once:nnw } \cs_new_protected:Npn \ShowHook { \hook_show:n } \cs_new_protected:Npn \LogHook { \hook_log:n } \cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: } @@ -5839,18 +6387,20 @@ \__hook_curr_name_pop: \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% File: ltcmdhooks.dtx (C) Copyright 2020-2021 -%% Frank Mittelbach, Phelype Oleinik, LaTeX Team +%% File: ltcmdhooks.dtx +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, Phelype Oleinik, The LaTeX Project %%% From File: ltcmdhooks.dtx -\def\ltcmdhooksversion{v1.0f} -\def\ltcmdhooksdate{2021/10/20} +\def\ltcmdhooksversion{v1.0h} +\def\ltcmdhooksdate{2023/05/21} \ExplSyntaxOn \tl_new:N \g_hook_patch_action_list_tl \int_new:N \l__hook_patch_num_args_int \tl_new:N \l__hook_patch_prefixes_tl \tl_new:N \l__hook_param_text_tl \tl_new:N \l__hook_replace_text_tl -\tl_const:Nn \c__hook_hash_tl { # # } +\tl_const:Nn \c__hook_hash_tl { # } +\tl_const:Nn \c__hook_hashes_tl { # # } \cs_new_eq:NN \__hook_exp_not:NN ? \cs_new_eq:NN \__hook_def_cmd:w ? \quark_new:N \q__hook_recursion_tail @@ -5998,10 +6548,10 @@ ##1 \l__hook_replace_text_tl { \__hook_exp_not:n {##2} } } \bool_if:NTF #1 - { \__hook_tmp:w \tl_set:Nx { [ \c__hook_hash_tl 1 ] } } - { \__hook_tmp:w \tl_set:Nx { { \c__hook_hash_tl 1 } } } + { \__hook_tmp:w \tl_set:Nx { [ \c__hook_hashes_tl 1 ] } } + { \__hook_tmp:w \tl_set:Nx { { \c__hook_hashes_tl 1 } } } \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } - { \__hook_tmp:w \tl_put_right:Nx { { \c__hook_hash_tl ##1 } } } + { \__hook_tmp:w \tl_put_right:Nx { { \c__hook_hashes_tl ##1 } } } \tl_set:Nx \l__hook_replace_text_tl { \exp_not:N #2 \exp_not:V \l__hook_replace_text_tl } \tl_set:Nx \l__hook_replace_text_tl @@ -6028,16 +6578,24 @@ \tl_set:Nx \exp_not:N \l__hook_patch_prefixes_tl { \exp_not:N \__hook_make_prefixes:w \cs_prefix_spec:N #2 / / } } - \use:x + \__hook_disable:n { cmd / #3 / #4 } + \cs_undefine:c { c__hook_cmd / #3 / #4_parameter_tl } + \__hook_make_usable:nn { cmd / #3 / #4 } { \l__hook_patch_num_args_int } + \use:e { \__hook_redefine_with_hooks:Nnnn \exp_not:N #2 \str_if_eq:nnTF {#4} { after } { \use_ii_i:nn } { \use:nn } - { { \__hook_exp_not:NN \exp_not:N \UseHook { cmd / #3 / #4 } } } + { { + \__hook_exp_not:NN \exp_not:N \UseHookWithArguments + { cmd / #3 / #4 } { \int_use:N \l__hook_patch_num_args_int } + \__hook_braced_parameter:n { cmd / #3 / #4 } + } } { { } } { \__hook_exp_not:NN \exp_not:V \l__hook_replace_text_tl } } + \__hook_update_hook_code:n { cmd / #3 / #4 } } \cs_new_protected:Npn \__hook_redefine_with_hooks:Nnnn #1 #2 #3 #4 { @@ -6086,7 +6644,11 @@ \if_meaning:w \q__hook_recursion_tail #1 \__hook_double_hashes_stop:w \fi: - \if_meaning:w \c__hook_hash_tl #1 + \if:w ? + \if_meaning:w \c__hook_hash_tl #1 ! \fi: + \if_meaning:w \c__hook_hashes_tl #1 ! \fi: + ? + \else: \use_i:nnnn \fi: \use:n @@ -6108,10 +6670,10 @@ { ~ \__hook_double_hashes:w } \cs_new_protected:Npn \__hook_retokenize_patch:Nnn #1 #2 #3 { - \__hook_patch_debug:x { ..~command~can~only~be~patched~by~rescanning } \str_if_eq:eeTF { \cs_argument_spec:N #1 } { } { \__hook_patch_expand_redefine:NNnn \c_false_bool #1 {#2} {#3} } { + \__hook_patch_debug:x { ..~command~can~only~be~patched~by~rescanning } \tl_set:Nx \l__hook_tmpa_tl { \int_compare:nNnTF { \char_value_catcode:n {`\@ } } = { 12 } @@ -6149,7 +6711,7 @@ { \__hook_patch_debug:x { ++~macro~can~be~retokenized~cleanly } \__hook_patch_debug:x { ==~retokenizing~macro~now } - \__hook_patch_retokenize:Nnnn #1 {#2} {#3} {#4} + \__hook_patch_retokenize:Nnnn #1 { cmd / #2 / #3 } {#3} {#4} \use_i_delimit_by_q_recursion_stop:nw \use_none:n } { @@ -6184,8 +6746,41 @@ { \prg_return_true: } { \prg_return_false: } } +\cs_new_protected:Npn \__hook_guess_arg_count:NN #1 + { + \exp_after:wN \__hook_guess_arg_count:wN + \token_to_meaning:N #1 \s__hook_mark + } +\exp_last_unbraced:NNNNo +\cs_new_protected:Npx \__hook_guess_arg_count:wN + #1 { \tl_to_str:n { macro: } } #2 \s__hook_mark #3 + { + \int_set:Nn #3 + { + \exp_not:N \__hook_guess_arg_count:nw { 0 } #2 + \c_hash_str 0 \s__hook_mark + } + } +\use:e + { \cs_new:Npn \exp_not:N \__hook_guess_arg_count:nw #1 #2 \c_hash_str #3 } + { + \int_compare:nNnTF { #1 + 1 } = {#3} + { \__hook_guess_arg_count:nw {#3} } + { #1 \__hook_use_none_delimit_by_s_mark:w } + } \cs_new_protected:Npn \__hook_patch_retokenize:Nnnn #1 #2 #3 #4 { + \__hook_guess_arg_count:NN #1 \l__hook_patch_num_args_int + \__hook_disable:n {#2} + \cs_undefine:c { c__hook_#2_parameter_tl } + \__hook_make_usable:nn {#2} { \l__hook_patch_num_args_int } + \tl_set:Ne \l__hook_tmpa_tl + { \exp_args:Ne \tl_to_str:n { \__hook_braced_parameter:n {#2} } } + \use:x + { + \str_replace_all:Nnn \exp_not:N \l__hook_tmpa_tl + { #### } { \c_hash_str } + } \cs_set_eq:NN \kerneltmpDoNotUse \scan_stop: \cs_set_eq:NN \__hook_tmp:w \scan_stop: \use:x @@ -6196,10 +6791,18 @@ ####1 \def \kerneltmpDoNotUse ####2 { \str_if_eq:nnT {#3} { before } - { \token_to_str:N \UseHook { cmd / #2 / #3 } } + { + \token_to_str:N \UseHookWithArguments {#2} + { \int_use:N \l__hook_patch_num_args_int } + \l__hook_tmpa_tl + } ####3 \str_if_eq:nnT {#3} { after } - { \token_to_str:N \UseHook { cmd / #2 / #3 } } + { + \token_to_str:N \UseHookWithArguments {#2} + { \int_use:N \l__hook_patch_num_args_int } + \l__hook_tmpa_tl + } } } \tl_set:Nx \exp_not:N \l__hook_tmpa_tl @@ -6207,6 +6810,7 @@ } \tl_rescan:nV { #4 \__hook_patch_required_catcodes: } \l__hook_tmpa_tl \cs_gset_eq:NN #1 \kerneltmpDoNotUse + \__hook_update_hook_code:n {#2} } \msg_new:nnnn { hooks } { cant-patch } { @@ -6544,10 +7148,12 @@ Type H for immediate help.}% \def\@setpar#1{\def\par{#1}\def\@par{#1}} \def\@par{\let\par\@@par\par} \def\@restorepar{\def\par{\@par}} -%% File: ltpara.dtx (C) Copyright 2020-2021 +%% File: ltpara.dtx +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, The LaTeX Project %%% From File: ltpara.dtx -\def\ltparaversion{v1.0k} -\def\ltparadate{2022/05/13} +\def\ltparaversion{v1.0l} +\def\ltparadate{2023/01/30} \ExplSyntaxOn @@ -6568,7 +7174,8 @@ Type H for immediate help.}% \hook_use:n {para/before} \group_begin: \tex_everypar:D {} - \skip_zero:N \tex_parskip:D + \skip_set:Nn \tex_parskip:D + { \if@minipage -\tex_parskip:D \else: \c_zero_skip \fi: } \tex_noindent:D \group_end: \tex_everypar:D{\g__para_standard_everypar_tl} @@ -6672,7 +7279,9 @@ Type H for immediate help.}% \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% File: ltmeta.dtx (C) Copyright 2021, 2022 +%% File: ltmeta.dtx +%% Copyright (C) 2021-2023 +%% Frank Mittelbach, The LaTeX Project %%% From File: ltmeta.dtx \def\ltmetaversion{v1.0b} \def\ltmetadate{2022/05/18} @@ -6710,6 +7319,7 @@ Type H for immediate help.}% \DeclareRobustCommand\linebreak{\@testopt{\@no@lnbk-}4} \DeclareRobustCommand\nolinebreak{\@testopt\@no@lnbk4} \DeclareRobustCommand\samepage{\interlinepenalty\@M + \predisplaypenalty\@M \postdisplaypenalty\@M \interdisplaylinepenalty\@M \@beginparpenalty\@M @@ -7015,6 +7625,7 @@ Type H for immediate help.}% \global\let\do\noexpand \UseOneTimeHook{begindocument/end}% \ignorespaces} +\let\do\noexpand \NewHook{begindocument} \NewHook{begindocument/before} \NewHook{begindocument/end} @@ -7159,21 +7770,24 @@ Type H for immediate help.}% \set@curr@file{#1}% \expandafter\IfFileExists@\expandafter{\@curr@file}} \long\def \IfFileExists@#1#2#3{% - \openin\@inputcheck"#1" % - \ifeof\@inputcheck - \ifx\input@path\@undefined - \let\reserved@a\@secondoftwo + \edef\@filef@und{\IfFileExists@@{#1}}% + \ifx\@filef@und\@empty + \if\relax\detokenize{#1}\relax + \let\reserved@a\@firstoftwo + \def\@filef@und{".tex" }% \else - \def\reserved@a{\@iffileonpath{#1}}% + \let\reserved@a\@secondoftwo \fi \else - \closein\@inputcheck - \edef\@filef@und{"#1" }% \let\reserved@a\@firstoftwo + \edef\@filef@und{"\@filef@und" }% \fi \expandafter\def\expandafter\reserved@a \expandafter{\reserved@a{#2}{#3}}% \reserved@a} +\ExplSyntaxOn +\cs_new_eq:NN \IfFileExists@@ \file_full_name:n +\ExplSyntaxOff \long\def\@iffileonpath#1{% \let\reserved@a\@secondoftwo \expandafter\@tfor\expandafter\reserved@b\expandafter @@ -7923,6 +8537,11 @@ Type H for immediate help.}% {\@nomath\mathversion \expandafter\ifx\csname mv@#1\endcsname\relax \@latex@error{Math version `#1' is not defined}\@eha\else + \ifcsname mv@\math@version @frozen\endcsname + \expandafter\let + \csname mv@\math@version @frozen\expandafter\endcsname + \csname mv@\math@version\endcsname + \fi \edef\math@version{#1}% \gdef\glb@currsize{}% \aftergroup\glb@settings @@ -11168,11 +11787,13 @@ Type H for immediate help.}% \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else - \expandafter#2#1\null + \expandafter#2#1\@empty\@empty\@empty\null \fi} -\def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}} +\long\def\@firstoffive#1#2#3#4#5{#1} +\long\def\@secondoffive#1#2#3#4#5{#2} +\def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}} \def\@kernel@spageref#1{\expandafter\@setref\csname r@#1\endcsname - \@secondoftwo{#1}} + \@secondoffive{#1}} \let\@kernel@ref\@kernel@sref \let\@kernel@pageref\@kernel@spageref \NewDocumentCommand\ref{s} @@ -11193,9 +11814,17 @@ Type H for immediate help.}% \def\newlabel{\@newl@bel r} \@onlypreamble\@newl@bel \let \@multiplelabels \relax +\providecommand\@currentlabelname{} +\providecommand\@currentHref{} +\providecommand\@kernel@reserved@label@data{} +\NewHookWithArguments{label}{1} \def\label#1{\@bsphack + \begingroup + \UseHookWithArguments{label}{1}{#1}% \protected@write\@auxout{}% - {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}% + {\string\newlabel{#1}{{\@currentlabel}{\thepage}% + {\@currentlabelname}{\@currentHref}{\@kernel@reserved@label@data}}}% + \endgroup \@esphack} \def\@currentcounter{} \def\refstepcounter#1{\stepcounter{#1}% @@ -11246,6 +11875,13 @@ Type H for immediate help.}% \NewHook{enddocument/end} \AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} \AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} +\AddToHook{enddocument/info}[kernel/release]{% + \let\show@release@info\wlog + \show@release@info{ ***********}% + \the\LaTeXReleaseInfo + \show@release@info{ ***********}} + +\DeclareHookRule{enddocument/info}{kernel/release}{before}{kernel/filelist} \DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings} \def\@enddocument@kernel@warnings{% \ifdim \font@submax >\fontsubfuzz\relax @@ -11751,6 +12387,10 @@ Type H for immediate help.}% \ifx\mathdefaultsmode\@undefined\else \mathdefaultsmode=1 \fi +\let\@kernel@eqno\eqno +\let\@kernel@leqno\leqno +\protected\def\eqno{\@kernel@eqno\aftergroup\ignorespaces} +\protected\def\leqno{\@kernel@leqno\aftergroup\ignorespaces} %%% From File: ltlists.dtx \newskip\topsep \newskip\partopsep @@ -13690,7 +14330,9 @@ Type H for immediate help.}% \def\@cite#1#2{[{#1\if@tempswa , #2\fi}]} \let\@cite@ofmt\hbox \def\@biblabel#1{[#1]} -%% File: ltmarks.dtx (C) Copyright 2022 +%% File: ltmarks.dtx +%% Copyright (C) 2022-2023 +%% Frank Mittelbach, The LaTeX Project %%% From File: ltmarks.dtx \def\ltmarksversion{v1.0d} \def\ltmarksdate{2022/06/01} @@ -14177,6 +14819,7 @@ Type H for immediate help.}% \def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \let\IfPackageAtLeastTF\@ifpackagelater \let\IfClassAtLeastTF\@ifclasslater +\def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} \def\@ifl@ter#1#2{% \expandafter\@ifl@t@r \csname ver@#2.#1\endcsname} @@ -14686,7 +15329,7 @@ Type H for immediate help.}% \csname filec@ntents@\reserved@a\endcsname \else \@latex@error{Unknown filecontents option \reserved@a}% - {Valid options are force (or overwrite), nosearch, noheader}% + {Valid options are force (or overwrite), nosearch, noheader, nowarn}% \fi}% \filec@ntents } @@ -14698,6 +15341,10 @@ Type H for immediate help.}% \def\filec@ntents@where{in current directory}} \let\filec@ntents@checkdir\@empty \def\filec@ntents@where{exists on the system} +\def\filec@ntents@nowarn{% + \let\filec@ntents@warning\@latex@note@no@line +} +\let\filec@ntents@warning\@latex@warning@no@line \begingroup% \@tempcnta=1 \loop @@ -14742,8 +15389,8 @@ Type H for immediate help.}% write to the file you are reading from!\MessageBreak% Data is written to screen instead.}% \else% - \@latex@warning@no@line% - {Writing or overwriting file `\@currdir\@curr@file'}% + \filec@ntents@warning% + {Writing or overwriting file `\@curr@file'}% \immediate\openout\reserved@c\q@curr@file\relax% \fi% \fi% @@ -15216,8 +15863,8 @@ Type H for immediate help.}% { \__keys_options_expand_module:Nn \keys_set:nn {#1} {#2} } \ExplSyntaxOff %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0n} -\providecommand\ltfilehookdate{2022/08/18} +\providecommand\ltfilehookversion{v1.0o} +\providecommand\ltfilehookdate{2023/04/02} \ExplSyntaxOn \tl_new:N \CurrentFile \tl_new:N \CurrentFilePath @@ -15386,7 +16033,7 @@ Type H for immediate help.}% \def\@kernel@make@file@csname#1#2#3{% \xdef#1{\expandafter\@set@curr@file@aux \csname\expandafter#2\@firstofone#3\@nil\endcsname}} -\def\@set@curr@file@aux#1{% +\long\def\@set@curr@file@aux#1{% \expandafter\ifx\csname\endcsname#1% .tex\else\string#1\fi} \def\@filehook@set@CurrentFile{% @@ -15504,12 +16151,12 @@ Type H for immediate help.}% \declare@file@substitution{atveryend.sty}{atveryend-ltx.sty} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%% Copyright (C) 2020-2022 -%% Frank Mittelbach, LaTeX Team +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, The LaTeX Project %% %%% From File: ltshipout.dtx -\providecommand\ltshipoutversion{v1.0m} -\providecommand\ltshipoutdate{2022/08/26} +\providecommand\ltshipoutversion{v1.0n} +\providecommand\ltshipoutdate{2022/11/08} \ExplSyntaxOn \bool_new:N \g__shipout_debug_bool \cs_new_eq:NN \__shipout_debug:n \use_none:n @@ -15623,6 +16270,7 @@ Type H for immediate help.}% \bool_gset_true:N \g__shipout_lastpage_handled_bool } } + \hook_use:n {shipout} \__shipout_finalize_box: \cs_set_eq:NN \protect \exp_not:N \tex_shipout:D \box_use:N \l_shipout_box @@ -15654,6 +16302,7 @@ Type H for immediate help.}% \cs_gset_eq:NN \RawShipout \__shipout_execute_raw: \cs_new_eq:NN \__shipout_saved_protect: \protect \hook_new:n{shipout/before} +\hook_new:n{shipout} \hook_new:n{shipout/after} \hook_new:n{shipout/foreground} \hook_new:n{shipout/background} @@ -17350,6 +17999,17 @@ Type H for immediate help.}% \lccode`\^^[=`\^^[ % oe in OT1 \fi % End of reset block for 8-bit engines \ExplSyntaxOn +\newcommand*\BCPdata[1]{ + \str_case:nn {#1} + { + { language } { en } + { region } { US } + { script } { Latn } + { tag } { en-US } + } +} +\ExplSyntaxOff +\ExplSyntaxOn \keys_define:nn { __kernel } { lang .str_set:N = \reserved@a , @@ -17359,26 +18019,17 @@ Type H for immediate help.}% { \cs_set_nopar:Npn \reserved@a { } \tl_if_blank:nTF {#2} - { \@@text@case@aux@ } - { \keys_set:nn { __kernel } {#2} } - \use:c { text_ #1 case:Vn } \reserved@a {#3} - } -\cs_new_protected:Npn \@@text@case@aux@ { } -\tl_gput_right:Nn \@kernel@after@begindocument - { - \@ifpackageloaded { babel } { - \@ifpackagelater { babel } { 2020-01-15 } + \str_set:Nx \reserved@a + { \BCPdata { casing } } + \str_if_empty:NT \reserved@a { - \cs_gset_protected:Npn \@@text@case@aux@ - { - \str_set:Nx \reserved@a - { \localeinfo* { tag.bcp47 } } - } + \str_set:Nx \reserved@a + { \BCPdata { language } } } - { } } - { } + { \keys_set:nn { __kernel } {#2} } + \use:c { text_ #1 case:Vn } \reserved@a {#3} } \exp_args_generate:n { cnx } \cs_set_protected:Npn \reserved@a #1 @@ -17393,26 +18044,20 @@ Type H for immediate help.}% \reserved@a { Lower } \reserved@a { Title } \cs_new_protected:cpn { MakeLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2 - { - \let \kernel@saved@OE \OE + {{ \let \OE \oe \@@text@case@aux { lower } {#1} {#2} - \let \OE \kernel@saved@OE - } + }} \cs_new_protected:cpn { MakeUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2 - { - \let \kernel@saved@oe \oe + {{ \let \oe \OE \@@text@case@aux { upper } {#1} {#2} - \let \oe \kernel@saved@oe - } + }} \cs_new_protected:cpn { MakeTitlecase \c_space_tl \c_space_tl \c_space_tl } [#1] #2 - { - \let \kernel@saved@oe \oe + {{ \let \oe \OE \@@text@case@aux { title } {#1} {#2} - \let \oe \kernel@saved@oe - } + }} \cs_new_protected_nopar:Npn\AddToNoCaseChangeList {\tl_put_right:Nn \l_text_case_exclude_arg_tl} \AddToNoCaseChangeList{ \NoCaseChange } @@ -17420,6 +18065,27 @@ Type H for immediate help.}% \cs_new_eq:NN \CaseSwitch \text_case_switch:nnnn \cs_new_eq:NN \DeclareCaseChangeEquivalent \text_declare_case_equivalent:Nn +\NewDocumentCommand \DeclareLowercaseMapping { o m m } + { + \IfNoValueTF {#1} + { \text_declare_lowercase_mapping:nn } + { \text_declare_lowercase_mapping:nnn {#1} } + {#2} {#3} + } +\NewDocumentCommand \DeclareTitlecaseMapping { o m m } + { + \IfNoValueTF {#1} + { \text_declare_titlecase_mapping:nn } + { \text_declare_titlecase_mapping:nnn {#1} } + {#2} {#3} + } +\NewDocumentCommand \DeclareUppercaseMapping { o m m } + { + \IfNoValueTF {#1} + { \text_declare_uppercase_mapping:nn } + { \text_declare_uppercase_mapping:nnn {#1} } + {#2} {#3} + } \ExplSyntaxOff \def\@uclclist{\oe\OE\o\O\ae\AE \dh\DH\dj\DJ\l\L\ng\NG\ss\SS\ij\IJ\th\TH} diff --git a/Master/texmf-dist/tex/latex/base/latex209.def b/Master/texmf-dist/tex/latex/base/latex209.def index 110d7fb26e0..9eb74616f5d 100644 --- a/Master/texmf-dist/tex/latex/base/latex209.def +++ b/Master/texmf-dist/tex/latex/base/latex209.def @@ -15,7 +15,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latexrelease.sty b/Master/texmf-dist/tex/latex/base/latexrelease.sty index 0597e6a5ba4..8084e186c1c 100644 --- a/Master/texmf-dist/tex/latex/base/latexrelease.sty +++ b/Master/texmf-dist/tex/latex/base/latexrelease.sty @@ -65,7 +65,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -290,7 +290,7 @@ } %%% From File: ltvers.dtx \edef\latexreleaseversion - {2022-11-01} + {2023-06-01} \newif\if@includeinrelease \@includeinreleasefalse \def\IncludeInRelease#1{% @@ -421,7 +421,7 @@ \@skipping@modulefalse \fi} \ProvidesPackage{latexrelease} - [2022/02/28 v1.0o LaTeX release emulation and tests + [2022/11/14 v1.0p LaTeX release emulation and tests (including releases up to \latexreleaseversion)] \NeedsTeXFormat{LaTeX2e}[1996/06/01] \@ifundefined{sourceLaTeXdate}{% @@ -544,6 +544,7 @@ of this package available from CTAN} \q_recursion_tail \q_recursion_tail \q_recursion_stop \msg_redirect_name:nnn { hooks } { exists } { none } +\msg_redirect_name:nnn { mark } { class-already-defined }{ none } \cs_gset_protected:Npn \latexrelease@postltcmd { \__latexrelease_redefines:w @@ -764,6 +765,7 @@ of this package available from CTAN} \def\extrafloats#1{% \ifnum#1>\z@ \count@\numexpr\float@count-1\relax + \ifnum\count@<266 \ch@ck0\m@ne\insert\fi \ch@ck0\count@\count \ch@ck1\count@\dimen \ch@ck2\count@\skip @@ -772,8 +774,7 @@ of this package available from CTAN} \global\expandafter\e@alloc@chardef \csname bx@\the\float@count\endcsname\float@count \@cons\@freelist{\csname bx@\the\float@count\endcsname}% -\expandafter -\extrafloats\expandafter{\numexpr#1-1\relax}% +\expandafter\extrafloats\expandafter{\the\numexpr#1-1\expandafter}% \fi}% \fi \EndIncludeInRelease @@ -1630,9 +1631,11 @@ of this package available from CTAN} \long\def\declare@commandcopy#1#2#3#4{% \edef\reserved@a{\@expl@cs@to@str@@N#3}% \@ifundefined\reserved@a{#1}{#2}% - {\robust@command@act - \@declarecommandcopylisthook#4% - \declare@commandcopy@let{#3#4}}} + {\declare@commandcopy@do{#3}{#4}}} +\long\def\declare@commandcopy@do#1#2{% + \robust@command@act + \@declarecommandcopylisthook#2% + \declare@commandcopy@let{#1#2}} \def\@declarecommandcopylisthook{% {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}% {\@if@newcommand \@copy@newcommand}} @@ -1647,6 +1650,35 @@ of this package available from CTAN} \let\@declarecommandcopylisthook\@undefined \let\declare@commandcopy@let\@undefined \EndIncludeInRelease +\IncludeInRelease{2023-06-01}{\DeclareEnvironmentCopy} + {Add \NewEnvironmentCopy, \RenewEnvironmentCopy, and \DeclareEnvironmentCopy}% +\def\NewEnvironmentCopy{% + \declare@environmentcopy + {\@firstofone}% + {\@firstoftwo\@notdefinable}} +\def\RenewEnvironmentCopy{% + \declare@environmentcopy + {\@latex@error{Environment \reserved@a\space undefined}\@ehc + \@firstofone}% + {\@firstofone}} +\def\DeclareEnvironmentCopy{% + \declare@environmentcopy + {\@firstofone}% + {\@firstofone}} +\long\def\declare@environmentcopy#1#2#3#4{% + \edef\reserved@a{\@ifundefined{#3}{end#3}{#3}}% + \@ifundefined\reserved@a + {\def\reserved@a{#3}#1}% + {\def\reserved@a{#3}#2}% + {\ExpandArgs{cc}\declare@commandcopy@do{#3}{#4}% + \ExpandArgs{cc}\declare@commandcopy@do{end#3}{end#4}}} +\EndIncludeInRelease +\IncludeInRelease{0000-00-00}{\DeclareEnvironmentCopy} + {Undefine \NewEnvironmentCopy, \RenewEnvironmentCopy, and \DeclareEnvironmentCopy}% +\let\NewEnvironmentCopy\@undefined +\let\RenewEnvironmentCopy\@undefined +\let\DeclareEnvironmentCopy\@undefined +\EndIncludeInRelease \IncludeInRelease{2020-10-01}{\ShowCommand}% {Add \ShowCommand}% \long\def\ShowCommand#1{% @@ -1718,9 +1750,10 @@ of this package available from CTAN} \robust@command@chk@safe#1% {\@if@newcommand#1% {\@show@newcommand}% - {\show}}% - {\show}% + {\@show@macro}}% + {\@show@macro}% #1} +\let\@show@macro\show \long\def\@if@newcommand#1{% \edef\reserved@a{% \noexpand\@protected@testopt @@ -1748,13 +1781,15 @@ of this package available from CTAN} \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}% \expandafter\@show@newcommand@aux \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname - \expandafter{#1}} -\long\def\@show@newcommand@aux#1#2{% + \expandafter{#1}\@show@tokens} +\long\def\@show@newcommand@aux#1#2#3{% \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}% - \edef\reserved@a{% - default \string##1=\expandafter\detokenize\@gobblethree#2.^^J% - \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}% - \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}} + #3{default \string##1=\expandafter\detokenize\@gobblethree#2.^^J% + \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}} +\long\def\@show@tokens#1{% + \edef\reserved@a{#1}% + \showtokens\expandafter + \expandafter\expandafter{\expandafter\reserved@a}} \EndIncludeInRelease \IncludeInRelease{0000-00-00}{\@if@DeclareRobustCommand} {Undefine \@if@DeclareRobustCommand, \@if@newcommand, @@ -1770,6 +1805,57 @@ of this package available from CTAN} \let\show@kernel@robust@command\@undefined \let\@show@newcommand@aux\@undefined \EndIncludeInRelease +\IncludeInRelease{2023-06-01}{\ShowEnvironment} + {Add \ShowEnvironment}% +\def\ShowEnvironment#1{% + \expandafter\@show@environment\csname #1\endcsname} +\long\def\@show@environment#1{% + \robust@command@act + \@showenvironmentlisthook#1% + \@show@normalenv#1} +\def\@showenvironmentlisthook{% + {\@if@DeclareRobustCommand \@show@DeclareRobustCommand@env}% + {\@if@newcommand \@show@newcommand@env}} +\long\def\@show@newcommand@env#1{% + \@show@environment@begin#1% + \expandafter\@show@newcommand@aux + \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname + \expandafter{#1}\@show@typeout + \@show@environment@end#1} +\long\def\@show@DeclareRobustCommand@env#1{% + \@show@environment@begin#1% + \begingroup + \let\@show@tokens\@show@typeout + \let\@show@macro\@show@nonstop + \expandafter\show@kernel@robust@command + \csname\@expl@cs@to@str@@N#1 \endcsname + \endgroup + \@show@environment@end#1} +\long\def\@show@environment@begin#1{% + \typeout{> \string\begin{\@expl@cs@to@str@@N#1}=environment:}% + \typeout{\@expl@cs@argument@spec@@N#1->% + \@expl@cs@replacement@spec@@N#1.^^J}} +\long\def\@show@normalenv#1{% + \@show@environment@begin#1% + \@show@environment@end#1} +\long\def\@show@environment@end#1{% + \expandafter\@show@environment@end@aux + \csname end\@expl@cs@to@str@@N#1\endcsname#1} +\long\def\@show@environment@end@aux#1#2{% + \@show@tokens{\string\end{\@expl@cs@to@str@@N#2}% + \ifx\relax#1=undefined% + \else:^^J\@expl@cs@argument@spec@@N#1->% + \@expl@cs@replacement@spec@@N#1% + \fi}} +\def\@show@nonstop#1{% + \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:^^J% + \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1.}} +\def\@show@typeout#1{\typeout{> #1.^^J}} +\EndIncludeInRelease +\IncludeInRelease{0000-00-00}{\ShowEnvironment} + {Undefine \ShowEnvironment}% +\let\ShowEnvironment\@undefined +\EndIncludeInRelease \IncludeInRelease{2018-04-01}{\@ifundefined} {Leave commands undefined in \@ifundefined}% \def\@ifundefined#1{% @@ -1900,8 +1986,8 @@ of this package available from CTAN} \EndIncludeInRelease %%% From File: ltcmd.dtx -\def\ltcmdversion{v1.1a} -\def\ltcmddate{2022-08-16} +\def\ltcmdversion{v1.1e} +\def\ltcmddate{2023-05-26} \edef\@latexrelease@catcode@null{\the\catcode`\^^@ } \catcode`\^^@=12 \ExplSyntaxOn @@ -2186,10 +2272,10 @@ of this package available from CTAN} \int_zero:N \l__cmd_current_arg_int \__cmd_tl_mapthread_function:NNN \l__cmd_args_tl \l__cmd_defaults_tl \__cmd_defaults_def:nn - \cs_generate_from_arg_count:NNVo \__cmd_tmp:w \cs_set:Npn + \cs_generate_from_arg_count:NNno \__cmd_tmp:w \cs_set:Npn \l__cmd_current_arg_int \l__cmd_tmpa_tl } -\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo } +\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno } \cs_new_protected:Npn \__cmd_defaults_def:nn { \int_incr:N \l__cmd_current_arg_int @@ -2968,6 +3054,27 @@ of this package available from CTAN} \exp_not:c { #8 ~ } \exp_not:c { #8 ~ code } \exp_not:n { {#5} {#6} {#7} } } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__cmd_copy:NN}% + {Support~\NewCommandCopy~in~ltcmd} +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__cmd_copy_expandable:nnNN}% + {Distinguish~non-expandable~document~commands} +\cs_new_protected:Npn \__cmd_copy_expandable:nnNN #1 #2 #3 #4 + { + \cs_set_eq:cc { #1 ~ code } { #2 ~ code } + \__cmd_set_eq_if_exist:cc { #1 ~ } { #2 ~ } + \__cmd_set_eq_if_exist:cc { #1 ~ \c_space_tl } { #2 ~ \c_space_tl } + \__cmd_set_eq_if_exist:cc { #1 ~ defaults } { #2 ~ defaults } + \exp_after:wN \__cmd_copy_expandable_signature:NnNNNNnnn #4 {#1} {#2} + \token_if_protected_macro:NTF #4 + { \cs_set_protected_nopar:Npx }{ \cs_set_nopar:Npx } + #3 + { \exp_after:wN \__cmd_copy_expandable:NnNNNNnnn #4 {#1} {#2} } + } +\EndIncludeInRelease +\IncludeInRelease{2021/11/15}{\__cmd_copy_expandable:nnNN}% + {Support~\NewCommandCopy~in~ltcmd} \cs_new_protected:Npn \__cmd_copy_expandable:nnNN #1 #2 #3 #4 { \cs_set_eq:cc { #1 ~ code } { #2 ~ code } @@ -2978,6 +3085,12 @@ of this package available from CTAN} \cs_set_nopar:Npx #3 { \exp_after:wN \__cmd_copy_expandable:NnNNNNnnn #4 {#1} {#2} } } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__cmd_copy_expandable:nnNN}% + {Support~\NewCommandCopy~in~ltcmd} +\EndIncludeInRelease +\IncludeInRelease{2021/11/15}{\__cmd_copy:NN (part 2)}% + {Support~\NewCommandCopy~in~ltcmd} \cs_new:Npn \__cmd_copy_expandable:NnNNNNnnn #1 #2 #3 #4 #5 #6 #7 #8 #9 { \exp_not:N #1 \exp_not:n { {#2} } @@ -3094,7 +3207,7 @@ of this package available from CTAN} } \exp_args:No \__cmd_tmp:w { \tl_to_str:n { end } } \EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\__cmd_copy:NN}% +\IncludeInRelease{2020/10/01}{\__cmd_copy:NN (part 2)}% {Support~\NewCommandCopy~in~ltcmd} \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__cmd_show:N}% @@ -3118,19 +3231,46 @@ of this package available from CTAN} \cs_new_protected:Npn \__cmd_show_command:N #1 { \exp_after:wN \__cmd_show_command:NnNNwN #1 \q__cmd #1 } \cs_new_protected:Npn \__cmd_show_command:NnNNwN #1 #2 #3 #4 #5 \q__cmd #6 - { \__cmd_show_command_aux:nNNn { document~command } #6 #4 {#2} } + { + \__cmd_show_command_aux:NnNNn \tl_show:x + { document~command } #6 #4 {#2} + } \cs_new_protected:Npn \__cmd_show_expandable:N #1 { \exp_after:wN \__cmd_show_expandable:NnNNNNnN #1 #1 } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__cmd_show:N}% + {Support~\ShowCommand~in~ltcmd} +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__cmd_show_expandable:NnNNNNnN}% + {Distinguish~non-expandable~document~commands} \cs_new_protected:Npn \__cmd_show_expandable:NnNNNNnN #1 #2 #3 #4 #5 #6 #7 #8 - { \__cmd_show_command_aux:nNNn { expandable~document~command } #8 #5 {#2} } -\cs_new_protected:Npn \__cmd_show_command_aux:nNNn #1 #2 #3 #4 { - \__cmd_split_signature:n {#4} - \tl_show:x + \exp_args:NNe \__cmd_show_command_aux:NnNNn \tl_show:x + { \token_if_protected_macro:NF #8 { expandable~ } document~command } + #8 #5 {#2} + } +\EndIncludeInRelease +\IncludeInRelease{2021/11/15}{\__cmd_show_expandable:NnNNNNnN}% + {Support~\ShowCommand~in~ltcmd} +\cs_new_protected:Npn \__cmd_show_expandable:NnNNNNnN #1 #2 #3 #4 #5 #6 #7 #8 + { + \__cmd_show_command_aux:NnNNn \tl_show:x + { expandable~document~command } #8 #5 {#2} + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__cmd_show_expandable:NnNNNNnN}% + {Support~\ShowCommand~in~ltcmd} +\EndIncludeInRelease +\IncludeInRelease{2021/11/15}{\__cmd_show:N (part 2)}% + {Support~\ShowCommand~in~ltcmd} +\cs_new_protected:Npn \__cmd_show_command_aux:NnNNn #1 #2 #3 #4 #5 + { + \__cmd_split_signature:n {#5} + #1 { - \token_to_str:N #2 = #1: \iow_newline: + \token_to_str:N #3 = #2: \iow_newline: \tl_use:N \l__cmd_tmpa_tl - -> \cs_replacement_spec:N #3 + -> \cs_replacement_spec:N #4 } } \cs_new_protected:Npn \__cmd_show_environment:N #1 @@ -3147,12 +3287,14 @@ of this package available from CTAN} { \use:x { - \__cmd_show_command_aux:nNNn { document~environment } + \__cmd_show_command_aux:NnNNn \__cmd_show:x { document~environment } { \exp_not:N \begin {#3} } \exp_not:c { environment~ #3 ~ code } {#2} } } +\cs_new_protected:Npn \__cmd_show:x #1 + { \iow_term:x { > ~ #1 . \iow_newline: } } \cs_new_protected:Npn \__cmd_show_environment_end:N #1 { \exp_args:NNx \__cmd_check_end:Nn \l__cmd_tmpa_tl { \cs_to_str:N #1 } @@ -3160,6 +3302,8 @@ of this package available from CTAN} } \tl_gput_right:Nn \@showcommandlisthook { { \__kernel_cmd_if_xparse:NTF \__cmd_show:N } } +\tl_gput_right:Nn \@showenvironmentlisthook + { { \__kernel_cmd_if_xparse:NTF \__cmd_show:N } } \cs_new_protected:Npn \__cmd_split_signature:n #1 { \int_set:Nn \l__cmd_current_arg_int { 1 } @@ -3240,7 +3384,7 @@ of this package available from CTAN} \int_incr:N \l__cmd_current_arg_int } \EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\__cmd_show:N}% +\IncludeInRelease{2020/10/01}{\__cmd_show:N (part 2)}% {Support~\ShowCommand~in~ltcmd} \EndIncludeInRelease \cs_new_protected:Npn \__cmd_grab_b:w @@ -3574,6 +3718,7 @@ of this package available from CTAN} \tl_set:Nn \l__cmd_signature_tl {#1} \group_begin: \tex_escapechar:D = 92 \scan_stop: + \tex_endlinechar:D = `\^^M \scan_stop: \tl_clear:N \l__cmd_v_arg_tl \peek_remove_spaces:n { @@ -3591,8 +3736,8 @@ of this package available from CTAN} } \cs_new_protected:Npn \__cmd_grab_v_group_end: { - \exp_args:NNNo - \group_end: + \exp_args:NNNo + \group_end: \tl_set:Nn \l__cmd_v_arg_tl { \l__cmd_v_arg_tl } } \cs_new_protected:Npn \__cmd_grab_v_aux_test:N #1 @@ -3670,7 +3815,6 @@ of this package available from CTAN} { \cs_set_eq:NN \do \char_set_catcode_other:N \dospecials - \tex_endlinechar:D = `\^^M \scan_stop: \bool_if:NTF \l__cmd_long_bool { \char_set_catcode_other:n { \tex_endlinechar:D } } { \char_set_catcode_parameter:n { \tex_endlinechar:D } } @@ -4740,8 +4884,8 @@ of this package available from CTAN} \catcode`\^^@=\@latexrelease@catcode@null\relax %%% From File: lthooks.dtx -\def\lthooksversion{v1.0v} -\def\lthooksdate{2022/06/15} +\def\lthooksversion{v1.1e} +\def\lthooksdate{2023/06/06} \ExplSyntaxOn \NewModuleRelease{2020/10/01}{lthooks} {The~hook~management~system} @@ -4774,44 +4918,64 @@ of this package available from CTAN} \tl_new:N \g__hook_hook_curr_name_tl \seq_new:N \g__hook_name_stack_seq \cs_new_eq:NN \__hook_tmp:w ? +\tl_const:Nn \c__hook_empty_tl { } +\tl_const:Nn \c__hook_nine_parameters_tl { #1#2#3#4#5#6#7#8#9 } \cs_generate_variant:Nn \tl_gremove_once:Nn { Nx } \cs_generate_variant:Nn \tl_show:n { x } \cs_generate_variant:Nn \tl_log:n { x } +\cs_generate_variant:Nn \tl_set:Nn { Ne } +\cs_generate_variant:Nn \cs_replacement_spec:N { c } +\cs_generate_variant:Nn \prop_put:Nnn { Nne } +\cs_generate_variant:Nn \str_count:n { e } \scan_new:N \s__hook_mark -\cs_new:Npn \__hook_clean_to_scan:w #1 \s__hook_mark { } -\cs_new_protected:Npn \__hook_tl_set:Nn #1#2 - { \cs_set_nopar:Npx #1 { \__kernel_exp_not:w {#2} } } -\cs_new_protected:Npn \__hook_tl_set:Nx #1#2 - { \cs_set_nopar:Npx #1 {#2} } -\cs_generate_variant:Nn \__hook_tl_set:Nn { c } -\cs_generate_variant:Nn \__hook_tl_set:Nx { c } +\cs_new:Npn \__hook_use_none_delimit_by_s_mark:w #1 \s__hook_mark { } +\cs_new:Npn \__hook_use_i_delimit_by_s_mark:nw #1 #2 \s__hook_mark {#1} +\cs_new_protected:Npn \__hook_tl_set:cn #1#2 + { \cs_set_nopar:cpx {#1} { \__kernel_exp_not:w {#2} } } \cs_new_protected:Npn \__hook_tl_gset:Nn #1#2 { \cs_gset_nopar:Npx #1 { \__kernel_exp_not:w {#2} } } -\cs_new_protected:Npn \__hook_tl_gset:No #1#2 - { \cs_gset_nopar:Npx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } } \cs_new_protected:Npn \__hook_tl_gset:Nx #1#2 { \cs_gset_nopar:Npx #1 {#2} } -\cs_generate_variant:Nn \__hook_tl_gset:Nn { c } -\cs_generate_variant:Nn \__hook_tl_gset:No { c } +\cs_generate_variant:Nn \__hook_tl_gset:Nn { c, co } \cs_generate_variant:Nn \__hook_tl_gset:Nx { c } \cs_new_protected:Npn \__hook_tl_gput_right:Nn #1#2 { \__hook_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } } -\cs_generate_variant:Nn \__hook_tl_gput_right:Nn { No, cn } +\cs_generate_variant:Nn \__hook_tl_gput_right:Nn { Ne, cn } \cs_new_protected:Npn \__hook_tl_gput_left:Nn #1#2 { \__hook_tl_gset:Nx #1 { \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} } } -\cs_generate_variant:Nn \__hook_tl_gput_left:Nn { No } \cs_new_eq:NN \__hook_tl_gset_eq:NN \tl_gset_eq:NN \cs_new_protected:Npn \__hook_tl_gclear:N #1 { \__hook_tl_gset_eq:NN #1 \c_empty_tl } \cs_generate_variant:Nn \__hook_tl_gclear:N { c } - +\IncludeInRelease{2023/06/01}{\hook_new_with_args:nn} + {Hooks~with~args} \cs_new_protected:Npn \hook_new:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new:nn {#1} { 0 } } +\cs_new_protected:Npn \hook_new_with_args:nn #1 #2 + { \__hook_normalize_hook_args:Nn \__hook_new:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_new:nn #1 #2 + { + \__hook_if_declared:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \tl_new:c { g__hook_#1_declared_tl } + \cs_undefine:c { __hook~#1 } + \cs_undefine:c { c__hook_#1_parameter_tl } + \__hook_make_usable:nn {#1} {#2} + \__hook_update_hook_code:n {#1} + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_new_with_args:nn} + {Hooks~with~args} +\cs_gset_protected:Npn \hook_new:n #1 { \__hook_normalize_hook_args:Nn \__hook_new:n {#1} } -\cs_new_protected:Npn \__hook_new:n #1 +\cs_undefine:N \__hook_new:nn +\cs_gset_protected:Npn \__hook_new:n #1 { \__hook_if_declared:nTF {#1} { \msg_error:nnn { hooks } { exists } {#1} } @@ -4820,7 +4984,40 @@ of this package available from CTAN} \__hook_make_usable:n {#1} } } -\cs_new_protected:Npn \__hook_make_usable:n #1 +\cs_gset_protected:Npn \hook_new_with_args:nn #1 { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_make_usable:nn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_make_usable:nn #1 #2 + { + \__hook_if_usable:nF {#1} + { + \seq_gput_right:Nn \g__hook_all_seq {#1} + \__kernel_cs_parm_from_arg_count:nnF + { \tl_const:cn { c__hook_#1_parameter_tl } } {#2} + { + \msg_error:nnnn { hooks } { too-many-args } {#1} {#2} + \tl_const:cx { c__hook_#1_parameter_tl } + { \exp_not:V \c__hook_nine_parameters_tl } + } + \__hook_normalise_cs_args:nn { _toplevel } {#1} + \__hook_normalise_cs_args:nn { _next } {#1} + \__hook_code_gset:nn {#1} { } + \__hook_init_structure:n {#1} + \__hook_normalise_code_pool:n {#1} + \clist_if_exist:cF { g__hook_#1_labels_clist } + { + \clist_new:c { g__hook_#1_labels_clist } + \tl_new:c { g__hook_#1_reversed_tl } + } + \__hook_include_legacy_code_chunk:n {#1} + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_make_usable:nn} + {Hooks~with~args} +\cs_undefine:N \__hook_make_usable:nn +\cs_gset_protected:Npn \__hook_make_usable:n #1 { \tl_if_exist:cF { __hook~#1 } { @@ -4832,7 +5029,22 @@ of this package available from CTAN} \__hook_include_legacy_code_chunk:n {#1} } } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_init_structure:n} + {Hooks~with~args} \cs_new_protected:Npn \__hook_init_structure:n #1 + { + \__hook_if_structure_exist:nF {#1} + { + \prop_new:c { g__hook_#1_code_prop } + \__hook_toplevel_gset:nn {#1} { } + \__hook_next_gset:nn {#1} { } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_init_structure:n} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_init_structure:n #1 { \__hook_if_structure_exist:nF {#1} { @@ -4841,29 +5053,103 @@ of this package available from CTAN} \tl_new:c { __hook_next~#1 } } } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_new_reversed_with_args:nn} + {Hooks~with~args} \cs_new_protected:Npn \hook_new_reversed:n #1 + { \__hook_normalize_hook_args:Nn \__hook_new_reversed:nn {#1} { 0 } } +\cs_new_protected:Npn \hook_new_reversed_with_args:nn #1 #2 + { \__hook_normalize_hook_args:Nn \__hook_new_reversed:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_new_reversed:nn #1 #2 + { + \__hook_if_declared:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \__hook_new:nn {#1} {#2} + \tl_gset:cn { g__hook_#1_reversed_tl } { - } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_new_reversed_with_args:nn} + {Hooks~with~args} +\cs_gset_protected:Npn \hook_new_reversed:n #1 { \__hook_normalize_hook_args:Nn \__hook_new_reversed:n {#1} } -\cs_new_protected:Npn \__hook_new_reversed:n #1 +\cs_undefine:N \__hook_new_reversed:nn +\cs_gset_protected:Npn \__hook_new_reversed:n #1 { \__hook_new:n {#1} \tl_gset:cn { g__hook_#1_reversed_tl } { - } } +\cs_undefine:N \__hook_new_reversed:nn +\cs_gset_protected:Npn \hook_new_reversed_with_args:nn #1 #2 { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_new_pair_with_args:nnn} + {Hooks~with~args} \cs_new_protected:Npn \hook_new_pair:nn #1#2 - { \hook_new:n {#1} \hook_new_reversed:n {#2} } + { \__hook_normalize_hook_args:Nnn \__hook_new_pair:nnn {#1} {#2} { 0 } } +\cs_new_protected:Npn \hook_new_pair_with_args:nnn #1#2#3 + { \__hook_normalize_hook_args:Nnn \__hook_new_pair:nnn {#1} {#2} {#3} } +\cs_new_protected:Npn \__hook_new_pair:nnn #1 #2 #3 + { + \__hook_if_declared:nTF {#1} + { \msg_error:nnn { hooks } { exists } {#1} } + { + \__hook_if_declared:nTF {#2} + { \msg_error:nnn { hooks } { exists } {#2} } + { + \__hook_new:nn {#1} {#3} + \__hook_new_reversed:nn {#2} {#3} + } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_new_pair_with_args:nnn} + {Hooks~with~args} +\cs_gset_protected:Npn \hook_new_pair:nn #1#2 + { + \hook_new:n {#1} + \hook_new_reversed:n {#2} + } +\cs_gset_protected:Npn \hook_new_pair_with_args:nnn #1#2#3 + { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_include_legacy_code_chunk:n} + {Hooks~with~args} \cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1 { \tl_if_exist:cT { @#1hook } { \tl_if_empty:cF { @#1hook } { - \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1} - { legacy } { @#1hook } + \__hook_replacing_args_false: + \use:e + { + \__hook_hook_gput_code_do:nnn {#1} { legacy } + { \exp_not:v { @#1hook } } + } + \__hook_replacing_args_reset: + \__hook_tl_gclear:c { @#1hook } + } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_include_legacy_code_chunk:n} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_include_legacy_code_chunk:n #1 + { + \tl_if_exist:cT { @#1hook } + { + \tl_if_empty:cF { @#1hook } + { + \exp_args:Nnnv \__hook_hook_gput_code_do:nnn + {#1} { legacy } { @#1hook } \__hook_tl_gclear:c { @#1hook } } } } -\IncludeInRelease{2021/06/01}% - {\hook_disable_generic:n}{Disable~hooks} +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\hook_disable_generic:n} + {Disable~hooks} \cs_new_protected:Npn \hook_disable_generic:n #1 { \__hook_normalize_hook_args:Nn \__hook_disable:n {#1} } \cs_new_protected:Npn \__hook_disable:n #1 @@ -4875,22 +5161,40 @@ of this package available from CTAN} { \bool_lazy_and:nnTF { \tl_if_exist_p:c { g__hook_#1_declared_tl } } - { ! \tl_if_exist_p:c { __hook~#1 } } + { ! \cs_if_exist_p:c { __hook~#1 } } { \prg_return_true: } { \prg_return_false: } } \EndIncludeInRelease -\IncludeInRelease{2020/10/01} - {\hook_disable_generic:n}{Disable~hooks} +\IncludeInRelease{2020/10/01}{\hook_disable_generic:n} + {Disable~hooks} \cs_new_protected:Npn \hook_disable_generic:n #1 {} \EndIncludeInRelease -\IncludeInRelease{2021/06/01}% - {\hook_activate_generic:n}{Providing~hooks} +\IncludeInRelease{2023/06/01}{\hook_activate_generic:n} + {Providing~hooks} \cs_new_protected:Npn \hook_activate_generic:n #1 { \__hook_normalize_hook_args:Nn \__hook_activate_generic:nn {#1} { } } \cs_new_protected:Npn \__hook_activate_generic:nn #1 #2 + { + \__hook_if_disabled:nTF {#1} + { \msg_warning:nnn { hooks } { activate-disabled } {#1} } + { + \__hook_if_declared:nF {#1} + { + \tl_new:c { g__hook_#1_declared_tl } + \__hook_make_usable:nn {#1} { 0 } + \tl_gset:cx { g__hook_#1_reversed_tl } + { \__hook_if_generic_reversed:nT {#1} { - } } + \__hook_update_hook_code:n {#1} + } + } + } +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\hook_activate_generic:n} + {Providing~hooks} +\cs_gset_protected:Npn \__hook_activate_generic:nn #1 #2 { \__hook_if_disabled:nTF {#1} { \msg_warning:nnn { hooks } { activate-disabled } {#1} } @@ -4906,11 +5210,9 @@ of this package available from CTAN} } } \EndIncludeInRelease -\IncludeInRelease{2020/10/01} - {\hook_activate_generic:n}{Providing~hooks} - -\cs_new_protected:Npn \hook_activate_generic:n #1 {} - +\IncludeInRelease{2020/10/01}{\hook_activate_generic:n} + {Providing~hooks} +\cs_gset_protected:Npn \hook_activate_generic:n #1 { } \EndIncludeInRelease \cs_new:Npn \__hook_parse_label_default:n #1 { @@ -5065,9 +5367,104 @@ of this package available from CTAN} } { \tl_gset:Nn \g__hook_hook_curr_name_tl {#1} } } -\cs_new_protected:Npn \hook_gput_code:nnn #1 #2 - { \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} } +\IncludeInRelease{2023/06/01}{\hook_gput_code_with_args:nnn} + {Hooks~with~args} +\cs_new_protected:Npn \hook_gput_code:nnn #1 #2 #3 + { + \__hook_replacing_args_false: + \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} {#3} + \__hook_replacing_args_reset: + } +\cs_new_protected:Npn \hook_gput_code_with_args:nnn #1 #2 #3 + { + \__hook_replacing_args_true: + \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} {#3} + \__hook_replacing_args_reset: + } \cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3 + { + \__hook_chk_args_allowed:nn {#1} { AddToHook } + \__hook_if_execute_immediately:nTF {#1} + { + \__hook_if_replacing_args:TF + { + \msg_error:nnnn { hooks } { one-time-args } + {#1} { AddToHook } + } + { } + \use:n + } + { \__hook_gput_code_store:nnn {#1} {#2} } + {#3} + } +\cs_new_protected:Npn \__hook_gput_code_store:nnn #1 #2 #3 + { + \__hook_if_usable:nTF {#1} + { + \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} + \__hook_update_hook_code:n {#1} + } + { + \__hook_if_disabled:nTF {#1} + { \msg_error:nnn { hooks } { hook-disabled } {#1} } + { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} } + } + } +\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 + { + \__hook_debug:n{\iow_term:x{****~ Add~ to~ + \__hook_if_usable:nF {#1} { undeclared~ } + hook~ #1~ (#2) + \on@line\space <-~ \tl_to_str:n{#3}} } + \str_if_eq:nnTF {#2} { top-level } + { + \str_if_eq:eeTF { top-level } { \__hook_currname_or_default: } + { + \__hook_init_structure:n {#1} + \__hook_cs_gput_right:nnn { _toplevel } {#1} {#3} + } + { \msg_error:nnn { hooks } { misused-top-level } {#1} } + } + { + \exp_args:Nx \__hook_prop_gput_labeled_cleanup:nnn + { + \__hook_if_replacing_args:TF + { \exp_not:n } + { \__hook_double_hashes:n } + {#3} + } + {#1} {#2} + } + } +\cs_new_protected:Npn \__hook_prop_gput_labeled_cleanup:nnn #1 #2 #3 + { + \tl_set:Nn \l__hook_return_tl {#1} + \__hook_if_replacing_args:TF + { + \__hook_if_usable:nT {#2} + { + \__hook_set_normalise_fn:nn {#2} + { Invalid~code~added~\msg_line_context: } + \__hook_normalise_fn:nn {#3} {#1} + \prop_get:NnN \l__hook_work_prop {#3} \l__hook_return_tl + } + } + { } + \exp_args:NcV \__hook_prop_gput_labeled_do:Nnn + { g__hook_#2_code_prop } \l__hook_return_tl {#3} + } +\cs_new_protected:Npn \__hook_prop_gput_labeled_do:Nnn #1 #2 #3 + { + \prop_get:NnNTF #1 {#3} \l__hook_return_tl + { \prop_gput:Nno #1 {#3} { \l__hook_return_tl #2 } } + { \prop_gput:Nnn #1 {#3} {#2} } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_gput_code:nnn} + {Providing~hooks} +\cs_gset_protected:Npn \hook_gput_code:nnn #1 #2 + { \__hook_normalize_hook_args:Nnn \__hook_gput_code:nnn {#1} {#2} } +\cs_gset_protected:Npn \__hook_gput_code:nnn #1 #2 #3 { \__hook_if_execute_immediately:nTF {#1} {#3} @@ -5084,7 +5481,7 @@ of this package available from CTAN} } } } -\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 +\cs_gset_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3 { \__hook_debug:n{\iow_term:x{****~ Add~ to~ \__hook_if_usable:nF {#1} { undeclared~ } @@ -5108,21 +5505,61 @@ of this package available from CTAN} { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} } } } +\cs_gset_protected:Npn \hook_gput_code_with_args:nnn #1#2#3 { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_chk_args_allowed:nn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_chk_args_allowed:nn #1 #2 + { + \__hook_if_replacing_args:TF + { + \__hook_if_declared:nT {#1} + { \tl_if_empty:cT { c__hook_#1_parameter_tl } { \use_ii:nn } } + \use_none:n + { + \msg_error:nnnn { hooks } { without-args } {#1} {#2} + \__hook_replacing_args_false: + } + } + { } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_chk_args_allowed:nn} + {Hooks~with~args} +\cs_undefine:N \__hook_chk_args_allowed:nn +\EndIncludeInRelease \cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3 { \__hook_init_structure:n {#1} \__hook_hook_gput_code_do:nnn {#1} {#2} {#3} } +\IncludeInRelease{2023/06/01}{\__hook_try_declaring_generic_hook:nnn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 + { + \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} + \__hook_gput_code:nnn + \__hook_gput_undeclared_hook:nnn + {#1} + } +\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 + { + \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} + \__hook_gput_next_code:nn + \__hook_gput_next_do:nn + {#1} + } +\EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__hook_try_declaring_generic_hook:nnn} {Standardise~generic~hook~names} -\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 +\cs_gset_protected:Npn \__hook_try_declaring_generic_hook:nnn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn {#1} } -\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 +\cs_gset_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1 { \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1} \hook_gput_next_code:nn @@ -5158,8 +5595,8 @@ of this package available from CTAN} { #3 } {#1} } \EndIncludeInRelease -\IncludeInRelease{2021/11/15}{\__hook_try_declaring_generic_hook:wn}% - {Standardise~generic~hook~names} +\IncludeInRelease{2023/06/01}{\__hook_try_declaring_generic_hook:wn} + {Hooks~with~args} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } { @@ -5168,8 +5605,12 @@ of this package available from CTAN} \__hook_if_usable:nF {#5} { \str_if_eq:nnT {#1} { cmd } - { \__hook_try_put_cmd_hook:n {#5} } - \__hook_make_usable:n {#5} + { + \__hook_try_put_cmd_hook:n {#5} + \__hook_make_usable:nn {#5} { 9 } + \use_none:nnn + } + \__hook_make_usable:nn {#5} { 0 } } \__hook_if_generic_reversed:nT {#5} { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } @@ -5210,6 +5651,34 @@ of this package available from CTAN} #1 #2 { #3 / #5 / #4 } } \EndIncludeInRelease +\IncludeInRelease{2021/11/15}{\__hook_try_declaring_generic_hook:wn} + {Standardise~generic~hook~names} +\prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn + #1 / #2 / #3 / #4 \scan_stop: #5 { TF } + { + \__hook_if_generic:nTF {#5} + { + \__hook_if_usable:nF {#5} + { + \str_if_eq:nnT {#1} { cmd } + { \__hook_try_put_cmd_hook:n {#5} } + \__hook_make_usable:n {#5} + } + \__hook_if_generic_reversed:nT {#5} + { \tl_gset:cn { g__hook_#5_reversed_tl } { - } } + \prg_return_true: + } + { + \__hook_if_deprecated_generic:nTF {#5} + { + \__hook_deprecated_generic_warn:n {#5} + \exp_after:wN \__hook_declare_deprecated_generic:NNn + \exp:w % \exp_end: + } + { \prg_return_false: } + } + } +\EndIncludeInRelease \IncludeInRelease{2021/06/01}{\__hook_try_declaring_generic_hook:wn} {Support~cmd~hooks} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn @@ -5238,7 +5707,7 @@ of this package available from CTAN} } } \EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\__hook_try_declaring_generic_hook:wn}% +\IncludeInRelease{2020/10/01}{\__hook_try_declaring_generic_hook:wn} {Support~cmd~hooks} \prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn #1 / #2 / #3 / #4 \scan_stop: #5 { TF } @@ -5260,23 +5729,11 @@ of this package available from CTAN} { \prg_return_false: } } } - \EndIncludeInRelease -\IncludeInRelease{2021/11/15}{\__hook_if_file_hook:w}% - {Standardise~generic~hook~names} -\prg_new_conditional:Npnn \__hook_if_file_hook:w - #1 / #2 \s__hook_mark #3 { TF } - { - \__hook_if_generic:nTF {#3} - { - \str_if_eq:nnTF {#1} { file } - { \prg_return_true: } - { \prg_return_false: } - } - { \prg_return_false: } - } -\EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\__hook_if_file_hook:w}% +\IncludeInRelease{2021/11/15}{\__hook_if_file_hook:w} + {Standardise~generic~hook~names} +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_if_file_hook:w} {Standardise~generic~hook~names} \prg_new_conditional:Npnn \__hook_if_file_hook:w #1 / #2 / #3 \s__hook_mark { TF } @@ -5296,10 +5753,10 @@ of this package available from CTAN} { \prg_return_false: } } \EndIncludeInRelease -\IncludeInRelease{2021/11/15}{\__hook_file_hook_normalize:n}% +\IncludeInRelease{2021/11/15}{\__hook_file_hook_normalize:n} {Standardise~generic~hook~names} \EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\__hook_file_hook_normalize:n}% +\IncludeInRelease{2020/10/01}{\__hook_file_hook_normalize:n} {Standardise~generic~hook~names} \cs_new:Npn \__hook_file_hook_normalize:n #1 { \__hook_strip_double_slash:n {#1} } @@ -5312,7 +5769,7 @@ of this package available from CTAN} { \__hook_strip_double_slash:w #1/#2/#3 / #4 \s__hook_mark } } \EndIncludeInRelease -\IncludeInRelease{2021/11/15}{\c__hook_generics_prop}% +\IncludeInRelease{2021/11/15}{\c__hook_generics_prop} {Standardise~generic~hook~names} \clist_map_inline:nn { cmd , env , file , package , class , include } { @@ -5330,22 +5787,65 @@ of this package available from CTAN} } \tl_const:cn { c__hook_deprecated_include/./end_tl } { } \EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\c__hook_generics_prop}% +\IncludeInRelease{2020/10/01}{\c__hook_generics_prop} {Standardise~generic~hook~names} \prop_const_from_keyval:Nn \c__hook_generics_prop {cmd=,env=,file=,package=,class=,include=} \EndIncludeInRelease -\IncludeInRelease{2021/11/15}{\c__hook_generics_reversed_ii_prop}% +\IncludeInRelease{2021/11/15}{\c__hook_generics_reversed_ii_prop} {Standardise~generic~hook~names} \EndIncludeInRelease -\IncludeInRelease{2020/10/01}{\c__hook_generics_reversed_ii_prop}% +\IncludeInRelease{2020/10/01}{\c__hook_generics_reversed_ii_prop} {Standardise~generic~hook~names} \prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=} \prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=} \prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=} \EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\c__hook_parameter_cmd/./before_tl} + {Hooks~with~args} +\tl_const:cn { c__hook_parameter_cmd/./before_tl } { #1#2#3#4#5#6#7#8#9 } +\tl_const:cn { c__hook_parameter_cmd/./after_tl } { #1#2#3#4#5#6#7#8#9 } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\c__hook_parameter_cmd/./before_tl} + {Hooks~with~args} +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_gremove_code:nn} + {Hooks~with~args} \cs_new_protected:Npn \hook_gremove_code:nn #1 #2 { \__hook_normalize_hook_args:Nnn \__hook_gremove_code:nn {#1} {#2} } +\cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 + { + \__hook_if_structure_exist:nTF {#1} + { + \str_if_eq:nnTF {#2} {*} + { + \prop_gclear:c { g__hook_#1_code_prop } + \__hook_toplevel_gset:nn {#1} { } + \__hook_next_gset:nn {#1} { } + } + { + \str_if_eq:nnTF {#2} { top-level } + { \__hook_toplevel_gset:nn {#1} { } } + { + \prop_gpop:cnNF { g__hook_#1_code_prop } {#2} \l__hook_return_tl + { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } + } + } + \__hook_if_usable:nT {#1} + { \__hook_update_hook_code:n {#1} } + } + { + \__hook_if_deprecated_generic:nTF {#1} + { + \__hook_deprecated_generic_warn:n {#1} + \__hook_do_deprecated_generic:Nn \__hook_gremove_code:nn {#1} {#2} + } + { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } + } + } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_gremove_code:nn} + {Hooks~with~args} \cs_new_protected:Npn \__hook_gremove_code:nn #1 #2 { \__hook_if_structure_exist:nTF {#1} @@ -5376,9 +5876,276 @@ of this package available from CTAN} { \msg_warning:nnnn { hooks } { cannot-remove } {#1} {#2} } } } -\prop_new:c {g__hook_??_code_prop} -\prop_new:c {__hook~??} -\tl_new:c {g__hook_??_reversed_tl} +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_cs_gput_right:nnn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_cs_gput_right:nnn #1 #2 + { + \if:w T + \__hook_if_declared:nF {#2} { F } + \tl_if_empty:cF { c__hook_#2_parameter_tl } { F } + T + \exp_after:wN \__hook_cs_gput_right_fast:nnn + \else: + \exp_after:wN \__hook_cs_gput_right_slow:nnn + \fi: + {#1} {#2} + } +\cs_new_protected:Npn \__hook_cs_gput_right_fast:nnn #1 #2 #3 + { \cs_gset:cpx { __hook#1~#2 } { \exp_not:v { __hook#1~#2 } \exp_not:n {#3} } } +\cs_new_protected:Npn \__hook_cs_gput_right_slow:nnn #1 #2 #3 + { + \cs_if_exist:cF { __hook#1~#2 } + { \__hook_code_gset_aux:nnn {#1} {#2} { } } + \__hook_code_gset_auxi:eeen + { + \__hook_if_declared:nTF {#2} + { \tl_use:c { c__hook_#2_parameter_tl } } + { + \__hook_if_generic:nTF {#2} + { \__hook_generic_parameter:n {#2} } + { \c__hook_nine_parameters_tl } + } + } + { + \exp_args:NNo \exp_args:No \__hook_double_hashes:n + { + \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: + { \__hook_braced_cs_parameter:n { __hook#1~#2 } } + } + } + { + \__hook_if_replacing_args:TF + { \exp_not:n } + { \__hook_double_hashes:n } + {#3} + } + { __hook#1~#2 } + } +\cs_new_protected:Npn \__hook_code_gset_auxi:nnnn #1 #2 #3 #4 + { \cs_gset:cpn {#4} #1 { #2 #3 } } +\cs_generate_variant:Nn \__hook_code_gset_auxi:nnnn { eeen } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_cs_gput_right:nnn} + {Hooks~with~args} +\cs_undefine:N \__hook_cs_gput_right:nnn +\cs_undefine:N \__hook_cs_gput_right_fast:nnn +\cs_undefine:N \__hook_cs_gput_right_slow:nnn +\cs_undefine:N \__hook_code_gset_auxi:nnnn +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_code_gset:nn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_code_gset:nn + { \__hook_code_gset_aux:nnn { } } +\cs_new_protected:Npn \__hook_toplevel_gset:nn + { \__hook_code_gset_aux:nnn { _toplevel } } +\cs_new_protected:Npn \__hook_next_gset:nn + { \__hook_code_gset_aux:nnn { _next } } +\cs_new_protected:Npn \__hook_code_gset_aux:nnn #1 #2 #3 + { + \cs_gset:cpn { __hook#1~#2 \exp_last_unbraced:Ne } + { \__hook_parameter:n {#2} } + {#3} + } +\cs_generate_variant:Nn \__hook_code_gset:nn { ne } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_code_gset:nn} + {Hooks~with~args} +\cs_undefine:N \__hook_code_gset:nn +\cs_undefine:N \__hook_toplevel_gset:nn +\cs_undefine:N \__hook_next_gset:nn +\cs_undefine:N \__hook_code_gset_aux:nnn +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_normalise_cs_args:nn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_normalise_cs_args:nn #1 #2 + { + \cs_if_exist:cT { __hook#1~#2 } + { + \__hook_code_gset_auxi:eeen + { \tl_use:c { c__hook_#2_parameter_tl } } + { + \exp_args:NNo \exp_args:No \__hook_double_hashes:n + { + \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: + { \__hook_braced_cs_parameter:n { __hook#1~#2 } } + } + } + { } + { __hook#1~#2 } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_normalise_cs_args:nn} + {Hooks~with~args} +\cs_undefine:N \__hook_normalise_cs_args:nn +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_normalise_code_pool:n} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_normalise_code_pool:n #1 + { + \__hook_set_normalise_fn:nn {#1} { Offending~label:~'##1' } + \prop_clear:N \l__hook_work_prop + \prop_map_function:cN { g__hook_#1_code_prop } \__hook_normalise_fn:nn + \prop_gset_eq:cN { g__hook_#1_code_prop } \l__hook_work_prop + } +\cs_new_protected:Npn \__hook_set_normalise_fn:nn #1 #2 + { + \cs_set:Npn \__hook_tmp:w ##1##2##3##4##5##6##7##8##9 { } + \tl_set:Ne \l__hook_tmpb_tl + { \__hook_braced_cs_parameter:n { __hook_tmp:w } } + \group_begin: + \__hook_tl_set:cn { c__hook_hash_tl } { \exp_not:N \c__hook_hashes_tl } + \use:e + { + \group_end: + \tl_set:Nn \exp_not:N \l__hook_tmpb_tl { \l__hook_tmpb_tl } + } + \exp_last_unbraced:NNf + \cs_set:Npn \__hook_tmp:w { \__hook_parameter:n {#1} } { } + \tl_set:Ne \l__hook_tmpa_tl { \__hook_braced_cs_parameter:n { __hook_tmp:w } } + \cs_gset_protected:Npx \__hook_normalise_fn:nn ##1 ##2 + { + \group_begin: + \int_set:Nn \tex_escapechar:D { -1 } + \cs_set:cpn + { + hook~'#1'. ^^J + (hooks) \prg_replicate:nn { 13 } { ~ } + #2 % more message text + } + \exp_not:v { c__hook_#1_parameter_tl } + {##2} + \group_end: + \cs_set:Npn \exp_not:N \__hook_tmp:w + \exp_not:V \c__hook_nine_parameters_tl + { + \prop_put:Nne \exp_not:N \l__hook_work_prop + {##1} { \exp_not:N \__hook_double_hashes:n {##2} } + } + \exp_not:N \__hook_tmp:w + \exp_not:V \l__hook_tmpa_tl + \exp_args:No \exp_not:o + { \exp_after:wN \__hook_tmp:w \l__hook_tmpb_tl } + } + } +\cs_new_eq:NN \__hook_normalise_fn:nn ? +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_normalise_code_pool:n} + {Hooks~with~args} +\cs_undefine:N \__hook_normalise_code_pool:n +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_cs_if_empty:c} + {Hooks~with~args} +\prg_new_conditional:Npnn \__hook_cs_if_empty:c #1 { p, T, F, TF } + { + \if:w \scan_stop: \__hook_replacement_spec:c {#1} \scan_stop: + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_new:Npn \__hook_replacement_spec:c #1 + { + \exp_args:Nc \token_if_macro:NT {#1} + { \cs_replacement_spec:c {#1} } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_cs_if_empty:c} + {Hooks~with~args} +\cs_undefine:N \__hook_cs_if_empty:c +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_braced_cs_parameter:n} + {Hooks~with~args} +\cs_new:Npn \__hook_braced_cs_parameter:n #1 + { + \exp_last_unbraced:Ne \__hook_braced_hidden_loop:w + { \exp_args:Nc \__hook_cs_parameter_count:N {#1} } ? \s__hook_mark + } +\cs_new:Npn \__hook_braced_hidden_loop:w #1 + { + \if:w ? #1 + \__hook_use_i_delimit_by_s_mark:nw + \fi: + { \exp_not:N \c__hook_hash_tl #1 } + \__hook_braced_hidden_loop:w + } +\cs_new:Npn \__hook_cs_parameter_count:N #1 + { + \exp_last_unbraced:Nf \__hook_cs_parameter_count:w + { \token_if_macro:NT #1 { \cs_parameter_spec:N #1 } } + ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w + ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w + ? \__hook_cs_end:w ? \__hook_cs_end:w ? \__hook_cs_end:w + \s__hook_mark + } +\cs_new:Npn \__hook_cs_parameter_count:w #1#2 #3#4 #5#6 #7#8 + { #2 #4 #6 #8 \__hook_cs_parameter_count:w } +\cs_new:Npn \__hook_cs_end:w #1 \s__hook_mark { } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_braced_cs_parameter:n} + {Hooks~with~args} +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_braced_parameter:n} + {Hooks~with~args} +\cs_new:Npn \__hook_braced_parameter:n #1 + { + \if_case:w + \int_eval:n + { \exp_args:Nv \str_count:n { c__hook_#1_parameter_tl } / 3 } + \exp_stop_f: + \or: {##1} + \or: {##1} {##2} + \or: {##1} {##2} {##3} + \or: {##1} {##2} {##3} {##4} + \or: {##1} {##2} {##3} {##4} {##5} + \or: {##1} {##2} {##3} {##4} {##5} {##6} + \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} + \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} + \or: {##1} {##2} {##3} {##4} {##5} {##6} {##7} {##8} {##9} + \else: + \msg_expandable_error:nnn { latex2e } { should-not-happen } + { Invalid~parameter~spec. } + \fi: + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_braced_parameter:n} + {Hooks~with~args} +\cs_undefine:N \__hook_braced_parameter:n +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_parameter:n} + {Hooks~with~args} +\cs_new:Npn \__hook_parameter:n #1 + { + \cs:w c__hook_ + \tl_if_exist:cTF { c__hook_#1_parameter_tl } + { #1_parameter } { empty } + _tl \cs_end: + } +\cs_new:Npn \__hook_generic_parameter:n #1 + { \__hook_generic_parameter:w #1 / / / \s__hook_mark } +\cs_new:Npn \__hook_generic_parameter:w #1 / #2 / #3 / #4 \s__hook_mark + { + \cs_if_exist_use:cF { c__hook_parameter_#1/./#3_tl } + { \c__hook_empty_tl } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_parameter:n} + {Hooks~with~args} +\cs_undefine:N \__hook_parameter:n +\cs_undefine:N \__hook_generic_parameter:n +\EndIncludeInRelease +\prop_new:c { g__hook_??_code_prop } +\prop_new:c { __hook~?? } +\tl_new:c { g__hook_??_reversed_tl } +\IncludeInRelease{2023/06/01}{\c__hook_??_parameter_tl} + {Hooks~with~args} +\tl_const:cn { c__hook_??_parameter_tl } { } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\c__hook_??_parameter_tl} + {Hooks~with~args} +\cs_undefine:c { c__hook_??_parameter_tl } +\EndIncludeInRelease \cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4 { \__hook_normalize_hook_rule_args:Nnnnn \__hook_gset_rule:nnnn @@ -5393,13 +6160,13 @@ of this package available from CTAN} \__hook_deprecated_generic_warn:n {#1} \__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1} {#2} {#3} {#4} - \__hook_clean_to_scan:w + \__hook_use_none_delimit_by_s_mark:w } \__hook_if_execute_immediately:nT {#1} { \msg_error:nnnnnn { hooks } { rule-too-late } {#1} {#2} {#3} {#4} - \__hook_clean_to_scan:w + \__hook_use_none_delimit_by_s_mark:w } \__hook_init_structure:n {#1} \__hook_rule_gclear:nnn {#1} {#2} {#4} @@ -5489,24 +6256,88 @@ of this package available from CTAN} \cs_end: } \cs_new_eq:NN \__hook_update_hook_code:n \use_none:n -\cs_new_protected:Npn \__hook_initialize_all: { - \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n - \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } - \seq_map_inline:Nn \g__hook_all_seq +\IncludeInRelease{2023/06/01}{\__hook_initialize_all:} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_initialize_all: + { + \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n + \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } + \seq_map_inline:Nn \g__hook_all_seq { + \tl_if_empty:cTF { c__hook_##1_parameter_tl } + { \__hook_replacing_args_false: } + { \__hook_replacing_args_true: } \__hook_update_hook_code:n {##1} + \__hook_replacing_args_reset: } - \__hook_debug:n - { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:} - \prop_map_inline:Nn \g__hook_used_prop - { \iow_term:x{^^J~ ##1~ ->~ - \exp_not:v {__hook~##1}~ } - } - } - \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n - \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n -} + \__hook_debug:n + { + \iow_term:x { ^^J All~initialized~(non-empty)~hooks: } + \prop_map_inline:Nn \g__hook_used_prop + { + \iow_term:x + { ^^J ~ ##1 ~ -> ~ \cs_replacement_spec:c { __hook~##1 } ~ } + } + } + \__hook_post_initialization_defs: + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_initialize_all:} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_initialize_all: + { + \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n + \__hook_debug:n { \prop_gclear:N \g__hook_used_prop } + \seq_map_inline:Nn \g__hook_all_seq + { \__hook_update_hook_code:n {##1} } + \__hook_debug:n + { + \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:} + \prop_map_inline:Nn \g__hook_used_prop + { + \iow_term:x + { ^^J ~ ##1 ~ -> ~ \cs_replacement_spec:c { __hook~##1 } ~ } + } + } + \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n + \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n + } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_initialize_hook_code:n} + {Hooks~with~args} \cs_new_protected:Npn \__hook_initialize_hook_code:n #1 + { + \__hook_debug:n + { \iow_term:x { ^^J Update~code~for~hook~'#1' \on@line :^^J } } + \__hook_include_legacy_code_chunk:n {#1} + \__hook_if_usable:nT {#1} + { + \prop_if_empty:cTF { g__hook_#1_code_prop } + { + \__hook_code_gset:ne {#1} + { + \exp_not:c { __hook_toplevel~#1 } \__hook_braced_parameter:n {#1} + \exp_not:c { __hook_next~#1 } \__hook_braced_parameter:n {#1} + } + } + { + \__hook_if_reversed:nTF {#1} + { \cs_set_eq:NN \__hook_tl_gput:Nn \__hook_tl_gput_left:Nn + \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV } + { \cs_set_eq:NN \__hook_tl_gput:Nn \__hook_tl_gput_right:Nn + \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV } + \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop } + \__hook_initialize_single:ccn + { __hook~#1 } { g__hook_#1_labels_clist } {#1} + \__hook_debug:n + { \exp_args:NNx \prop_gput:Nnn \g__hook_used_prop {#1} { } } + } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_initialize_hook_code:n} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_initialize_hook_code:n #1 { \__hook_debug:n { \iow_term:x { ^^J Update~code~for~hook~'#1' \on@line :^^J } } @@ -5535,6 +6366,7 @@ of this package available from CTAN} } } } +\EndIncludeInRelease \cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl } \cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq } \seq_new:N \l__hook_labels_seq @@ -5542,6 +6374,89 @@ of this package available from CTAN} \tl_new:N \l__hook_front_tl \tl_new:N \l__hook_rear_tl \tl_new:c { \__hook_tl_csname:n { 0 } } +\IncludeInRelease{2023/06/01}{\__hook_initialize_single:NNn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_initialize_single:NNn #1#2#3 + { + \seq_clear:N \l__hook_labels_seq + \int_zero:N \l__hook_labels_int + \tl_set:Nn \l__hook_cur_hook_tl {#3} + \prop_map_inline:Nn \l__hook_work_prop + { + \int_incr:N \l__hook_labels_int + \seq_put_right:Nn \l__hook_labels_seq {##1} + \__hook_tl_set:cn { \__hook_tl_csname:n {##1} } { 0 } + \seq_clear_new:c { \__hook_seq_csname:n {##1} } + } + \prop_map_inline:Nn \l__hook_work_prop + { + \prop_map_inline:Nn \l__hook_work_prop + { + \__hook_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \__hook_apply_label_pair:nnn {##1} {####1} } + { \__hook_apply_label_pair:nnn {####1} {##1} } + {#3} + } + } + \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop } + \tl_set:Nn \l__hook_rear_tl { 0 } + \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 } + \seq_map_inline:Nn \l__hook_labels_seq + { + \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 + { + \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1} + \tl_set:Nn \l__hook_rear_tl {##1} + } + } + \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } } + \__hook_tl_gclear:N #1 + \clist_gclear:N #2 + \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } } + { + \int_decr:N \l__hook_labels_int + \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl + \exp_args:NNV \__hook_tl_gput:Nn #1 \l__hook_return_tl + \__hook_clist_gput:NV #2 \l__hook_front_tl + \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} } + \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } } + { + \tl_set:cx { \__hook_tl_csname:n {##1} } + { \int_eval:n + { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 } + } + \int_compare:nNnT + { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0 + { + \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1} + \tl_set:Nn \l__hook_rear_tl {##1} + } + } + \tl_set_eq:Nc \l__hook_front_tl + { \__hook_tl_csname:n { \l__hook_front_tl } } + } + \int_compare:nNnF \l__hook_labels_int = 0 + { + \iow_term:x{====================} + \iow_term:x{Error:~ label~ rules~ are~ incompatible:} + \__hook_debug_label_data:N \l__hook_work_prop + \iow_term:x{====================} + } + \exp_args:NNe \__hook_tl_gput:Nn #1 + { \exp_not:c { __hook_toplevel~#3 } \__hook_braced_parameter:n {#3} } + \__hook_tl_gput_right:Ne #1 + { \exp_not:c { __hook_next~#3 } \__hook_braced_parameter:n {#3} } + \use:e + { + \cs_gset:cpn { __hook~#3 } \use:c { c__hook_#3_parameter_tl } + { \exp_not:V #1 } + } + } +\cs_generate_variant:Nn \__hook_initialize_single:NNn { cc } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_initialize_single:NNn} + {Hooks~with~args} \cs_new_protected:Npn \__hook_initialize_single:NNn #1#2#3 { \seq_clear:N \l__hook_labels_seq @@ -5612,7 +6527,8 @@ of this package available from CTAN} \exp_args:NNo \__hook_tl_gput:Nn #1 { \cs:w __hook_toplevel~#3 \cs_end: } \__hook_tl_gput_right:No #1 { \cs:w __hook_next~#3 \cs_end: } } -\cs_generate_variant:Nn \__hook_initialize_single:NNn { cc } +\cs_generate_variant:Nn \__hook_tl_gput_right:Nn { No } +\EndIncludeInRelease \cs_new:Npn \__hook_tl_gput:Nn { \ERROR } \cs_new:Npn \__hook_clist_gput:NV { \ERROR } \cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3 @@ -5727,6 +6643,123 @@ of this package available from CTAN} { \__hook_log_cmd:x { >~#1 } } \cs_new_protected:Npn \__hook_log_line_indent:x #1 { \__hook_log_cmd:x { >~\@spaces #1 } } +\IncludeInRelease{2023/06/01}{\__hook_log:nN} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_log:nN #1 #2 + { + \__hook_if_deprecated_generic:nT {#1} + { + \__hook_deprecated_generic_warn:n {#1} + \__hook_do_deprecated_generic:Nn \__hook_log:nN {#1} #2 + \exp_after:wN \use_none:nnnnnnnnn \use_none:nnnnn + } + \__hook_preamble_hook:n {#1} + \__hook_log_cmd:x + { + ^^J ->~The~ + \__hook_if_generic:nT {#1} { generic~ } + hook~'#1' + \__hook_if_disabled:nF {#1} + { + \exp_args:Nf \__hook_print_args:nn {#1} + { + \int_eval:n + { \str_count:e { \__hook_parameter:n {#1} } / 3 } + } + } + : + } + \__hook_if_usable:nF {#1} + { \__hook_log_line:x { The~hook~is~not~declared. } } + \__hook_if_disabled:nT {#1} + { \__hook_log_line:x { The~hook~is~disabled. } } + \hook_if_empty:nTF {#1} + { #2 { The~hook~is~empty } } + { + \__hook_log_line:x { Code~chunks: } + \prop_if_empty:cTF { g__hook_#1_code_prop } + { \__hook_log_line_indent:x { --- } } + { + \prop_map_inline:cn { g__hook_#1_code_prop } + { + \exp_after:wN \cs_set:Npn \exp_after:wN \__hook_tmp:w + \c__hook_nine_parameters_tl {##2} + \__hook_log_line_indent:x + { ##1~->~\cs_replacement_spec:N \__hook_tmp:w } + } + } + \__hook_log_line:x + { + Document-level~(top-level)~code + \__hook_if_usable:nT {#1} + { ~(executed~\__hook_if_reversed:nTF {#1} {first} {last} ) } : + } + \__hook_log_line_indent:x + { + \__hook_cs_if_empty:cTF { __hook_toplevel~#1 } + { --- } + { -> ~ \cs_replacement_spec:c { __hook_toplevel~#1 } } + } + \__hook_log_line:x { Extra~code~for~next~invocation: } + \__hook_log_line_indent:x + { + \__hook_cs_if_empty:cTF { __hook_next~#1 } + { --- } + { + -> ~ \exp_last_unbraced:Nf \__hook_log_next_code:w + { \cs_replacement_spec:c { __hook_next~#1 } } + } + } + \__hook_log_line:x { Rules: } + \bool_set_true:N \l__hook_tmpa_bool + \__hook_list_rules:nn {#1} + { + \bool_set_false:N \l__hook_tmpa_bool + \__hook_log_line_indent:x + { + ##2~ with~ + \str_if_eq:nnT {##3} {??} { default~ } + relation~ ##1 + } + } + \bool_if:NT \l__hook_tmpa_bool + { \__hook_log_line_indent:x { --- } } + \bool_lazy_and:nnTF + { \__hook_if_usable_p:n {#1} } + { ! \hook_if_empty_p:n {#1} } + { + \__hook_log_line:x + { + Execution~order + \bool_if:NTF \l__hook_tmpa_bool + { \__hook_if_reversed:nT {#1} { ~(after~reversal) } } + { ~(after~ + \__hook_if_reversed:nT {#1} { reversal~and~ } + applying~rules) + } : + } + #2 % \tl_show:n + { + \@spaces + \clist_if_empty:cTF { g__hook_#1_labels_clist } + { --- } + { \clist_use:cn { g__hook_#1_labels_clist } { ,~ } } + } + } + { + \__hook_log_line:x { Execution~order: } + #2 + { + \@spaces Not~set~because~the~hook~ \__hook_if_usable:nTF {#1} + { code~pool~is~empty } + { is~\__hook_if_disabled:nTF {#1} {disabled} {undeclared} } + } + } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_log:nN} + {Hooks~with~args} \cs_new_protected:Npn \__hook_log:nN #1 #2 { \__hook_if_deprecated_generic:nT {#1} @@ -5804,7 +6837,7 @@ of this package available from CTAN} \@spaces \clist_if_empty:cTF { g__hook_#1_labels_clist } { --- } - { \clist_use:cn {g__hook_#1_labels_clist} { ,~ } } + { \clist_use:cn { g__hook_#1_labels_clist } { ,~ } } } } { @@ -5818,8 +6851,28 @@ of this package available from CTAN} } } } -\cs_new:Npn \__hook_log_next_code:n #1 +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_log_next_code:n} + {Hooks~with~args} +\exp_last_unbraced:NNNNo +\cs_new:Npn \__hook_log_next_code:w #1 \c_right_brace_str { } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_log_next_code:n} + {Hooks~with~args} +\cs_gset:Npn \__hook_log_next_code:n #1 { \exp_args:No \tl_to_str:n { \use_none:nn #1 } } +\EndIncludeInRelease +\cs_new:Npn \__hook_print_args:nn #1 #2 + { + \int_compare:nNnT {#2} > { 0 } + { + \__hook_if_declared:nT {#1} { \use_none:nnn } + \__hook_if_cmd_hook:nT {#1} + { \use_i:nnn { ~ (unknown ~ } } + \use:n { ~ (#2 ~ } + argument \int_compare:nNnT {#2} > { 1 } { s } ) + } + } \cs_new_protected:Npn \__hook_list_rules:nn #1 #2 { \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2} @@ -5865,24 +6918,59 @@ of this package available from CTAN} } \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } } } -\cs_new_protected:Npn \hook_gput_next_code:nn #1 +\IncludeInRelease{2023/06/01}{\hook_gput_next_code:nn} + {Hooks~with~args} +\cs_new_protected:Npn \hook_gput_next_code:nn #1 #2 + { + \__hook_replacing_args_false: + \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} {#2} + \__hook_replacing_args_reset: + } +\cs_new_protected:Npn \hook_gput_next_code_with_args:nn #1 #2 + { + \__hook_replacing_args_true: + \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} {#2} + \__hook_replacing_args_reset: + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_gput_next_code:nn} + {Hooks~with~args} +\cs_gset_protected:Npn \hook_gput_next_code:nn #1 { \__hook_normalize_hook_args:Nn \__hook_gput_next_code:nn {#1} } +\cs_gset_protected:Npn \hook_gput_next_code_with_args:nn #1 #2 { } +\EndIncludeInRelease \cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2 { \__hook_if_disabled:nTF {#1} { \msg_error:nnn { hooks } { hook-disabled } {#1} } { \__hook_if_structure_exist:nTF {#1} - { \__hook_gput_next_do:nn {#1} {#2} } - { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} } + { \__hook_gput_next_do:nn } + { \__hook_try_declaring_generic_next_hook:nn } + {#1} {#2} } } +\IncludeInRelease{2023/06/01}{\__hook_gput_next_do:nn} + {Hooks~with~args} \cs_new_protected:Npn \__hook_gput_next_do:nn #1 + { + \__hook_init_structure:n {#1} + \__hook_chk_args_allowed:nn {#1} { AddToHookNext } + \__hook_cs_if_empty:cT { __hook~#1 } + { \__hook_update_hook_code:n {#1} } + \__hook_cs_if_empty:cT { __hook_next~#1 } + { \__hook_next_gset:nn {#1} { \__hook_clear_next:n {#1} } } + \__hook_cs_gput_right:nnn { _next } {#1} + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_gput_next_do:nn} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_gput_next_do:nn #1 { \exp_args:Nc \__hook_gput_next_do:Nnn { __hook_next~#1 } {#1} } -\cs_new_protected:Npn \__hook_gput_next_do:Nnn #1 #2 +\cs_gset_protected:Npn \__hook_gput_next_do:Nnn #1 #2 { \tl_if_empty:cT { __hook~#2 } { \__hook_update_hook_code:n {#2} } @@ -5890,10 +6978,41 @@ of this package available from CTAN} { \__hook_tl_gset:Nn #1 { \__hook_clear_next:n {#2} } } \__hook_tl_gput_right:Nn #1 } +\EndIncludeInRelease \cs_new_protected:Npn \hook_gclear_next_code:n #1 { \__hook_normalize_hook_args:Nn \__hook_clear_next:n {#1} } +\IncludeInRelease{2023/06/01}{\__hook_clear_next:n} + {Hooks~with~args} \cs_new_protected:Npn \__hook_clear_next:n #1 + { \__hook_next_gset:nn {#1} { } } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_clear_next:n} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_clear_next:n #1 { \cs_gset_eq:cN { __hook_next~#1 } \c_empty_tl } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_use:n} + {Hooks~with~args} +\cs_new_protected:Npn \hook_use:n #1 + { + \__hook_preamble_hook:n {#1} + \__hook_use_initialized:n {#1} + } +\cs_new:Npn \__hook_use_initialized:n #1 + { + \if_cs_exist:w __hook~#1 \cs_end: + \cs:w __hook~#1 \use_i:nn + \fi: + \use_none:n + \cs_end: + } +\cs_new_protected:Npn \__hook_preamble_hook:n #1 + { + \if_cs_exist:w __hook~#1 \cs_end: + \__hook_initialize_hook_code:n {#1} + \fi: + } +\EndIncludeInRelease \IncludeInRelease{2021/11/15}{\hook_use:n} {Standardise~generic~hook~names} \cs_new_protected:Npn \hook_use:n #1 @@ -5912,6 +7031,7 @@ of this package available from CTAN} } \cs_new_protected:Npn \__hook_preamble_hook:n #1 { \__hook_initialize_hook_code:n {#1} } +\cs_new:Npn \hook_use:nnw #1 { } \EndIncludeInRelease \IncludeInRelease{2020/10/01}{\hook_use:n} {Standardise~generic~hook~names} @@ -5940,6 +7060,44 @@ of this package available from CTAN} \cs_new_protected:Npn \__hook_preamble_hook:n #1 { \__hook_initialize_hook_code:n {#1} } \cs_new_eq:NN \__hook_use_end: \cs_end: +\cs_new:Npn \hook_use:nnw #1 { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_use:nnw} + {Hooks~with~args} +\cs_new_protected:Npn \hook_use:nnw #1 + { + \__hook_preamble_hook:n {#1} + \__hook_use_initialized:nnw {#1} + } +\cs_new:Npn \__hook_use_initialized:nnw #1 #2 + { + \cs:w + \if_cs_exist:w __hook~#1 \cs_end: + __hook~#1 + \else: + use_none: \prg_replicate:nn {#2} { n } + \fi: + \cs_end: + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_use:nnw} + {Hooks~with~args} +\cs_gset:Npn \hook_use:nnw #1 #2 + { \use:c { use_none: \prg_replicate:nn {#2} { n } } } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_post_initialization_defs:} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_post_initialization_defs: + { + \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n + \cs_gset_eq:NN \hook_use:nnw \__hook_use_initialized:nnw + \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n + \cs_gset_eq:NN \__hook_post_initialization_defs: \prg_do_nothing: + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_post_initialization_defs:} + {Hooks~with~args} +\cs_undefine:N \__hook_post_initialization_defs: \EndIncludeInRelease \IncludeInRelease{2021/11/15}{\__hook_use:wn} {Standardise~generic~hook~names} @@ -5970,20 +7128,71 @@ of this package available from CTAN} } } \EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\hook_use_once:nnw} + {Hooks~with~args} \cs_new_protected:Npn \hook_use_once:n #1 + { + \__hook_if_execute_immediately:nF {#1} + { \__hook_normalize_hook_args:Nn \__hook_use_once:nn { \use:n {#1} } { 0 } } + } +\cs_new_protected:Npn \hook_use_once:nnw #1 #2 + { + \__hook_if_execute_immediately:nF {#1} + { \__hook_normalize_hook_args:Nn \__hook_use_once:nn { \use:n {#1} } {#2} } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_use_once:nnw} + {Hooks~with~args} +\cs_gset_protected:Npn \hook_use_once:n #1 { \__hook_if_execute_immediately:nF {#1} { \__hook_normalize_hook_args:Nn \__hook_use_once:n { \use:n {#1} } } } -\cs_new_protected:Npn \__hook_use_once:n #1 +\cs_gset:Npn \hook_use_once:nnw #1 #2 + { \use:c { use_none: \prg_replicate:nn {#2} { n } } } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_use_once:nn} + {Hooks~with~args} +\cs_new_protected:Npn \__hook_use_once:nn #1 #2 + { + \__hook_preamble_hook:n {#1} + \__hook_use_once_set:n {#1} + \__hook_replacing_args_false: + \__hook_cs_gput_right:nnn { _next } {#1} { \__hook_use_once_clear:n {#1} } + \__hook_replacing_args_reset: + \__hook_if_usable:nTF {#1} + { \__hook_use_initialized:n {#1} } + { + \int_compare:nNnT {#2} > { 0 } + { \use:c { use_none: \prg_replicate:nn {#2} { n } } } + } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_use_once:nn} + {Hooks~with~args} +\cs_gset_protected:Npn \__hook_use_once:n #1 { \__hook_preamble_hook:n {#1} \__hook_use_once_set:n {#1} \__hook_use_initialized:n {#1} \__hook_use_once_clear:n {#1} } +\cs_undefine:N \__hook_use_once:nn +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_use_once_clear:n} + {Hooks~with~args} \cs_new_protected:Npn \__hook_use_once_set:n #1 { \__hook_tl_gset:cn { g__hook_#1_reversed_tl } { I } } +\cs_new_protected:Npn \__hook_use_once_clear:n #1 + { + \__hook_code_gset:nn {#1} { } + \__hook_next_gset:nn {#1} { } + \__hook_toplevel_gset:nn {#1} { } + \prop_gclear_new:c { g__hook_#1_code_prop } + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_use_once_clear:n} + {Hooks~with~args} \cs_new_protected:Npn \__hook_use_once_clear:n #1 { \__hook_tl_gclear:c { __hook~#1 } @@ -5991,20 +7200,39 @@ of this package available from CTAN} \__hook_tl_gclear:c { __hook_toplevel~#1 } \prop_gclear_new:c { g__hook_#1_code_prop } } -\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF } +\EndIncludeInRelease +\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF } + { + \exp_after:wN \__hook_use_none_delimit_by_s_mark:w + \if:w I + \if_cs_exist:w g__hook_#1_reversed_tl \cs_end: + \cs:w g__hook_#1_reversed_tl \exp_after:wN \cs_end: + \fi: + X + \s__hook_mark \prg_return_true: + \else: + \s__hook_mark \prg_return_false: + \fi: + } +\IncludeInRelease{2023/06/01}{\hook_if_empty:n} + {Hooks~with~args} +\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } { - \__hook_if_usable:nTF {#1} - { - \exp_after:wN \__hook_clean_to_scan:w - \if:w I \cs:w g__hook_#1_reversed_tl \cs_end: - \s__hook_mark \prg_return_true: - \else: - \s__hook_mark \prg_return_false: - \fi: - } - { \prg_return_false: } + \if:w + T + \prop_if_exist:cT { g__hook_#1_code_prop } + { \prop_if_empty:cF { g__hook_#1_code_prop } { F } } + \__hook_cs_if_empty:cF { __hook_toplevel~#1 } { F } + \__hook_cs_if_empty:cF { __hook_next~#1 } { F } + T + \prg_return_true: + \else: + \prg_return_false: + \fi: } - +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\hook_if_empty:n} + {Hooks~with~args} \prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF } { \__hook_if_structure_exist:nTF {#1} @@ -6021,9 +7249,10 @@ of this package available from CTAN} } { \prg_return_true: } } +\EndIncludeInRelease \prg_new_conditional:Npnn \__hook_if_usable:n #1 { p , T , F , TF } { - \tl_if_exist:cTF { __hook~#1 } + \cs_if_exist:cTF { __hook~#1 } { \prg_return_true: } { \prg_return_false: } } @@ -6041,7 +7270,7 @@ of this package available from CTAN} } \prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF } { - \exp_after:wN \__hook_clean_to_scan:w + \exp_after:wN \__hook_use_none_delimit_by_s_mark:w \if:w - \cs:w g__hook_#1_reversed_tl \cs_end: \s__hook_mark \prg_return_true: \else: @@ -6068,6 +7297,26 @@ of this package available from CTAN} } { \prg_return_false: } } +\IncludeInRelease{2023/06/01}{\__hook_if_cmd_hook:n} + {Hooks~with~args} +\prg_new_conditional:Npnn \__hook_if_cmd_hook:n #1 { T } + { \__hook_if_cmd_hook:w #1 / / / \s__hook_mark } +\cs_new:Npn \__hook_if_cmd_hook:w #1 / #2 / #3 / #4 \s__hook_mark + { + \if:w Y + \str_if_eq:nnF {#1} { cmd } { N } + \tl_if_exist:cF { c__hook_generic_#1/./#3_tl } { N } + Y + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\__hook_if_cmd_hook:n} + {Hooks~with~args} +\cs_undefine:N \__hook_if_cmd_hook:nT +\EndIncludeInRelease \prg_new_conditional:Npnn \__hook_if_generic_reversed:n #1 { T } { \__hook_if_generic_reversed:w #1 / / / \scan_stop: } \cs_new:Npn \__hook_if_generic_reversed:w #1 / #2 / #3 / #4 \scan_stop: @@ -6078,6 +7327,31 @@ of this package available from CTAN} \prg_return_false: \fi: } +\seq_new:N \g__hook_replacing_stack_seq +\cs_new:Npn \__hook_misused_if_replacing_args:nn #1 #2 + { + \msg_expandable_error:nnn { latex2e } { should-not-happen } + { Misused~\__hook_if_replacing_args:. } + } +\cs_new:Npn \__hook_if_replacing_args:TF + { \__hook_misused_if_replacing_args:nn } +\cs_new_protected:Npn \__hook_replacing_args_true: + { + \seq_gpush:No \g__hook_replacing_stack_seq + { \__hook_if_replacing_args:TF } + \cs_set:Npn \__hook_if_replacing_args:TF { \use_i:nn } + } +\cs_new_protected:Npn \__hook_replacing_args_false: + { + \seq_gpush:No \g__hook_replacing_stack_seq + { \__hook_if_replacing_args:TF } + \cs_set:Npn \__hook_if_replacing_args:TF { \use_ii:nn } + } +\cs_new_protected:Npn \__hook_replacing_args_reset: + { + \seq_gpop:NN \g__hook_replacing_stack_seq \l__hook_return_tl + \cs_gset_eq:NN \__hook_if_replacing_args:TF \l__hook_return_tl + } \prop_gput:Nnn \g_msg_module_type_prop { hooks } { LaTeX } \prop_gput:Nnn \g_msg_module_type_prop { latex2e } { LaTeX } \prop_gput:Nnn \g_msg_module_name_prop { latex2e } { kernel } @@ -6096,6 +7370,38 @@ of this package available from CTAN} { There~ already~ exists~ a~ hook~ declaration~ with~ this~ name.\\ Please~ use~ a~ different~ name~ for~ your~ hook.} +\IncludeInRelease{2023/06/01}{too-many-args} + {Hooks~with~args} +\msg_new:nnnn { hooks } { too-many-args } + { Too~many~arguments~for~hook~'#1'. } + { + You~tried~to~declare~a~hook~with~#2~arguments,~but~a~ + hook~can~only~have~up~to~nine.~LaTeX~will~define~this~ + hook~with~nine~arguments. + } +\msg_new:nnnn { hooks } { without-args } + { Hook~'#1'~has~no~arguments. } + { + You~tried~to~use~\iow_char:N\\#2WithArguments~ + on~a~hook~that~takes~no~arguments.\\ + Check~the~usage~of~the~hook~or~use~\iow_char:N\\#2~instead.\\ + \\ + LaTeX~will~use~\iow_char:N\\#2. + } +\msg_new:nnnn { hooks } { one-time-args } + { You~can't~have~arguments~in~used~one-time~hook~'#1'. } + { + You~tried~to~use~\iow_char:N\\#2WithArguments~ + on~a~one-time~hook~that~has~already~been~used.~ + You~have~to~add~the~code~before~the~hook~is~used,~ + or~add~the~code~without~arguments~using~\iow_char:N\\#2~instead.\\ + \\ + LaTeX~will~use~\iow_char:N\\#2. + } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{too-many-args} + {Hooks~with~args} +\EndIncludeInRelease \msg_new:nnnn { hooks } { hook-disabled } { Cannot~add~code~to~disabled~hook~'#1'. } { @@ -6190,24 +7496,61 @@ of this package available from CTAN} Generic~hook~'#1/#2/#3'~is~deprecated. \\ Use~hook~'#1/#3/#2'~instead. } -\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} } -\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} } -\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} } -\IncludeInRelease{2021/06/01}% - {\hook_activate_generic:n}{Providing~hooks} -\NewDocumentCommand \ActivateGenericHook { m }{ \hook_activate_generic:n {#1} } -\NewDocumentCommand \DisableGenericHook { m }{ \hook_disable_generic:n {#1} } -\EndIncludeInRelease -\IncludeInRelease{2020/10/01} - {\hook_activate_generic:n}{Providing~hooks} - -\def \ActivateGenericHook#1{} - -\EndIncludeInRelease +\NewDocumentCommand \NewHook { m } + { \hook_new:n {#1} } +\NewDocumentCommand \NewReversedHook { m } + { \hook_new_reversed:n {#1} } +\NewDocumentCommand \NewMirroredHookPair { mm } + { \hook_new_pair:nn {#1}{#2} } +\IncludeInRelease{2023/06/01}{\NewHookWithArguments} + {Hooks~with~args} +\NewDocumentCommand \NewHookWithArguments { mm } + { \hook_new_with_args:nn {#1} {#2} } +\NewDocumentCommand \NewReversedHookWithArguments { mm } + { \hook_new_reversed_with_args:nn {#1} {#2} } +\NewDocumentCommand \NewMirroredHookPairWithArguments { mmm } + { \hook_new_pair_with_args:nnn {#1} {#2} {#3} } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\NewHookWithArguments} + {Hooks~with~args} +\cs_new_protected:Npn \NewHookWithArguments #1 #2 { } +\cs_new_protected:Npn \NewReversedHookWithArguments #1 #2 { } +\cs_new_protected:Npn \NewMirroredHookPairWithArguments #1 #2 #3 { } +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\ActivateGenericHook} + {Providing~hooks} +\NewDocumentCommand \ActivateGenericHook { m } + { \hook_activate_generic:n {#1} } +\NewDocumentCommand \DisableGenericHook { m } + { \hook_disable_generic:n {#1} } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\ActivateGenericHook} + {Providing~hooks} +\def \ActivateGenericHook #1 { } +\def \DisableGenericHook #1 { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\AddToHookWithArguments} + {Hooks~with~args} \NewDocumentCommand \AddToHook { m o +m } { \hook_gput_code:nnn {#1} {#2} {#3} } +\NewDocumentCommand \AddToHookWithArguments { m o +m } + { \hook_gput_code_with_args:nnn {#1} {#2} {#3} } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\AddToHookWithArguments} + {Hooks~with~args} +\cs_new_protected:Npn \AddToHookWithArguments #1 #2 #3 { } +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\AddToHookNextWithArguments} + {Hooks~with~args} \NewDocumentCommand \AddToHookNext { m +m } { \hook_gput_next_code:nn {#1} {#2} } +\NewDocumentCommand \AddToHookNextWithArguments { m +m } + { \hook_gput_next_code_with_args:nn {#1} {#2} } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\AddToHookNextWithArguments} + {Hooks~with~args} +\cs_new_protected:Npn \AddToHookNextWithArguments #1 #2 { } +\EndIncludeInRelease \NewDocumentCommand \ClearHookNext { m } { \hook_gclear_next_code:n {#1} } \NewDocumentCommand \RemoveFromHook { m o } @@ -6224,8 +7567,18 @@ of this package available from CTAN} \str_gset:Nx \g_file_curr_name_str {#3} #1 #2 {#3} } +\IncludeInRelease{2023/06/01}{\UseHookWithArguments} + {Hooks~with~args} \cs_new:Npn \UseHook { \hook_use:n } \cs_new:Npn \UseOneTimeHook { \hook_use_once:n } +\cs_new:Npn \UseHookWithArguments { \hook_use:nnw } +\cs_new:Npn \UseOneTimeHookWithArguments { \hook_use_once:nnw } +\EndIncludeInRelease +\IncludeInRelease{2020/10/01}{\UseHookWithArguments} + {Hooks~with~args} +\cs_new:Npn \UseHookWithArguments #1 #2 { } +\cs_new:Npn \UseOneTimeHookWithArguments #1 #2 { } +\EndIncludeInRelease \cs_new_protected:Npn \ShowHook { \hook_show:n } \cs_new_protected:Npn \LogHook { \hook_log:n } \cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: } @@ -6313,8 +7666,8 @@ of this package available from CTAN} \__hook_initialize_all: \cs_new_eq:NN \@expl@@@hook@curr@name@pop@@ \__hook_curr_name_pop: -\IncludeInRelease{0000/00/00}% - {lthooks}{The~hook~management}% +\IncludeInRelease{0000/00/00}{lthooks} + {The~hook~management}% \def \NewHook#1{} \def \NewReversedHook#1{} @@ -6343,13 +7696,48 @@ of this package available from CTAN} \long\def \IfHookEmptyTF #1#2#3{#2} \EndModuleRelease +\cs:w __hook_rollback_tidying: \cs_end: +\bool_lazy_and:nnT + { \int_compare_p:nNn { \sourceLaTeXdate } > { 20230600 } } + { \int_compare_p:nNn { \requestedLaTeXdate } < { 20230601 } } + { + \cs_gset_protected:Npn \__hook_rollback_tidying: + { + \@latex@error { Rollback~code~executed~twice } + { + Something~went~wrong~(unless~this~was~ + done~on~purpose~in~a~testing~environment). + } + \use_none:nnnn + } + \cs_set:Npn \__hook_tmp:w #1 #2 + { + \__hook_tl_gset:cx { __hook#1~#2 } + { + \exp_args:No \exp_not:o + { + \cs:w __hook#1~#2 \exp_last_unbraced:Ne \cs_end: + { \__hook_braced_cs_parameter:n { __hook#1~#2 } } + } + } + } + \seq_map_inline:Nn \g__hook_all_seq + { + \exp_after:wN \cs_gset_nopar:Npn + \cs:w g__hook_#1_code_prop \exp_args:NNo \exp_args:No + \cs_end: { \cs:w g__hook_#1_code_prop \cs_end: } + \__hook_tmp:w { _toplevel } {#1} + \__hook_tmp:w { _next } {#1} + } + } \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% File: ltcmdhooks.dtx (C) Copyright 2020-2021 -%% Frank Mittelbach, Phelype Oleinik, LaTeX Team +%% File: ltcmdhooks.dtx +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, Phelype Oleinik, The LaTeX Project %%% From File: ltcmdhooks.dtx -\def\ltcmdhooksversion{v1.0f} -\def\ltcmdhooksdate{2021/10/20} +\def\ltcmdhooksversion{v1.0h} +\def\ltcmdhooksdate{2023/05/21} \ExplSyntaxOn \NewModuleRelease{2021/06/01}{ltcmdhooks} {The~hook~management~system~for~commands} @@ -6358,7 +7746,8 @@ of this package available from CTAN} \tl_new:N \l__hook_patch_prefixes_tl \tl_new:N \l__hook_param_text_tl \tl_new:N \l__hook_replace_text_tl -\tl_const:Nn \c__hook_hash_tl { # # } +\tl_const:Nn \c__hook_hash_tl { # } +\tl_const:Nn \c__hook_hashes_tl { # # } \cs_new_eq:NN \__hook_exp_not:NN ? \cs_new_eq:NN \__hook_def_cmd:w ? \quark_new:N \q__hook_recursion_tail @@ -6500,7 +7889,84 @@ of this package available from CTAN} \exp_args:NNc \__hook_patch_expand_redefine:NNnn \c_false_bool { \cs_to_str:N #1 ~ code } } +\IncludeInRelease{2023/06/01}{\__hook_patch_expand_redefine:NNnn} + {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_patch_expand_redefine:NNnn #1 #2 #3 #4 + { + \__hook_patch_debug:x { ++~command~can~be~patched~without~rescanning } + \int_set:Nn \l__hook_patch_num_args_int + { + \exp_args:Nf \str_count:n { \cs_argument_spec:N #2 } / 2 + \bool_if:NT #1 { -1 } + } + \int_compare:nNnTF { \l__hook_patch_num_args_int } > { \c_zero_int } + { + \tl_set:Nx \l__hook_tmpa_tl { \bool_if:NTF #1 { [ ] } { { } } } + \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } + { \tl_put_right:Nn \l__hook_tmpa_tl { { } } } + \exp_args:NNo \exp_args:No \__hook_if_has_hash:nTF + { \exp_after:wN #2 \l__hook_tmpa_tl } + { \cs_set_eq:NN \__hook_exp_not:n \exp_not:n } + { \cs_set_eq:NN \__hook_exp_not:n \use:n } + \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 + { + ##1 \l__hook_param_text_tl { \use:n ##2 } + ##1 \l__hook_replace_text_tl { \__hook_exp_not:n {##2} } + } + \bool_if:NTF #1 + { \__hook_tmp:w \tl_set:Nx { [ \c__hook_hashes_tl 1 ] } } + { \__hook_tmp:w \tl_set:Nx { { \c__hook_hashes_tl 1 } } } + \int_step_inline:nnn { 2 } { \l__hook_patch_num_args_int } + { \__hook_tmp:w \tl_put_right:Nx { { \c__hook_hashes_tl ##1 } } } + \tl_set:Nx \l__hook_replace_text_tl + { \exp_not:N #2 \exp_not:V \l__hook_replace_text_tl } + \tl_set:Nx \l__hook_replace_text_tl + { + \token_if_eq_meaning:NNTF \__hook_exp_not:n \exp_not:n + { \exp_args:NNV \exp_args:No \__hook_double_hashes:n } + { \exp_args:NV \exp_not:o } + \l__hook_replace_text_tl + } + \cs_set_eq:NN \__hook_def_cmd:w \tex_gdef:D + \cs_set_eq:NN \__hook_exp_not:NN \prg_do_nothing: + } + { + \tl_clear:N \l__hook_param_text_tl + \tl_set_eq:NN \l__hook_replace_text_tl #2 + \cs_set_eq:NN \__hook_def_cmd:w \tex_xdef:D + \cs_set:Npn \__hook_exp_not:NN ##1 { \exp_not:N ##1 \exp_not:N } + } + \group_begin: + \int_set:Nn \tex_escapechar:D { `\/ } + \use:x + { + \group_end: + \tl_set:Nx \exp_not:N \l__hook_patch_prefixes_tl + { \exp_not:N \__hook_make_prefixes:w \cs_prefix_spec:N #2 / / } + } + \__hook_disable:n { cmd / #3 / #4 } + \cs_undefine:c { c__hook_cmd / #3 / #4_parameter_tl } + \__hook_make_usable:nn { cmd / #3 / #4 } { \l__hook_patch_num_args_int } + \use:e + { + \__hook_redefine_with_hooks:Nnnn \exp_not:N #2 + \str_if_eq:nnTF {#4} { after } + { \use_ii_i:nn } + { \use:nn } + { { + \__hook_exp_not:NN \exp_not:N \UseHookWithArguments + { cmd / #3 / #4 } { \int_use:N \l__hook_patch_num_args_int } + \__hook_braced_parameter:n { cmd / #3 / #4 } + } } + { { } } + { \__hook_exp_not:NN \exp_not:V \l__hook_replace_text_tl } + } + \__hook_update_hook_code:n { cmd / #3 / #4 } + } +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\__hook_patch_expand_redefine:NNnn} + {cmd~hooks~with~args} +\cs_gset_protected:Npn \__hook_patch_expand_redefine:NNnn #1 #2 #3 #4 { \__hook_patch_debug:x { ++~command~can~be~patched~without~rescanning } \int_set:Nn \l__hook_patch_num_args_int @@ -6564,6 +8030,7 @@ of this package available from CTAN} { \__hook_exp_not:NN \exp_not:V \l__hook_replace_text_tl } } } +\EndIncludeInRelease \cs_new_protected:Npn \__hook_redefine_with_hooks:Nnnn #1 #2 #3 #4 { \l__hook_patch_prefixes_tl @@ -6611,7 +8078,11 @@ of this package available from CTAN} \if_meaning:w \q__hook_recursion_tail #1 \__hook_double_hashes_stop:w \fi: - \if_meaning:w \c__hook_hash_tl #1 + \if:w ? + \if_meaning:w \c__hook_hash_tl #1 ! \fi: + \if_meaning:w \c__hook_hashes_tl #1 ! \fi: + ? + \else: \use_i:nnnn \fi: \use:n @@ -6633,10 +8104,10 @@ of this package available from CTAN} { ~ \__hook_double_hashes:w } \cs_new_protected:Npn \__hook_retokenize_patch:Nnn #1 #2 #3 { - \__hook_patch_debug:x { ..~command~can~only~be~patched~by~rescanning } \str_if_eq:eeTF { \cs_argument_spec:N #1 } { } { \__hook_patch_expand_redefine:NNnn \c_false_bool #1 {#2} {#3} } { + \__hook_patch_debug:x { ..~command~can~only~be~patched~by~rescanning } \tl_set:Nx \l__hook_tmpa_tl { \int_compare:nNnTF { \char_value_catcode:n {`\@ } } = { 12 } @@ -6666,7 +8137,28 @@ of this package available from CTAN} } } } +\IncludeInRelease{2023/06/01}{\__hook_try_patch_with_catcodes:Nnnnw} + {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_try_patch_with_catcodes:Nnnnw #1 #2 #3 #4 + { + \quark_if_recursion_tail_stop_do:nn {#4} { \use:n } + \__hook_patch_debug:x { ++~trying~to~patch~by~retokenization } + \__hook_cmd_if_scanable:NnTF {#1} {#4} + { + \__hook_patch_debug:x { ++~macro~can~be~retokenized~cleanly } + \__hook_patch_debug:x { ==~retokenizing~macro~now } + \__hook_patch_retokenize:Nnnn #1 { cmd / #2 / #3 } {#3} {#4} + \use_i_delimit_by_q_recursion_stop:nw \use_none:n + } + { + \__hook_patch_debug:x { --~macro~cannot~be~retokenized~cleanly } + \__hook_try_patch_with_catcodes:Nnnnw #1 {#2} {#3} + } + } +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\__hook_try_patch_with_catcodes:Nnnnw} + {cmd~hooks~with~args} +\cs_gset_protected:Npn \__hook_try_patch_with_catcodes:Nnnnw #1 #2 #3 #4 { \quark_if_recursion_tail_stop_do:nn {#4} { \use:n } \__hook_patch_debug:x { ++~trying~to~patch~by~retokenization } @@ -6682,6 +8174,7 @@ of this package available from CTAN} \__hook_try_patch_with_catcodes:Nnnnw #1 {#2} {#3} } } +\EndIncludeInRelease \cs_new_eq:NN \kerneltmpDoNotUse ! \cs_new_protected:Npn \__hook_patch_required_catcodes: { @@ -6709,7 +8202,85 @@ of this package available from CTAN} { \prg_return_true: } { \prg_return_false: } } +\IncludeInRelease{2023/06/01}{\__hook_guess_arg_count:NN} + {cmd~hooks~with~args} +\cs_new_protected:Npn \__hook_guess_arg_count:NN #1 + { + \exp_after:wN \__hook_guess_arg_count:wN + \token_to_meaning:N #1 \s__hook_mark + } +\exp_last_unbraced:NNNNo +\cs_new_protected:Npx \__hook_guess_arg_count:wN + #1 { \tl_to_str:n { macro: } } #2 \s__hook_mark #3 + { + \int_set:Nn #3 + { + \exp_not:N \__hook_guess_arg_count:nw { 0 } #2 + \c_hash_str 0 \s__hook_mark + } + } +\use:e + { \cs_new:Npn \exp_not:N \__hook_guess_arg_count:nw #1 #2 \c_hash_str #3 } + { + \int_compare:nNnTF { #1 + 1 } = {#3} + { \__hook_guess_arg_count:nw {#3} } + { #1 \__hook_use_none_delimit_by_s_mark:w } + } +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\__hook_guess_arg_count:NN} + {cmd~hooks~with~args} +\cs_undefine:N \__hook_guess_arg_count:NN +\EndIncludeInRelease +\IncludeInRelease{2023/06/01}{\__hook_patch_retokenize:Nnnn} + {cmd~hooks~with~args} \cs_new_protected:Npn \__hook_patch_retokenize:Nnnn #1 #2 #3 #4 + { + \__hook_guess_arg_count:NN #1 \l__hook_patch_num_args_int + \__hook_disable:n {#2} + \cs_undefine:c { c__hook_#2_parameter_tl } + \__hook_make_usable:nn {#2} { \l__hook_patch_num_args_int } + \tl_set:Ne \l__hook_tmpa_tl + { \exp_args:Ne \tl_to_str:n { \__hook_braced_parameter:n {#2} } } + \use:x + { + \str_replace_all:Nnn \exp_not:N \l__hook_tmpa_tl + { #### } { \c_hash_str } + } + \cs_set_eq:NN \kerneltmpDoNotUse \scan_stop: + \cs_set_eq:NN \__hook_tmp:w \scan_stop: + \use:x + { + \cs_set:Npn \__hook_tmp:w + ####1 \tl_to_str:n { macro: } ####2 -> ####3 \s__hook_mark + { + ####1 \def \kerneltmpDoNotUse ####2 + { + \str_if_eq:nnT {#3} { before } + { + \token_to_str:N \UseHookWithArguments {#2} + { \int_use:N \l__hook_patch_num_args_int } + \l__hook_tmpa_tl + } + ####3 + \str_if_eq:nnT {#3} { after } + { + \token_to_str:N \UseHookWithArguments {#2} + { \int_use:N \l__hook_patch_num_args_int } + \l__hook_tmpa_tl + } + } + } + \tl_set:Nx \exp_not:N \l__hook_tmpa_tl + { \exp_not:N \__hook_tmp:w \token_to_meaning:N #1 \s__hook_mark } + } + \tl_rescan:nV { #4 \__hook_patch_required_catcodes: } \l__hook_tmpa_tl + \cs_gset_eq:NN #1 \kerneltmpDoNotUse + \__hook_update_hook_code:n {#2} + } +\EndIncludeInRelease +\IncludeInRelease{2021/06/01}{\__hook_patch_retokenize:Nnnn} + {cmd~hooks~with~args} +\cs_gset_protected:Npn \__hook_patch_retokenize:Nnnn #1 #2 #3 #4 { \cs_set_eq:NN \kerneltmpDoNotUse \scan_stop: \cs_set_eq:NN \__hook_tmp:w \scan_stop: @@ -6733,6 +8304,7 @@ of this package available from CTAN} \tl_rescan:nV { #4 \__hook_patch_required_catcodes: } \l__hook_tmpa_tl \cs_gset_eq:NN #1 \kerneltmpDoNotUse } +\EndIncludeInRelease \IncludeInRelease{2021/11/15}{wrong-cmd-hook}% {Standardise~generic~hook~names} \EndIncludeInRelease @@ -6819,10 +8391,12 @@ of this package available from CTAN} \let\@latex@note@no@line\@latex@info@no@line \EndIncludeInRelease %%% From File: ltpar.dtx -%% File: ltpara.dtx (C) Copyright 2020-2021 +%% File: ltpara.dtx +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, The LaTeX Project %%% From File: ltpara.dtx -\def\ltparaversion{v1.0k} -\def\ltparadate{2022/05/13} +\def\ltparaversion{v1.0l} +\def\ltparadate{2023/01/30} \ExplSyntaxOn @@ -6834,7 +8408,34 @@ of this package available from CTAN} \let \@kernel@before@para@begin \@empty \let \@kernel@after@para@end \@empty \let \@kernel@after@para@after \@empty +\IncludeInRelease{2023/06/01} + {\g__para_standard_everypar_tl}{minipage~ fix} \tl_new:N \g__para_standard_everypar_tl +\tl_gset:Nn \g__para_standard_everypar_tl { + \box_gset_to_last:N \g_para_indent_box + \group_begin: + \tex_par:D + \group_end: + \tex_everypar:D { \msg_error:nnnn { hooks }{ para-mode }{before}{vertical} } + \@kernel@before@para@before + \hook_use:n {para/before} + \group_begin: + \tex_everypar:D {} + \skip_set:Nn \tex_parskip:D + { \if@minipage -\tex_parskip:D \else: \c_zero_skip \fi: } + \tex_noindent:D + \group_end: + \tex_everypar:D{\g__para_standard_everypar_tl} + \@kernel@before@para@begin + \hook_use:n {para/begin} + \if_mode_horizontal: \else: + \msg_error:nnnn { hooks }{ para-mode }{begin}{vertical} \fi: + \__para_handle_indent: +} +\EndIncludeInRelease +\IncludeInRelease{2021/06/01} + {\g__para_standard_everypar_tl}{minipage~ fix} + \tl_gset:Nn \g__para_standard_everypar_tl { \box_gset_to_last:N \g_para_indent_box \group_begin: @@ -6855,6 +8456,14 @@ of this package available from CTAN} \msg_error:nnnn { hooks }{ para-mode }{begin}{vertical} \fi: \__para_handle_indent: } +\cs_set:Npn \__para_tmp:w #1#2#3#4#5 { } +\tl_gput_right:Nx \g__para_standard_everypar_tl { + \exp_not:N \the + \exp_not:N \toks + \exp_after:wN \__para_tmp:w \token_to_meaning:N \everypar + \c_space_tl +} +\EndIncludeInRelease \tex_everypar:D{\g__para_standard_everypar_tl} \newtoks \everypar @@ -6966,7 +8575,9 @@ of this package available from CTAN} \EndModuleRelease \ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% File: ltmeta.dtx (C) Copyright 2021, 2022 +%% File: ltmeta.dtx +%% Copyright (C) 2021-2023 +%% Frank Mittelbach, The LaTeX Project %%% From File: ltmeta.dtx \def\ltmetaversion{v1.0b} \def\ltmetadate{2022/05/18} @@ -7013,6 +8624,7 @@ of this package available from CTAN} \DeclareRobustCommand\linebreak{\@testopt{\@no@lnbk-}4} \DeclareRobustCommand\nolinebreak{\@testopt\@no@lnbk4} \DeclareRobustCommand\samepage{\interlinepenalty\@M + \predisplaypenalty\@M \postdisplaypenalty\@M \interdisplaylinepenalty\@M \@beginparpenalty\@M @@ -7401,6 +9013,7 @@ of this package available from CTAN} \global\let\do\noexpand \UseOneTimeHook{begindocument/end}% \ignorespaces} +\let\do\noexpand \NewHook{begindocument} \NewHook{begindocument/before} \NewHook{begindocument/end} @@ -7757,9 +9370,32 @@ of this package available from CTAN} \fi \reserved@a} +\EndIncludeInRelease +\IncludeInRelease{2023/05/01}% + {\IfFileExists@}{IfFileExists} +\long\def \IfFileExists@#1#2#3{% + \edef\@filef@und{\IfFileExists@@{#1}}% + \ifx\@filef@und\@empty + \if\relax\detokenize{#1}\relax + \let\reserved@a\@firstoftwo + \def\@filef@und{".tex" }% + \else + \let\reserved@a\@secondoftwo + \fi + \else + \let\reserved@a\@firstoftwo + \edef\@filef@und{"\@filef@und" }% + \fi + \expandafter\def\expandafter\reserved@a + \expandafter{\reserved@a{#2}{#3}}% +\reserved@a} +\ExplSyntaxOn +\cs_new_eq:NN \IfFileExists@@ \file_full_name:n +\ExplSyntaxOff \EndIncludeInRelease \IncludeInRelease{2021/06/01}% - {\IfFileExists@}{manage unbalanced conditionals} + {\IfFileExists@}{IfFileExists} + \long\def \IfFileExists@#1#2#3{% \openin\@inputcheck"#1" % \ifeof\@inputcheck @@ -7776,9 +9412,11 @@ of this package available from CTAN} \expandafter\def\expandafter\reserved@a \expandafter{\reserved@a{#2}{#3}}% \reserved@a} +\let\IfFileExists@@\@undefined \EndIncludeInRelease + \IncludeInRelease{2019/10/01}% - {\IfFileExists@}{manage unbalanced conditionals} + {\IfFileExists@}{IfFileExists} \long\def \IfFileExists@#1#2#3{% \openin\@inputcheck"#1" % @@ -7796,7 +9434,7 @@ of this package available from CTAN} \reserved@a} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% - {\IfFileExists@}{manage unbalanced conditionals} + {\IfFileExists@}{IfFileExists} \let\IfFileExists@\@undefined @@ -11328,11 +12966,58 @@ of this package available from CTAN} %%% From File: ltpageno.dtx %%% From File: ltxref.dtx +\IncludeInRelease{2023/06/01}% + {\@kernel@sref}{store five arguments}% +\def\@setref#1#2#3{% + \ifx#1\relax + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{Reference `#3' on page \thepage \space + undefined}% + \else + \expandafter#2#1\@empty\@empty\@empty\null + \fi} +\long\def\@firstoffive#1#2#3#4#5{#1} +\long\def\@secondoffive#1#2#3#4#5{#2} +\def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}} +\def\@kernel@spageref#1{\expandafter\@setref\csname r@#1\endcsname + \@secondoffive{#1}} +\EndIncludeInRelease \IncludeInRelease{2022/06/01}% - {\ref}{Add starred reference commands}% + {\@kernel@sref}{store five arguments}% +\def\@setref#1#2#3{% + \ifx#1\relax + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{Reference `#3' on page \thepage \space + undefined}% + \else + \expandafter#2#1\null + \fi} +\let\@firstoffive\undefined +\let\@secondoffive\undefined \def\@kernel@sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}} \def\@kernel@spageref#1{\expandafter\@setref\csname r@#1\endcsname \@secondoftwo{#1}} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\@kernel@sref}{store five arguments}% +\def\@setref#1#2#3{% + \ifx#1\relax + \protect\G@refundefinedtrue + \nfss@text{\reset@font\bfseries ??}% + \@latex@warning{Reference `#3' on page \thepage \space + undefined}% + \else + \expandafter#2#1\null + \fi} +\let\@firstoffive\undefined +\let\@secondoffive\undefined +\let\@kernel@sref\undefined +\let\@kernel@spageref\undefined +\EndIncludeInRelease +\IncludeInRelease{2022/06/01}% + {\ref}{Add starred reference commands}% \let\@kernel@ref\@kernel@sref \let\@kernel@pageref\@kernel@spageref \NewDocumentCommand\ref{s} @@ -11351,6 +13036,21 @@ of this package available from CTAN} \@secondoftwo{#1}} \EndIncludeInRelease +\IncludeInRelease{2023/06/01}% + {\label}{store five label arguments}% +\providecommand\@currentlabelname{} +\providecommand\@currentHref{} +\providecommand\@kernel@reserved@label@data{} +\NewHookWithArguments{label}{1} +\def\label#1{\@bsphack + \begingroup + \UseHookWithArguments{label}{1}{#1}% + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\@currentlabel}{\thepage}% + {\@currentlabelname}{\@currentHref}{\@kernel@reserved@label@data}}}% + \endgroup + \@esphack} +\EndIncludeInRelease \IncludeInRelease{2022/06/01}% {\Ref}{Add starred version}% \def\@currentcounter{} @@ -11367,6 +13067,16 @@ of this package available from CTAN} \NewDocumentCommand\Ref{s} {\IfBooleanTF{#1}{\@kernel@sRef}{\@kernel@Ref}} \EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\label}{store five label arguments}% +\let\@currenttitle\@undefined +\let\@currenttarget\@undefined +\let\@kernel@currentdata\@undefined +\def\label#1{\@bsphack + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}% + \@esphack} +\EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\Ref}{Add starred version}% \def\@currentcounter{} @@ -11432,6 +13142,13 @@ of this package available from CTAN} \NewHook{enddocument/end} \AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} \AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} +\AddToHook{enddocument/info}[kernel/release]{% + \let\show@release@info\wlog + \show@release@info{ ***********}% + \the\LaTeXReleaseInfo + \show@release@info{ ***********}} + +\DeclareHookRule{enddocument/info}{kernel/release}{before}{kernel/filelist} \DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings} \def\@enddocument@kernel@warnings{% \ifdim \font@submax >\fontsubfuzz\relax @@ -12047,6 +13764,18 @@ of this package available from CTAN} \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}% } \EndIncludeInRelease +\IncludeInRelease{2023/06/01}% + {\eqno}{add ignorespaces to eqno}% +\let\@kernel@eqno\eqno +\let\@kernel@leqno\leqno +\protected\def\eqno{\@kernel@eqno\aftergroup\ignorespaces} +\protected\def\leqno{\@kernel@leqno\aftergroup\ignorespaces} +\EndIncludeInRelease +\IncludeInRelease{0000/00/00}% + {\eqno}{add ignorespaces to eqno}% +\let\eqno\@kernel@eqno +\let\leqno\@kernel@leqno +\EndIncludeInRelease %%% From File: ltlists.dtx %%% From File: ltboxes.dtx \IncludeInRelease{2015/01/01}% @@ -13393,7 +15122,9 @@ of this package available from CTAN} \@esphack} \EndIncludeInRelease -%% File: ltmarks.dtx (C) Copyright 2022 +%% File: ltmarks.dtx +%% Copyright (C) 2022-2023 +%% Frank Mittelbach, The LaTeX Project %%% From File: ltmarks.dtx \def\ltmarksversion{v1.0d} \def\ltmarksdate{2022/06/01} @@ -13880,12 +15611,14 @@ of this package available from CTAN} \def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \let\IfPackageAtLeastTF\@ifpackagelater \let\IfClassAtLeastTF\@ifclasslater +\def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} \EndIncludeInRelease \IncludeInRelease{0000/00/00}% {\IfFormatAtLeastTF}{Test format date}% \def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \let\IfPackageAtLeastTF\@ifpackagelater \let\IfClassAtLeastTF\@ifclasslater +\def\IfFileAtLeastTF#1{\expandafter\@ifl@t@r\csname ver@#1\endcsname} \EndIncludeInRelease \IncludeInRelease{2018/04/01}% {\@ifl@t@r}{Guard against bad input}% @@ -14312,7 +16045,7 @@ of this package available from CTAN} \EndIncludeInRelease \IncludeInRelease{2020/10/01}% {\@onefilewithoptions}{Hooks and unused options issue}% -\def\@onefilewithoptions#1[#2][#3]#4{% +\def\load@onefilewithoptions#1[#2][#3]#4{% \@expl@@@filehook@set@curr@file@@nNN{#1.#4}\reserved@a\reserved@b \edef\reserved@c{\def\noexpand\reserved@c####1% \detokenize\expandafter{\expanded{.#4}}% @@ -14535,7 +16268,7 @@ of this package available from CTAN} \csname filec@ntents@\reserved@a\endcsname \else \@latex@error{Unknown filecontents option \reserved@a}% - {Valid options are force (or overwrite), nosearch, noheader}% + {Valid options are force (or overwrite), nosearch, noheader, nowarn}% \fi}% \filec@ntents } @@ -14547,6 +16280,10 @@ of this package available from CTAN} \def\filec@ntents@where{in current directory}} \let\filec@ntents@checkdir\@empty \def\filec@ntents@where{exists on the system} +\def\filec@ntents@nowarn{% + \let\filec@ntents@warning\@latex@note@no@line +} +\let\filec@ntents@warning\@latex@warning@no@line \begingroup% \@tempcnta=1 \loop @@ -14591,8 +16328,8 @@ of this package available from CTAN} write to the file you are reading from!\MessageBreak% Data is written to screen instead.}% \else% - \@latex@warning@no@line% - {Writing or overwriting file `\@currdir\@curr@file'}% + \filec@ntents@warning% + {Writing or overwriting file `\@curr@file'}% \immediate\openout\reserved@c\q@curr@file\relax% \fi% \fi% @@ -14871,8 +16608,8 @@ of this package available from CTAN} \endgroup% \EndIncludeInRelease %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0n} -\providecommand\ltfilehookdate{2022/08/18} +\providecommand\ltfilehookversion{v1.0o} +\providecommand\ltfilehookdate{2023/04/02} \IncludeInRelease{2020/10/01}% {\CurrentFile}{Hook management file}% \ExplSyntaxOn @@ -15211,7 +16948,7 @@ of this package available from CTAN} \def\@kernel@make@file@csname#1#2#3{% \xdef#1{\expandafter\@set@curr@file@aux \csname\expandafter#2\@firstofone#3\@nil\endcsname}} -\def\@set@curr@file@aux#1{% +\long\def\@set@curr@file@aux#1{% \expandafter\ifx\csname\endcsname#1% .tex\else\string#1\fi} \def\@filehook@set@CurrentFile{% @@ -15356,12 +17093,12 @@ of this package available from CTAN} \EndIncludeInRelease %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%% Copyright (C) 2020-2022 -%% Frank Mittelbach, LaTeX Team +%% Copyright (C) 2020-2023 +%% Frank Mittelbach, The LaTeX Project %% %%% From File: ltshipout.dtx -\providecommand\ltshipoutversion{v1.0m} -\providecommand\ltshipoutdate{2022/08/26} +\providecommand\ltshipoutversion{v1.0n} +\providecommand\ltshipoutdate{2022/11/08} \IncludeInRelease{2020/10/01}% {\shipout}{Hook management (shipout)}% \ExplSyntaxOn @@ -15477,6 +17214,7 @@ of this package available from CTAN} \bool_gset_true:N \g__shipout_lastpage_handled_bool } } + \hook_use:n {shipout} \__shipout_finalize_box: \cs_set_eq:NN \protect \exp_not:N \tex_shipout:D \box_use:N \l_shipout_box @@ -15508,6 +17246,7 @@ of this package available from CTAN} \cs_gset_eq:NN \RawShipout \__shipout_execute_raw: \cs_new_eq:NN \__shipout_saved_protect: \protect \hook_new:n{shipout/before} +\hook_new:n{shipout} \hook_new:n{shipout/after} \hook_new:n{shipout/foreground} \hook_new:n{shipout/background} @@ -17139,6 +18878,7 @@ of this package available from CTAN} } \tl_clear:N \l__latexrelease_restores_tl \msg_redirect_name:nnn { hooks } { exists } { } +\msg_redirect_name:nnn { mark } { class-already-defined } { } \ExplSyntaxOff}% \endinput %% diff --git a/Master/texmf-dist/tex/latex/base/latexsym.sty b/Master/texmf-dist/tex/latex/base/latexsym.sty index d73a74a9c92..caf99f3261e 100644 --- a/Master/texmf-dist/tex/latex/base/latexsym.sty +++ b/Master/texmf-dist/tex/latex/base/latexsym.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin1.def b/Master/texmf-dist/tex/latex/base/latin1.def index 120d9721fe0..3d590fd3327 100644 --- a/Master/texmf-dist/tex/latex/base/latin1.def +++ b/Master/texmf-dist/tex/latex/base/latin1.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin10.def b/Master/texmf-dist/tex/latex/base/latin10.def index f4241d8c027..f2432ee2564 100644 --- a/Master/texmf-dist/tex/latex/base/latin10.def +++ b/Master/texmf-dist/tex/latex/base/latin10.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin2.def b/Master/texmf-dist/tex/latex/base/latin2.def index b547a325c11..5cb4d0b0103 100644 --- a/Master/texmf-dist/tex/latex/base/latin2.def +++ b/Master/texmf-dist/tex/latex/base/latin2.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin3.def b/Master/texmf-dist/tex/latex/base/latin3.def index 4ae99149208..14fc3e8c4f6 100644 --- a/Master/texmf-dist/tex/latex/base/latin3.def +++ b/Master/texmf-dist/tex/latex/base/latin3.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin4.def b/Master/texmf-dist/tex/latex/base/latin4.def index b6add411489..af250e609d7 100644 --- a/Master/texmf-dist/tex/latex/base/latin4.def +++ b/Master/texmf-dist/tex/latex/base/latin4.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin5.def b/Master/texmf-dist/tex/latex/base/latin5.def index 45bf0918e60..f59d6edd80b 100644 --- a/Master/texmf-dist/tex/latex/base/latin5.def +++ b/Master/texmf-dist/tex/latex/base/latin5.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/latin9.def b/Master/texmf-dist/tex/latex/base/latin9.def index ef314108513..487a339844a 100644 --- a/Master/texmf-dist/tex/latex/base/latin9.def +++ b/Master/texmf-dist/tex/latex/base/latin9.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/lcyenc.dfu b/Master/texmf-dist/tex/latex/base/lcyenc.dfu index 94694168669..ea2bea8743b 100644 --- a/Master/texmf-dist/tex/latex/base/lcyenc.dfu +++ b/Master/texmf-dist/tex/latex/base/lcyenc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/leqno.clo b/Master/texmf-dist/tex/latex/base/leqno.clo index cac53d6e890..ab6956249ec 100644 --- a/Master/texmf-dist/tex/latex/base/leqno.clo +++ b/Master/texmf-dist/tex/latex/base/leqno.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/leqno.sty b/Master/texmf-dist/tex/latex/base/leqno.sty index 9d2d65de04b..30106d69337 100644 --- a/Master/texmf-dist/tex/latex/base/leqno.sty +++ b/Master/texmf-dist/tex/latex/base/leqno.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/letter.cls b/Master/texmf-dist/tex/latex/base/letter.cls index 9207cf32505..f926d90218d 100644 --- a/Master/texmf-dist/tex/latex/base/letter.cls +++ b/Master/texmf-dist/tex/latex/base/letter.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/letter.sty b/Master/texmf-dist/tex/latex/base/letter.sty index 87953c9e372..3eb254e230d 100644 --- a/Master/texmf-dist/tex/latex/base/letter.sty +++ b/Master/texmf-dist/tex/latex/base/letter.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ltluatex.lua b/Master/texmf-dist/tex/latex/base/ltluatex.lua index 1565ae7d19d..5573fc75636 100644 --- a/Master/texmf-dist/tex/latex/base/ltluatex.lua +++ b/Master/texmf-dist/tex/latex/base/ltluatex.lua @@ -13,7 +13,7 @@ -- (but please observe conditions on bug reports sent to that address!) -- -- --- Copyright (C) 2015-2022 +-- Copyright (C) 2015-2023 -- The LaTeX Project and any individual authors listed elsewhere -- in this file. -- @@ -45,7 +45,6 @@ luatexbase = luatexbase or { } local luatexbase = luatexbase local string_gsub = string.gsub local tex_count = tex.count -local tex_setattribute = tex.setattribute local tex_setcount = tex.setcount local texio_write_nl = texio.write_nl local flush_list = node.flush_list diff --git a/Master/texmf-dist/tex/latex/base/ltluatex.tex b/Master/texmf-dist/tex/latex/base/ltluatex.tex index dc356201b06..ddef389f103 100644 --- a/Master/texmf-dist/tex/latex/base/ltluatex.tex +++ b/Master/texmf-dist/tex/latex/base/ltluatex.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -47,7 +47,7 @@ #1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}} \fi \ProvidesFile{ltluatex.tex}% -[2022/10/03 v1.2a +[2023/01/19 v1.2b LuaTeX support for plain TeX (core) ] \edef\etatcatcode{\the\catcode`\@} diff --git a/Master/texmf-dist/tex/latex/base/ltnews.cls b/Master/texmf-dist/tex/latex/base/ltnews.cls index 9271b56f1c6..45ee3664d11 100644 --- a/Master/texmf-dist/tex/latex/base/ltnews.cls +++ b/Master/texmf-dist/tex/latex/base/ltnews.cls @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1993-2020 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % @@ -41,7 +41,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{ltnews}[2017/12/13 v1.06 Standard LaTeX class] +\ProvidesClass{ltnews}[2023/05/28 v1.08 Standard LaTeX class] % The configuration file, used for passing options. @@ -429,6 +429,30 @@ \newcommand{\@year}{\ClassError{ltnews} {No \protect\publicationyear~given}\@eha} +\newcommand{\publicationday}{\renewcommand{\@day}} +\newcommand{\@day}{01} % most releases happen on 1st of a month + +\newcommand{\publicationdate}{% + % support draft ltnews, \publicationyear{2023 --- DRAFT ...} + \expandafter\@gobblenonyear\@year\@nil + -\@julianmonthtonum\@month-\two@digits\@day} + +\newcommand{\@julianmonthtonum}[1]{\@nameuse{@juliantonum#1}} +\def\@juliantonumJanuary {01} +\def\@juliantonumFebruary {02} +\def\@juliantonumMarch {03} +\def\@juliantonumApril {04} +\def\@juliantonumMay {05} +\def\@juliantonumJune {06} +\def\@juliantonumJuly {07} +\def\@juliantonumAugust {08} +\def\@juliantonumSeptember{09} +\def\@juliantonumOctober {10} +\def\@juliantonumNovember {11} +\def\@juliantonumDecember {12} + +\long\def\@gobblenonyear#1#2#3#4#5\@nil{#1#2#3#4} + \newcommand{\publicationissue}{\renewcommand{\@issue}} \newcommand{\@issue}{\ClassError{ltnews} {No \protect\publicationissue~given}\@eha} @@ -449,7 +473,8 @@ \twocolumn[{% \parbox[t][7\baselineskip]{\textwidth}{% \@titlefont\@title\\[\medskipamount] - \normalfont\normalsize\issuename~\@issue, \@month~\@year + \normalfont\normalsize\issuename~\@issue, + \@month~\@year~(\LaTeX\ release \publicationdate)% }% }]% \thispagestyle{titlepage} @@ -494,6 +519,17 @@ {1sp}{\@subheadingfont}% } + +% suggestion by Karl Berry (not integrated (yet)) + +\newcommand{\ltnewssectformat}{% + \@headingfont + \frenchspacing + \raggedright + \hyphenpenalty=10000 + \exhyphenpenalty=10000 +} + % No section numbers. \setcounter{secnumdepth}{0} diff --git a/Master/texmf-dist/tex/latex/base/ltxcheck.tex b/Master/texmf-dist/tex/latex/base/ltxcheck.tex index 7f4b925b79f..d219d2ebc2c 100644 --- a/Master/texmf-dist/tex/latex/base/ltxcheck.tex +++ b/Master/texmf-dist/tex/latex/base/ltxcheck.tex @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2022 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % diff --git a/Master/texmf-dist/tex/latex/base/ltxdoc.cfg b/Master/texmf-dist/tex/latex/base/ltxdoc.cfg index 84131c3da6a..839bfc8e117 100644 --- a/Master/texmf-dist/tex/latex/base/ltxdoc.cfg +++ b/Master/texmf-dist/tex/latex/base/ltxdoc.cfg @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ltxdoc.cls b/Master/texmf-dist/tex/latex/base/ltxdoc.cls index 9cf4c034c5f..acdbdc2ec58 100644 --- a/Master/texmf-dist/tex/latex/base/ltxdoc.cls +++ b/Master/texmf-dist/tex/latex/base/ltxdoc.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -43,13 +43,16 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltxdoc} - [2022/06/22 v2.1i Standard LaTeX documentation class] + [2023/03/28 v2.1j Standard LaTeX documentation class] \DeclareOption{a5paper}{\@latexerr{Option not supported}% {}} \newif\ifltxdoc@load@cfg@ \ltxdoc@load@cfg@true \DeclareOption{nocfg}{\ltxdoc@load@cfg@false} \let\ltxdoc@doc@version\@empty % use current version by default -\DeclareOption{doc2}{\def\ltxdoc@doc@version{=v2}} +\DeclareOption{doc2}{% + \def\ltxdoc@doc@version{=v2}% + \DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}% +} \DeclareOption*{% \PassOptionsToClass {\CurrentOption}{article}} \ProcessOptions diff --git a/Master/texmf-dist/tex/latex/base/ltxguide.cls b/Master/texmf-dist/tex/latex/base/ltxguide.cls index b743fd9cdae..778f7e993e8 100644 --- a/Master/texmf-dist/tex/latex/base/ltxguide.cls +++ b/Master/texmf-dist/tex/latex/base/ltxguide.cls @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1993-2019 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % diff --git a/Master/texmf-dist/tex/latex/base/ly1enc.dfu b/Master/texmf-dist/tex/latex/base/ly1enc.dfu index 28a68ce14f0..bd5ee53ebc4 100644 --- a/Master/texmf-dist/tex/latex/base/ly1enc.dfu +++ b/Master/texmf-dist/tex/latex/base/ly1enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/macce.def b/Master/texmf-dist/tex/latex/base/macce.def index e5c22b74610..5746e89a40a 100644 --- a/Master/texmf-dist/tex/latex/base/macce.def +++ b/Master/texmf-dist/tex/latex/base/macce.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/makeidx.sty b/Master/texmf-dist/tex/latex/base/makeidx.sty index 16a1db6ab56..f1579601083 100644 --- a/Master/texmf-dist/tex/latex/base/makeidx.sty +++ b/Master/texmf-dist/tex/latex/base/makeidx.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/minimal.cls b/Master/texmf-dist/tex/latex/base/minimal.cls index 9024a23bca7..89c233c30f3 100644 --- a/Master/texmf-dist/tex/latex/base/minimal.cls +++ b/Master/texmf-dist/tex/latex/base/minimal.cls @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1993-2019 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % diff --git a/Master/texmf-dist/tex/latex/base/newlfont.sty b/Master/texmf-dist/tex/latex/base/newlfont.sty index f15202c9a07..79b4a8b7d9f 100644 --- a/Master/texmf-dist/tex/latex/base/newlfont.sty +++ b/Master/texmf-dist/tex/latex/base/newlfont.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/next.def b/Master/texmf-dist/tex/latex/base/next.def index 0fdc2a5350a..760aaccd81e 100644 --- a/Master/texmf-dist/tex/latex/base/next.def +++ b/Master/texmf-dist/tex/latex/base/next.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/nfssfont.tex b/Master/texmf-dist/tex/latex/base/nfssfont.tex index 2dd193aeeba..b0c10491eac 100644 --- a/Master/texmf-dist/tex/latex/base/nfssfont.tex +++ b/Master/texmf-dist/tex/latex/base/nfssfont.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/oldlfont.sty b/Master/texmf-dist/tex/latex/base/oldlfont.sty index 60c4d56ae74..04a08c4b738 100644 --- a/Master/texmf-dist/tex/latex/base/oldlfont.sty +++ b/Master/texmf-dist/tex/latex/base/oldlfont.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/omlcmm.fd b/Master/texmf-dist/tex/latex/base/omlcmm.fd index 329e1cb193d..2adb5587cc9 100644 --- a/Master/texmf-dist/tex/latex/base/omlcmm.fd +++ b/Master/texmf-dist/tex/latex/base/omlcmm.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{omlcmm.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OML}{cmm}{\skewchar\font127 } \DeclareFontShape{OML}{cmm}{m}{it}% {<5><6><7><8><9>gen*cmmi% diff --git a/Master/texmf-dist/tex/latex/base/omlcmr.fd b/Master/texmf-dist/tex/latex/base/omlcmr.fd index 34a6edab171..2d2d5b39c9d 100644 --- a/Master/texmf-dist/tex/latex/base/omlcmr.fd +++ b/Master/texmf-dist/tex/latex/base/omlcmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{omlcmr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OML}{cmr}{\skewchar\font127 } \DeclareFontShape{OML}{cmr}{m}{n}% {<->ssub*cmm/m/it}{} diff --git a/Master/texmf-dist/tex/latex/base/omlenc.def b/Master/texmf-dist/tex/latex/base/omlenc.def index a3f09a94301..3f7c8183450 100644 --- a/Master/texmf-dist/tex/latex/base/omlenc.def +++ b/Master/texmf-dist/tex/latex/base/omlenc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/omllcmm.fd b/Master/texmf-dist/tex/latex/base/omllcmm.fd index 6321c690539..7a9d2fe5891 100644 --- a/Master/texmf-dist/tex/latex/base/omllcmm.fd +++ b/Master/texmf-dist/tex/latex/base/omllcmm.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/omscmr.fd b/Master/texmf-dist/tex/latex/base/omscmr.fd index 35be157bd6b..43181585fd9 100644 --- a/Master/texmf-dist/tex/latex/base/omscmr.fd +++ b/Master/texmf-dist/tex/latex/base/omscmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{omscmr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OMS}{cmr}{\skewchar\font48 } \DeclareFontShape{OMS}{cmr}{m}{n}% {<->ssub*cmsy/m/n}{} diff --git a/Master/texmf-dist/tex/latex/base/omscmsy.fd b/Master/texmf-dist/tex/latex/base/omscmsy.fd index 696a1cd9942..ce660e5add9 100644 --- a/Master/texmf-dist/tex/latex/base/omscmsy.fd +++ b/Master/texmf-dist/tex/latex/base/omscmsy.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{omscmsy.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OMS}{cmsy}{\skewchar\font48 } \DeclareFontShape{OMS}{cmsy}{m}{n}{% <5><6><7><8><9><10>gen*cmsy% diff --git a/Master/texmf-dist/tex/latex/base/omsenc.def b/Master/texmf-dist/tex/latex/base/omsenc.def index cd8e0b9a183..715ade1b848 100644 --- a/Master/texmf-dist/tex/latex/base/omsenc.def +++ b/Master/texmf-dist/tex/latex/base/omsenc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/omsenc.dfu b/Master/texmf-dist/tex/latex/base/omsenc.dfu index 0e2e5c93a10..94376b83d47 100644 --- a/Master/texmf-dist/tex/latex/base/omsenc.dfu +++ b/Master/texmf-dist/tex/latex/base/omsenc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/omslcmsy.fd b/Master/texmf-dist/tex/latex/base/omslcmsy.fd index 2373069d3e1..eefcd4808d1 100644 --- a/Master/texmf-dist/tex/latex/base/omslcmsy.fd +++ b/Master/texmf-dist/tex/latex/base/omslcmsy.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/omxcmex.fd b/Master/texmf-dist/tex/latex/base/omxcmex.fd index 2f3fa1342fe..24bf1415563 100644 --- a/Master/texmf-dist/tex/latex/base/omxcmex.fd +++ b/Master/texmf-dist/tex/latex/base/omxcmex.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{omxcmex.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OMX}{cmex}{} \DeclareFontShape{OMX}{cmex}{m}{n}{% <->sfixed*cmex10% diff --git a/Master/texmf-dist/tex/latex/base/omxlcmex.fd b/Master/texmf-dist/tex/latex/base/omxlcmex.fd index 9cff2309ae0..a6421af7225 100644 --- a/Master/texmf-dist/tex/latex/base/omxlcmex.fd +++ b/Master/texmf-dist/tex/latex/base/omxlcmex.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/openbib.sty b/Master/texmf-dist/tex/latex/base/openbib.sty index 97b1d644082..9f8eadf4e7a 100644 --- a/Master/texmf-dist/tex/latex/base/openbib.sty +++ b/Master/texmf-dist/tex/latex/base/openbib.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmdh.fd b/Master/texmf-dist/tex/latex/base/ot1cmdh.fd index 2ad840921f1..4436c6fc885 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmdh.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmdh.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmdh.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmdh}{\hyphenchar\font45 } \DeclareFontShape{OT1}{cmdh}{m}{n}{% <10>cmdunh10% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmfib.fd b/Master/texmf-dist/tex/latex/base/ot1cmfib.fd index 31a94988252..21ad4c9adfd 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmfib.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmfib.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmfib.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmfib}{\hyphenchar\font45 } \DeclareFontShape{OT1}{cmfib}{m}{n}{% <8>cmfib8% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmfr.fd b/Master/texmf-dist/tex/latex/base/ot1cmfr.fd index 378a07d8670..c1be1c7b4b6 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmfr.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmfr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmfr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmfr}{\hyphenchar\font45 } \DeclareFontShape{OT1}{cmfr}{m}{n}{% <10>cmff10% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmr.fd b/Master/texmf-dist/tex/latex/base/ot1cmr.fd index a79e2b366f2..21b00587b82 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmr.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmr}{\hyphenchar\font45 } \DeclareFontShape{OT1}{cmr}{m}{n}% {<5><6><7><8><9><10><12>gen*cmr% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmss.fd b/Master/texmf-dist/tex/latex/base/ot1cmss.fd index 891c4f46c44..48efc3c4095 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmss.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmss.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmss}{\hyphenchar\font45 } \DeclareFontShape{OT1}{cmss}{m}{n} {% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmtt.fd b/Master/texmf-dist/tex/latex/base/ot1cmtt.fd index 02f080ce517..1e282033c77 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmtt.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmtt}{\hyphenchar \font\m@ne} \DeclareFontShape{OT1}{cmtt}{m}{n} {% diff --git a/Master/texmf-dist/tex/latex/base/ot1cmvtt.fd b/Master/texmf-dist/tex/latex/base/ot1cmvtt.fd index bf485c7e1d7..e3cb859356e 100644 --- a/Master/texmf-dist/tex/latex/base/ot1cmvtt.fd +++ b/Master/texmf-dist/tex/latex/base/ot1cmvtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ot1cmvtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{OT1}{cmvtt}{\hyphenchar\font45 } \DeclareFontShape{OT1}{cmvtt}{m}{n}% {% diff --git a/Master/texmf-dist/tex/latex/base/ot1enc.def b/Master/texmf-dist/tex/latex/base/ot1enc.def index 5232a26c1d1..74c03d042cd 100644 --- a/Master/texmf-dist/tex/latex/base/ot1enc.def +++ b/Master/texmf-dist/tex/latex/base/ot1enc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ot1enc.dfu b/Master/texmf-dist/tex/latex/base/ot1enc.dfu index 5cb0f7098a2..dd66ba8ea46 100644 --- a/Master/texmf-dist/tex/latex/base/ot1enc.dfu +++ b/Master/texmf-dist/tex/latex/base/ot1enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ot1lcmss.fd b/Master/texmf-dist/tex/latex/base/ot1lcmss.fd index 49131029e53..ef45664e15d 100644 --- a/Master/texmf-dist/tex/latex/base/ot1lcmss.fd +++ b/Master/texmf-dist/tex/latex/base/ot1lcmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ot1lcmtt.fd b/Master/texmf-dist/tex/latex/base/ot1lcmtt.fd index 16dcda30472..09dbc0e2f5e 100644 --- a/Master/texmf-dist/tex/latex/base/ot1lcmtt.fd +++ b/Master/texmf-dist/tex/latex/base/ot1lcmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ot2enc.dfu b/Master/texmf-dist/tex/latex/base/ot2enc.dfu index 7bc71b4ee0b..0d072070b5b 100644 --- a/Master/texmf-dist/tex/latex/base/ot2enc.dfu +++ b/Master/texmf-dist/tex/latex/base/ot2enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ot4enc.def b/Master/texmf-dist/tex/latex/base/ot4enc.def index 6c356a0236e..c93fd6c847f 100644 --- a/Master/texmf-dist/tex/latex/base/ot4enc.def +++ b/Master/texmf-dist/tex/latex/base/ot4enc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/preload.cfg b/Master/texmf-dist/tex/latex/base/preload.cfg index 6cf4ffa63bc..a62c45d74d1 100644 --- a/Master/texmf-dist/tex/latex/base/preload.cfg +++ b/Master/texmf-dist/tex/latex/base/preload.cfg @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/preload.ltx b/Master/texmf-dist/tex/latex/base/preload.ltx index f47c071359e..301b8314502 100644 --- a/Master/texmf-dist/tex/latex/base/preload.ltx +++ b/Master/texmf-dist/tex/latex/base/preload.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/proc.cls b/Master/texmf-dist/tex/latex/base/proc.cls index 187202280e8..0a253ae64a3 100644 --- a/Master/texmf-dist/tex/latex/base/proc.cls +++ b/Master/texmf-dist/tex/latex/base/proc.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/proc.sty b/Master/texmf-dist/tex/latex/base/proc.sty index 27bb2c28ba7..34debbd88c9 100644 --- a/Master/texmf-dist/tex/latex/base/proc.sty +++ b/Master/texmf-dist/tex/latex/base/proc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/report.cls b/Master/texmf-dist/tex/latex/base/report.cls index 2b2c29351d2..3131e66cf47 100644 --- a/Master/texmf-dist/tex/latex/base/report.cls +++ b/Master/texmf-dist/tex/latex/base/report.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{report} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol diff --git a/Master/texmf-dist/tex/latex/base/report.sty b/Master/texmf-dist/tex/latex/base/report.sty index 7c4c63b859e..6e64c9a6e5c 100644 --- a/Master/texmf-dist/tex/latex/base/report.sty +++ b/Master/texmf-dist/tex/latex/base/report.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/sfonts.def b/Master/texmf-dist/tex/latex/base/sfonts.def index 4e2b0a03aa0..1f1e20a3b0d 100644 --- a/Master/texmf-dist/tex/latex/base/sfonts.def +++ b/Master/texmf-dist/tex/latex/base/sfonts.def @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/shortvrb.sty b/Master/texmf-dist/tex/latex/base/shortvrb.sty index 9b4753ced92..df1d5a444f4 100644 --- a/Master/texmf-dist/tex/latex/base/shortvrb.sty +++ b/Master/texmf-dist/tex/latex/base/shortvrb.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -43,7 +43,7 @@ %% extension .ins) which are part of the distribution. \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{shortvrb} - [2022/07/03 v3.0k + [2022/11/13 v3.0m Standard LaTeX documentation package V3 (FMi)] %% %% Package `doc' to use with LaTeX 2e diff --git a/Master/texmf-dist/tex/latex/base/showidx.sty b/Master/texmf-dist/tex/latex/base/showidx.sty index 3bdb36f0cd7..dcae43c5d50 100644 --- a/Master/texmf-dist/tex/latex/base/showidx.sty +++ b/Master/texmf-dist/tex/latex/base/showidx.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/size10.clo b/Master/texmf-dist/tex/latex/base/size10.clo index 03dc8e61fc5..57cfdaa612e 100644 --- a/Master/texmf-dist/tex/latex/base/size10.clo +++ b/Master/texmf-dist/tex/latex/base/size10.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{size10.clo} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xpt\@xiipt diff --git a/Master/texmf-dist/tex/latex/base/size11.clo b/Master/texmf-dist/tex/latex/base/size11.clo index 71f930d413d..54da9aad2e8 100644 --- a/Master/texmf-dist/tex/latex/base/size11.clo +++ b/Master/texmf-dist/tex/latex/base/size11.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{size11.clo} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xipt{13.6}% diff --git a/Master/texmf-dist/tex/latex/base/size12.clo b/Master/texmf-dist/tex/latex/base/size12.clo index e85a5983c4c..8bf5ca45a3f 100644 --- a/Master/texmf-dist/tex/latex/base/size12.clo +++ b/Master/texmf-dist/tex/latex/base/size12.clo @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{size12.clo} - [2022/07/02 v1.4n + [2023/05/17 v1.4n Standard LaTeX file (size option)] \renewcommand\normalsize{% \@setfontsize\normalsize\@xiipt{14.5}% diff --git a/Master/texmf-dist/tex/latex/base/slides.cls b/Master/texmf-dist/tex/latex/base/slides.cls index 832b37cd253..25a632b6e9b 100644 --- a/Master/texmf-dist/tex/latex/base/slides.cls +++ b/Master/texmf-dist/tex/latex/base/slides.cls @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/slides.def b/Master/texmf-dist/tex/latex/base/slides.def index 19d98ed86ba..29e9be29736 100644 --- a/Master/texmf-dist/tex/latex/base/slides.def +++ b/Master/texmf-dist/tex/latex/base/slides.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/slides.sty b/Master/texmf-dist/tex/latex/base/slides.sty index 4fb211590d3..462e6258d83 100644 --- a/Master/texmf-dist/tex/latex/base/slides.sty +++ b/Master/texmf-dist/tex/latex/base/slides.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/structuredlog.sty b/Master/texmf-dist/tex/latex/base/structuredlog.sty index 3821aefdeb2..cd77c7b8d2c 100644 --- a/Master/texmf-dist/tex/latex/base/structuredlog.sty +++ b/Master/texmf-dist/tex/latex/base/structuredlog.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,8 +42,8 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %%% From File: ltfilehook.dtx -\providecommand\ltfilehookversion{v1.0n} -\providecommand\ltfilehookdate{2022/08/18} +\providecommand\ltfilehookversion{v1.0o} +\providecommand\ltfilehookdate{2023/04/02} \ProvidesExplPackage {structuredlog}{\ltfilehookdate}{\ltfilehookversion} {Structuring the TeX transcript file} diff --git a/Master/texmf-dist/tex/latex/base/syntonly.sty b/Master/texmf-dist/tex/latex/base/syntonly.sty index aaac80ea9a3..957686e358a 100644 --- a/Master/texmf-dist/tex/latex/base/syntonly.sty +++ b/Master/texmf-dist/tex/latex/base/syntonly.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t1cmdh.fd b/Master/texmf-dist/tex/latex/base/t1cmdh.fd index 780a713ce9b..9e480384ef3 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmdh.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmdh.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmdh.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% diff --git a/Master/texmf-dist/tex/latex/base/t1cmfib.fd b/Master/texmf-dist/tex/latex/base/t1cmfib.fd index c2f39ac5212..e4a867cf791 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmfib.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmfib.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmfib.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% diff --git a/Master/texmf-dist/tex/latex/base/t1cmfr.fd b/Master/texmf-dist/tex/latex/base/t1cmfr.fd index ec37c5faf36..477e2dcfe70 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmfr.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmfr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmfr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% diff --git a/Master/texmf-dist/tex/latex/base/t1cmr.fd b/Master/texmf-dist/tex/latex/base/t1cmr.fd index 04c86917c23..e481092f781 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmr.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% diff --git a/Master/texmf-dist/tex/latex/base/t1cmss.fd b/Master/texmf-dist/tex/latex/base/t1cmss.fd index 1f7138b51b7..0463f31391f 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmss.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmss.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@ssfamily}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8>#50800% diff --git a/Master/texmf-dist/tex/latex/base/t1cmtt.fd b/Master/texmf-dist/tex/latex/base/t1cmtt.fd index 3cb4e498c51..fd119215dfa 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmtt.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@ttfamily}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8>#50800% diff --git a/Master/texmf-dist/tex/latex/base/t1cmvtt.fd b/Master/texmf-dist/tex/latex/base/t1cmvtt.fd index bd33c77b7fd..0880e905269 100644 --- a/Master/texmf-dist/tex/latex/base/t1cmvtt.fd +++ b/Master/texmf-dist/tex/latex/base/t1cmvtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{t1cmvtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@ttfamily}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8>#50800% diff --git a/Master/texmf-dist/tex/latex/base/t1enc.def b/Master/texmf-dist/tex/latex/base/t1enc.def index 553d72e7a80..5920a031593 100644 --- a/Master/texmf-dist/tex/latex/base/t1enc.def +++ b/Master/texmf-dist/tex/latex/base/t1enc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t1enc.dfu b/Master/texmf-dist/tex/latex/base/t1enc.dfu index ef6c441be2b..c51cf0c04a4 100644 --- a/Master/texmf-dist/tex/latex/base/t1enc.dfu +++ b/Master/texmf-dist/tex/latex/base/t1enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t1enc.sty b/Master/texmf-dist/tex/latex/base/t1enc.sty index ddb9f5e4c06..5ad6cc05aed 100644 --- a/Master/texmf-dist/tex/latex/base/t1enc.sty +++ b/Master/texmf-dist/tex/latex/base/t1enc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t1lcmss.fd b/Master/texmf-dist/tex/latex/base/t1lcmss.fd index 0b9e1ef509f..3c48a393f95 100644 --- a/Master/texmf-dist/tex/latex/base/t1lcmss.fd +++ b/Master/texmf-dist/tex/latex/base/t1lcmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t1lcmtt.fd b/Master/texmf-dist/tex/latex/base/t1lcmtt.fd index e2a94984bf7..9aec1c5a515 100644 --- a/Master/texmf-dist/tex/latex/base/t1lcmtt.fd +++ b/Master/texmf-dist/tex/latex/base/t1lcmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t2aenc.dfu b/Master/texmf-dist/tex/latex/base/t2aenc.dfu index 9ff4e9f140e..8fa4097f690 100644 --- a/Master/texmf-dist/tex/latex/base/t2aenc.dfu +++ b/Master/texmf-dist/tex/latex/base/t2aenc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t2benc.dfu b/Master/texmf-dist/tex/latex/base/t2benc.dfu index 59fda59a1f6..e87247dd102 100644 --- a/Master/texmf-dist/tex/latex/base/t2benc.dfu +++ b/Master/texmf-dist/tex/latex/base/t2benc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/t2cenc.dfu b/Master/texmf-dist/tex/latex/base/t2cenc.dfu index e3e14bc4624..a0ebe8a47a0 100644 --- a/Master/texmf-dist/tex/latex/base/t2cenc.dfu +++ b/Master/texmf-dist/tex/latex/base/t2cenc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/testpage.tex b/Master/texmf-dist/tex/latex/base/testpage.tex index e199a2bb71c..7eae6c142c2 100644 --- a/Master/texmf-dist/tex/latex/base/testpage.tex +++ b/Master/texmf-dist/tex/latex/base/testpage.tex @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2022 +% Copyright (C) 1993-2023 % The LaTeX Project and any individual authors listed elsewhere % in this file. % diff --git a/Master/texmf-dist/tex/latex/base/textcomp-2018-08-11.sty b/Master/texmf-dist/tex/latex/base/textcomp-2018-08-11.sty index a27026e8263..8ec5f6d5a30 100644 --- a/Master/texmf-dist/tex/latex/base/textcomp-2018-08-11.sty +++ b/Master/texmf-dist/tex/latex/base/textcomp-2018-08-11.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/textcomp.sty b/Master/texmf-dist/tex/latex/base/textcomp.sty index 449a9f38598..e8fb80e6eb7 100644 --- a/Master/texmf-dist/tex/latex/base/textcomp.sty +++ b/Master/texmf-dist/tex/latex/base/textcomp.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tracefnt.sty b/Master/texmf-dist/tex/latex/base/tracefnt.sty index 6a06bb50332..d8e726088f8 100644 --- a/Master/texmf-dist/tex/latex/base/tracefnt.sty +++ b/Master/texmf-dist/tex/latex/base/tracefnt.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ts1cmr.fd b/Master/texmf-dist/tex/latex/base/ts1cmr.fd index 62e7610e4a8..ea39de79b98 100644 --- a/Master/texmf-dist/tex/latex/base/ts1cmr.fd +++ b/Master/texmf-dist/tex/latex/base/ts1cmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ts1cmr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% diff --git a/Master/texmf-dist/tex/latex/base/ts1cmss.fd b/Master/texmf-dist/tex/latex/base/ts1cmss.fd index 88329e97559..31c65faa830 100644 --- a/Master/texmf-dist/tex/latex/base/ts1cmss.fd +++ b/Master/texmf-dist/tex/latex/base/ts1cmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ts1cmss.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% diff --git a/Master/texmf-dist/tex/latex/base/ts1cmtt.fd b/Master/texmf-dist/tex/latex/base/ts1cmtt.fd index bbea6182516..66027bc80b8 100644 --- a/Master/texmf-dist/tex/latex/base/ts1cmtt.fd +++ b/Master/texmf-dist/tex/latex/base/ts1cmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ts1cmtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@ttfamily}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8>#50800% diff --git a/Master/texmf-dist/tex/latex/base/ts1cmvtt.fd b/Master/texmf-dist/tex/latex/base/ts1cmvtt.fd index 33e6ede3271..60ea33c0af1 100644 --- a/Master/texmf-dist/tex/latex/base/ts1cmvtt.fd +++ b/Master/texmf-dist/tex/latex/base/ts1cmvtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ts1cmvtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \providecommand{\EC@ttfamily}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8>#50800% diff --git a/Master/texmf-dist/tex/latex/base/ts1enc.def b/Master/texmf-dist/tex/latex/base/ts1enc.def index b97bac2eba3..f311e509e13 100644 --- a/Master/texmf-dist/tex/latex/base/ts1enc.def +++ b/Master/texmf-dist/tex/latex/base/ts1enc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ts1enc.dfu b/Master/texmf-dist/tex/latex/base/ts1enc.dfu index 246b328c58b..37f1fbc3bf1 100644 --- a/Master/texmf-dist/tex/latex/base/ts1enc.dfu +++ b/Master/texmf-dist/tex/latex/base/ts1enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tuenc.def b/Master/texmf-dist/tex/latex/base/tuenc.def index 859a7af46a2..28bb87bc084 100644 --- a/Master/texmf-dist/tex/latex/base/tuenc.def +++ b/Master/texmf-dist/tex/latex/base/tuenc.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tulmdh.fd b/Master/texmf-dist/tex/latex/base/tulmdh.fd index 0028cb541eb..88b4d4a1d24 100644 --- a/Master/texmf-dist/tex/latex/base/tulmdh.fd +++ b/Master/texmf-dist/tex/latex/base/tulmdh.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 2016-2022 +%% Copyright (C) 2016-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tulmr.fd b/Master/texmf-dist/tex/latex/base/tulmr.fd index d58d8d144e0..3863435ec5e 100644 --- a/Master/texmf-dist/tex/latex/base/tulmr.fd +++ b/Master/texmf-dist/tex/latex/base/tulmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 2016-2022 +%% Copyright (C) 2016-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tulmss.fd b/Master/texmf-dist/tex/latex/base/tulmss.fd index e51508cb329..960f33cdb41 100644 --- a/Master/texmf-dist/tex/latex/base/tulmss.fd +++ b/Master/texmf-dist/tex/latex/base/tulmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 2016-2022 +%% Copyright (C) 2016-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tulmssq.fd b/Master/texmf-dist/tex/latex/base/tulmssq.fd index 8ac54fac397..906972625af 100644 --- a/Master/texmf-dist/tex/latex/base/tulmssq.fd +++ b/Master/texmf-dist/tex/latex/base/tulmssq.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 2016-2022 +%% Copyright (C) 2016-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tulmtt.fd b/Master/texmf-dist/tex/latex/base/tulmtt.fd index 6db1233c3b3..f6ca9ab4296 100644 --- a/Master/texmf-dist/tex/latex/base/tulmtt.fd +++ b/Master/texmf-dist/tex/latex/base/tulmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 2016-2022 +%% Copyright (C) 2016-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/tulmvtt.fd b/Master/texmf-dist/tex/latex/base/tulmvtt.fd index fc74365e5b0..f261d440351 100644 --- a/Master/texmf-dist/tex/latex/base/tulmvtt.fd +++ b/Master/texmf-dist/tex/latex/base/tulmvtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 2016-2022 +%% Copyright (C) 2016-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ucmr.fd b/Master/texmf-dist/tex/latex/base/ucmr.fd index 7ab1d923a2a..eb81283a900 100644 --- a/Master/texmf-dist/tex/latex/base/ucmr.fd +++ b/Master/texmf-dist/tex/latex/base/ucmr.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ucmr.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{U}{cmr}{\hyphenchar\font45 } \DeclareFontShape{U}{cmr}{m}{n}% {<5><6><7><8><9><10><12>gen*cmr% diff --git a/Master/texmf-dist/tex/latex/base/ucmss.fd b/Master/texmf-dist/tex/latex/base/ucmss.fd index 963b6316c86..e861d2129f0 100644 --- a/Master/texmf-dist/tex/latex/base/ucmss.fd +++ b/Master/texmf-dist/tex/latex/base/ucmss.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ucmss.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{U}{cmss}{\hyphenchar\font45 } \DeclareFontShape{U}{cmss}{m}{n}% {% diff --git a/Master/texmf-dist/tex/latex/base/ucmtt.fd b/Master/texmf-dist/tex/latex/base/ucmtt.fd index 5fa40718388..b889cba996a 100644 --- a/Master/texmf-dist/tex/latex/base/ucmtt.fd +++ b/Master/texmf-dist/tex/latex/base/ucmtt.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ %% making successful document exchange impossible. %% \ProvidesFile{ucmtt.fd} - [2022/07/10 v2.5l Standard LaTeX font definitions] + [2023/04/13 v2.5m Standard LaTeX font definitions] \DeclareFontFamily{U}{cmtt}{\hyphenchar \font\m@ne} \DeclareFontShape{U}{cmtt}{m}{n}% {% @@ -76,6 +76,7 @@ {<->sub*cmtt/m/n}{} \DeclareFontShape{U}{cmtt}{bx}{it}% {<->sub*cmtt/m/it}{} +\DeclareFontShape{U}{cmtt}{bx}{sl} {<->sub*cmtt/m/n}{} \DeclareFontShape{U}{cmtt}{bx}{ui}% {<->sub*cmtt/m/it}{} diff --git a/Master/texmf-dist/tex/latex/base/ulasy.fd b/Master/texmf-dist/tex/latex/base/ulasy.fd index 0f8daebd998..001041f1a74 100644 --- a/Master/texmf-dist/tex/latex/base/ulasy.fd +++ b/Master/texmf-dist/tex/latex/base/ulasy.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/ullasy.fd b/Master/texmf-dist/tex/latex/base/ullasy.fd index dd5081d6546..f256e0df6b9 100644 --- a/Master/texmf-dist/tex/latex/base/ullasy.fd +++ b/Master/texmf-dist/tex/latex/base/ullasy.fd @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/utf8-2018.def b/Master/texmf-dist/tex/latex/base/utf8-2018.def index bed3941b41e..52acd666e4c 100644 --- a/Master/texmf-dist/tex/latex/base/utf8-2018.def +++ b/Master/texmf-dist/tex/latex/base/utf8-2018.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/utf8.def b/Master/texmf-dist/tex/latex/base/utf8.def index ee2a25e7df5..79efa381ff1 100644 --- a/Master/texmf-dist/tex/latex/base/utf8.def +++ b/Master/texmf-dist/tex/latex/base/utf8.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/utf8enc.dfu b/Master/texmf-dist/tex/latex/base/utf8enc.dfu index 57e7700d150..7dbab3b9af3 100644 --- a/Master/texmf-dist/tex/latex/base/utf8enc.dfu +++ b/Master/texmf-dist/tex/latex/base/utf8enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/base/x2enc.dfu b/Master/texmf-dist/tex/latex/base/x2enc.dfu index d2f2d53e6eb..1c7bb92d163 100644 --- a/Master/texmf-dist/tex/latex/base/x2enc.dfu +++ b/Master/texmf-dist/tex/latex/base/x2enc.dfu @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/firstaid/everysel-ltx.sty b/Master/texmf-dist/tex/latex/firstaid/everysel-ltx.sty index d2f2d8d2d96..c7e7e6e06ca 100644 --- a/Master/texmf-dist/tex/latex/firstaid/everysel-ltx.sty +++ b/Master/texmf-dist/tex/latex/firstaid/everysel-ltx.sty @@ -30,7 +30,7 @@ %% `First Aid Bundle'. You may however distribute the LaTeX `First Aid Bundle' %% without such generated files. %% -%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2022 +%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2023 %% %% The LaTeX Project and any individual authors listed elsewhere %% in this file. diff --git a/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty b/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty index 2dfa89985a5..2415a38f1c8 100644 --- a/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty +++ b/Master/texmf-dist/tex/latex/firstaid/filehook-ltx.sty @@ -30,7 +30,7 @@ %% `First Aid Bundle'. You may however distribute the LaTeX `First Aid Bundle' %% without such generated files. %% -%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2022 +%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2023 %% %% The LaTeX Project and any individual authors listed elsewhere %% in this file. diff --git a/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx b/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx index ebdf7f5f99c..df4b77ed714 100644 --- a/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx +++ b/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx @@ -30,12 +30,12 @@ %% `First Aid Bundle'. You may however distribute the LaTeX `First Aid Bundle' %% without such generated files. %% -%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2022 +%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2023 %% %% The LaTeX Project and any individual authors listed elsewhere %% in this file. -\def\LaTeXFirstAidDate{2022/10/29} -\def\LaTeXFirstAidVersion{v1.0u} +\def\LaTeXFirstAidDate{2023/05/20} +\def\LaTeXFirstAidVersion{v1.0z} \ProvidesFile{latex2e-first-aid-for-external-files.ltx} [\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space LaTeX kernel fixes to external files and packages] @@ -56,6 +56,8 @@ \FirstAidNeededT{dinbrief}{cls}{2000/03/02 LaTeX2e class}% {\AddToHook{env/document/begin}{\begingroup}}% } +\AddToHook{package/unicode-math/after}{% + \AddToHook{cmd/mod@math@codes/after}{\mathcode`\|=28796 }} \ExplSyntaxOn \AddToHook{file/pgfpages.sty/after}[firstaid]{% \cs_gset_eq:NN \shipout \pgfpages@originalshipout @@ -72,6 +74,39 @@ } \ExplSyntaxOff \AddToHook{file/babel.sty/before}[firstaid]{\def\BabelCaseHack{}} +\AddToHook{file/songs.sty/after}[firstaid]{% + \FirstAidNeededT{songs}{sty}{2018/09/12 v3.1 Songs package}% + {% + \renewcommand\SB@obeylines{% + \let\obeyedline\SB@par% + \obeylines% + \let\@par\SB@@par% + }}% +} +\AddToHook{file/crop.sty/after}[firstaid]{% + \FirstAidNeededT{crop}{sty}{2017/11/19 1.10 crop marks (mf)}% + {% + \ifdim\stockwidth > 0pt \else \stockwidth\paperwidth \fi + \ifdim\stockheight > 0pt \else \stockheight\paperheight \fi + \renewcommand*\CROP@genreflect[1]{% + \leavevmode + \dimen0\CROP@horigin + \kern2\dimen0 + \begingroup + \set@typeset@protect %change protect + \reflectbox{% + \hb@xt@\paperwidth{% + \vbox to\paperheight{% + #1% + \vss + }% + \hss + }% + }% + \endgroup + } + }% +} \AddToHook{file/bigfoot.sty/after}{% \ifnum\count10<\insc@unt \global\count10=\insc@unt @@ -145,53 +180,6 @@ \dimendef\stockheight=\kernel@stockheight \dimendef\stockwidth=\kernel@stockwidth } -\ExplSyntaxOn -\sys_if_engine_luatex:T - { - \newluafunction \g__para_end_empty_par_id_int - \exp_args:Nx \everyjob { - \exp_not:V \everyjob - \exp_not:N \lua_now:n { - local~texnest, flush_list, par_token = tex.nest, node.flush_list, token.create'tex_par:D'~ - lua.get_functions_table()[\int_use:N \g__para_end_empty_par_id_int] = function() - local~nest_level = texnest.top~ - local~cur_head = nest_level.head~ - flush_list(cur_head.next) - nest_level.tail, cur_head.next = cur_head, nil~ - token.put_next(par_token) - end - } - } - \protected \luadef \__para_end_empty_par: \g__para_end_empty_par_id_int - \group_begin: - \cs_set:Npn \__para_extract_everypar:w #1 \the \toks #2 \s_stop - { - \tl_gset:Nn \g__para_standard_everypar_tl { - \box_gset_to_last:N \g_para_indent_box - \group_begin: - \__para_end_empty_par: - \group_end: - \tex_everypar:D { \msg_error:nnnn { hooks }{ para-mode }{before}{vertical} } - \@kernel@before@para@before - \hook_use:n {para/before} - \group_begin: - \tex_everypar:D {} - \skip_zero:N \tex_parskip:D - \tex_noindent:D - \group_end: - \tex_everypar:D{\g__para_standard_everypar_tl} - \@kernel@before@para@begin - \hook_use:n {para/begin} - \if_mode_horizontal: \else: - \msg_error:nnnn { hooks }{ para-mode }{begin}{vertical} \fi: - \__para_handle_indent: - \the \toks #2 - } - } - \exp_last_unbraced:No \__para_extract_everypar:w \g__para_standard_everypar_tl \s_stop - \group_end: - } -\ExplSyntaxOff \endinput %% %% End of file `latex2e-first-aid-for-external-files.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx new file mode 100644 index 00000000000..1b8ca3cb7ad --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx @@ -0,0 +1,43 @@ +%% +%% This is file `bib-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-bib.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-bib.dtx (C) Copyright 2023 LaTeX Project +\ProvidesFile{bib-latex-lab-testphase.ltx} + [2023-05-18 v0.8 code related to the tagging of bib and citations] + +\RequirePackage{latex-lab-testphase-bib} + +\endinput +%% +%% End of file `bib-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/block-tagging-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/block-tagging-latex-lab-testphase.ltx new file mode 100644 index 00000000000..80eb00b8567 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/block-tagging-latex-lab-testphase.ltx @@ -0,0 +1,48 @@ +%% +%% This is file `block-tagging-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-block-tagging.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-block-tagging.dtx (C) Copyright 2021-2023 LaTeX Project + +\def\ltblocksversion{v0.8d} +\def\ltblocksdate{2023/06/07} + +\ProvidesFile{block-tagging-latex-lab-testphase.ltx} + [\ltblocksdate\space \ltblocksversion\space + blockenv implementation] +\RequirePackage{latex-lab-testphase-block-tagging} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `block-tagging-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx b/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx index 933a905d9bc..ba72b004841 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -33,8 +33,8 @@ %% %% %% File: documentmetadata-support.dtx -\def\documentmetadatasupportversion{1.0b} -\def\documentmetadatasupportdate{2022-14-04} +\def\documentmetadatasupportversion{1.0d} +\def\documentmetadatasupportdate{2023-06-07} \RequirePackage{pdfmanagement-testphase} \ExplSyntaxOn\makeatletter diff --git a/Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx new file mode 100644 index 00000000000..4d8ea15f1e0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx @@ -0,0 +1,44 @@ +%% +%% This is file `firstaid-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-firstaid.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-firstaid.dtx (C) Copyright 2023 LaTeX Project + +\ProvidesFile{firstaid-latex-lab-testphase.ltx} + [2023-06-04 v0.8 Temporary patches to external packages need for the tagging project] + +\RequirePackage{latex-lab-testphase-firstaid} + +\endinput +%% +%% End of file `firstaid-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx new file mode 100644 index 00000000000..29a76c4ed93 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx @@ -0,0 +1,42 @@ +%% +%% This is file `float-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-float.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project + +\ProvidesFile{float-latex-lab-testphase.ltx} + [2023-04-30 v0.8 code related to the tagging of floats] +\RequirePackage{latex-lab-testphase-float} +\endinput +%% +%% End of file `float-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/glyphtounicode-cmex.tex b/Master/texmf-dist/tex/latex/latex-lab/glyphtounicode-cmex.tex new file mode 100644 index 00000000000..2b5c1d979d9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/glyphtounicode-cmex.tex @@ -0,0 +1,141 @@ +% A subset of glyhtounicode-cmr.tex +% +% Copyright (c) 2008, Han The Thanh +% Copyright (c) 2014, Peter Selinger +% Copyright (c) 2018, Ross Moore +% + +%% Glyphs from the cmex fonts: + +\pdfglyphtounicode{angbracketleftBig}{27E8 FE02} +\pdfglyphtounicode{angbracketleftBigg}{27E8 FE04} +\pdfglyphtounicode{angbracketleftbig}{27E8 FE01} +\pdfglyphtounicode{angbracketleftbigg}{27E8 FE03} +\pdfglyphtounicode{angbracketrightBig}{27E9 FE02} +\pdfglyphtounicode{angbracketrightBigg}{27E9 FE04} +\pdfglyphtounicode{angbracketrightbig}{27E9 FE01} +\pdfglyphtounicode{angbracketrightbigg}{27E9 FE03} +\pdfglyphtounicode{arrowbt}{2193} +\pdfglyphtounicode{arrowdblbt}{21D3} +\pdfglyphtounicode{arrowdbltp}{21D1} +\pdfglyphtounicode{arrowhookleft}{21AA} +\pdfglyphtounicode{arrowhookright}{21A9} +\pdfglyphtounicode{arrowtp}{2191} +\pdfglyphtounicode{arrowvertex}{23D0} +\pdfglyphtounicode{arrowvertexdbl}{20E6}% was {ED12}% PUA +\pdfglyphtounicode{backslashBig}{005C FE02} +\pdfglyphtounicode{backslashBigg}{005C FE04} +\pdfglyphtounicode{backslashbig}{005C FE01} +\pdfglyphtounicode{backslashbigg}{005C FE03} +\pdfglyphtounicode{braceex}{23AA} +\pdfglyphtounicode{bracehtipdownleft}{23DF}% was {ED17}% PUA +\pdfglyphtounicode{bracehtipdownright}{23DF}% was {ED18}% PUA +\pdfglyphtounicode{bracehtipupleft}{23DE}% was {ED19}% PUA +\pdfglyphtounicode{bracehtipupright}{23DE}% was {ED1A}% PUA +\pdfglyphtounicode{braceleftBig}{007B FE02} +\pdfglyphtounicode{braceleftBigg}{007B FE04} +\pdfglyphtounicode{braceleftbig}{007B FE01} +\pdfglyphtounicode{braceleftbigg}{007B FE03} +\pdfglyphtounicode{braceleftbt}{23A9} +\pdfglyphtounicode{braceleftmid}{23A8} +\pdfglyphtounicode{bracelefttp}{23A7} +\pdfglyphtounicode{bracerightBig}{007D FE02} +\pdfglyphtounicode{bracerightBigg}{007D FE04} +\pdfglyphtounicode{bracerightbig}{007D FE01} +\pdfglyphtounicode{bracerightbigg}{007D FE03} +\pdfglyphtounicode{bracerightbt}{23AD} +\pdfglyphtounicode{bracerightmid}{23AC} +\pdfglyphtounicode{bracerighttp}{23AB} +\pdfglyphtounicode{bracketleftBig}{005B FE02} +\pdfglyphtounicode{bracketleftBigg}{005B FE04} +\pdfglyphtounicode{bracketleftbig}{005B FE01} +\pdfglyphtounicode{bracketleftbigg}{005B FE03} +\pdfglyphtounicode{bracketleftbt}{23A3} +\pdfglyphtounicode{bracketleftex}{23A2} +\pdfglyphtounicode{bracketlefttp}{23A1} +\pdfglyphtounicode{bracketrightBig}{005D FE02} +\pdfglyphtounicode{bracketrightBigg}{005D FE04} +\pdfglyphtounicode{bracketrightbig}{005D FE01} +\pdfglyphtounicode{bracketrightbigg}{005D FE03} +\pdfglyphtounicode{bracketrightbt}{23A6} +\pdfglyphtounicode{bracketrightex}{23A5} +\pdfglyphtounicode{bracketrighttp}{23A4} +\pdfglyphtounicode{ceilingleftBig}{2308 FE02} +\pdfglyphtounicode{ceilingleftBigg}{2308 FE04} +\pdfglyphtounicode{ceilingleftbig}{2308 FE01} +\pdfglyphtounicode{ceilingleftbigg}{2308 FE03} +\pdfglyphtounicode{ceilingrightBig}{2309 FE02} +\pdfglyphtounicode{ceilingrightBigg}{2309 FE04} +\pdfglyphtounicode{ceilingrightbig}{2309 FE01} +\pdfglyphtounicode{ceilingrightbigg}{2309 FE03} +\pdfglyphtounicode{circledotdisplay}{2A00 FE02} +\pdfglyphtounicode{circledottext}{2A00 FE01} +\pdfglyphtounicode{circlemultiplydisplay}{2A02 FE02} +\pdfglyphtounicode{circlemultiplytext}{2A02 FE01} +\pdfglyphtounicode{circleplusdisplay}{2A01 FE02} +\pdfglyphtounicode{circleplustext}{2A01 FE01} +\pdfglyphtounicode{contintegraldisplay}{222E FE02} +\pdfglyphtounicode{contintegraltext}{222E FE01} +\pdfglyphtounicode{coproductdisplay}{2210 FE02} +\pdfglyphtounicode{coproducttext}{2210 FE01} +\pdfglyphtounicode{floorleftBig}{230A FE02} +\pdfglyphtounicode{floorleftBigg}{230A FE04} +\pdfglyphtounicode{floorleftbig}{230A FE01} +\pdfglyphtounicode{floorleftbigg}{230A FE03} +\pdfglyphtounicode{floorrightBig}{230B FE02} +\pdfglyphtounicode{floorrightBigg}{230B FE04} +\pdfglyphtounicode{floorrightbig}{230B FE01} +\pdfglyphtounicode{floorrightbigg}{230B FE03} +\pdfglyphtounicode{hatwide}{02C6 FE01} +\pdfglyphtounicode{hatwider}{02C6 FE02} +\pdfglyphtounicode{hatwidest}{02C6 FE03} +\pdfglyphtounicode{integraldisplay}{222B FE02} +\pdfglyphtounicode{integraltext}{222B FE01} +\pdfglyphtounicode{intersectiondisplay}{22C2 FE02} +\pdfglyphtounicode{intersectiontext}{22C2 FE01} +\pdfglyphtounicode{logicalanddisplay}{22C0 FE02} +\pdfglyphtounicode{logicalandtext}{22C0 FE01} +\pdfglyphtounicode{logicalordisplay}{22C1 FE02} +\pdfglyphtounicode{logicalortext}{22C1 FE01} +\pdfglyphtounicode{mapsto}{21A6} +\pdfglyphtounicode{parenleftBig}{0028 FE02} +\pdfglyphtounicode{parenleftBigg}{0028 FE04} +\pdfglyphtounicode{parenleftbig}{0028 FE01} +\pdfglyphtounicode{parenleftbigg}{0028 FE03} +\pdfglyphtounicode{parenleftbt}{239D} +\pdfglyphtounicode{parenleftex}{239C} +\pdfglyphtounicode{parenlefttp}{239B} +\pdfglyphtounicode{parenrightBig}{0029 FE02} +\pdfglyphtounicode{parenrightBigg}{0029 FE04} +\pdfglyphtounicode{parenrightbig}{0029 FE01} +\pdfglyphtounicode{parenrightbigg}{0029 FE03} +\pdfglyphtounicode{parenrightbt}{23A0} +\pdfglyphtounicode{parenrightex}{239F} +\pdfglyphtounicode{parenrighttp}{239E} +\pdfglyphtounicode{productdisplay}{220F FE02} +\pdfglyphtounicode{producttext}{220F FE01} +\pdfglyphtounicode{radicalBig}{221A FE02} +\pdfglyphtounicode{radicalBigg}{221A FE04} +\pdfglyphtounicode{radicalbig}{221A FE01} +\pdfglyphtounicode{radicalbigg}{221A FE03} +\pdfglyphtounicode{radicalbt}{23B7}% was {221A} +\pdfglyphtounicode{radicaltp}{231C}% was {ED6A}% PUA +\pdfglyphtounicode{radicalvertex}{20D3}% was {ED6B}% PUA +\pdfglyphtounicode{slashBig}{002F FE02} +\pdfglyphtounicode{slashBigg}{002F FE04} +\pdfglyphtounicode{slashbig}{002F FE01} +\pdfglyphtounicode{slashbigg}{002F FE03} +\pdfglyphtounicode{summationdisplay}{2211 FE02} +\pdfglyphtounicode{summationtext}{2211 FE01} +\pdfglyphtounicode{tie}{2040} +\pdfglyphtounicode{tildewide}{02DC FE01} +\pdfglyphtounicode{tildewider}{02DC FE02} +\pdfglyphtounicode{tildewidest}{02DC FE03} +\pdfglyphtounicode{uniondisplay}{22C3 FE02} +\pdfglyphtounicode{unionmultidisplay}{2A04 FE02} +\pdfglyphtounicode{unionmultitext}{2A04 FE01} +\pdfglyphtounicode{unionsqdisplay}{2A06 FE02} +\pdfglyphtounicode{unionsqtext}{2A06 FE01} +\pdfglyphtounicode{uniontext}{22C3 FE01} +\pdfglyphtounicode{vextenddouble}{20E6}% was {ED79}% PUA +\pdfglyphtounicode{vextendsingle}{20D3}%%% was {23D0} diff --git a/Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx new file mode 100644 index 00000000000..12fd17f5d2c --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx @@ -0,0 +1,42 @@ +%% +%% This is file `graphic-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-graphic.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-graphic.dtx (C) Copyright 2022-2023 LaTeX Project + +\ProvidesFile{graphic-latex-lab-testphase.ltx} + [2023-04-07 v0.8 code related to the tagging included graphics] +\RequirePackage{latex-lab-testphase-graphic} +\endinput +%% +%% End of file `graphic-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx new file mode 100644 index 00000000000..c2431ca4eff --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx @@ -0,0 +1,64 @@ +%% +%% This is file `latex-lab-amsmath.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-amsmath.dtx (with options: `kernel') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-amsmath.dtx +\ProvidesFile{latex-lab-amsmath.ltx} + [2023-01-05 v0.1a amsmath adaptions] +\RequirePackage{tagpdf-base} +\ExplSyntaxOn +\AddToHook{package/amsmath/after} + { + \def\intertext@{% + \def\intertext##1{% + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip\belowdisplayskip + \vbox{ + \ifmeasuring@\tag_stop:\fi + \normalbaselines + \ifdim\linewidth=\columnwidth + \else \parshape\@ne \@totalleftmargin \linewidth + \fi + \tag_mc_end_push: + \tagpdfsetup{paratag=Span}% + \noindent\ignorespaces##1\par + \tag_mc_begin_pop:n{}}% + \penalty\predisplaypenalty\vskip\abovedisplayskip% + }% + }} + } +\ExplSyntaxOff +\endinput +%% +%% End of file `latex-lab-amsmath.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx index 7c7129b4560..79d3063aeb4 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -385,7 +385,9 @@ \ifFN@multiplefootnote \providecommand*{\multiplefootnotemarker}{3sp} - \providecommand*{\multfootsep}{,} + \ExplSyntaxOn + \providecommand*{\multfootsep}{\tag_mc_end_push:\tag_mc_begin:n{artifact},\tag_mc_end:\tag_mc_begin_pop:n{}} + \ExplSyntaxOff \AddToHook{fnmark} {\FN@mf@check} \AddToHook{fnmark/end} {\FN@mf@prepare} \def\FN@mf@prepare{% diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx index 66c25fc3e89..4a3a046a21d 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -34,34 +34,31 @@ %% %% File: latex-lab-footnotes.dtx \ProvidesFile{latex-lab-footnotes.ltx} - [2022-07-22 v0.6b changes to the footnote interfaces] - - - % not looked at yet - -\long\def\@mpfootnotetext#1{% - \global\setbox\@mpfootins\vbox{% - \unvbox\@mpfootins - \reset@font\footnotesize - \hsize\columnwidth - \@parboxrestore - \def\@currentcounter{mpfootnote}% - \protected@edef\@currentlabel - {\csname p@mpfootnote\endcsname\@thefnmark}% - \color@begingroup - \@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% - \par - \color@endgroup}} - -\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}} - -\def\@mpfn{footnote} -\def\thempfn{\thefootnote} - + [2023-02-04 v0.7 changes to the footnote interfaces] +%% alterations not covered: \ExplSyntaxOn - +\prop_new:N \l__fnote_tmpa_prop +\tl_new:N \l__fnote_tmpa_tl +\tl_new:N \l_fnote_type_tl +\tl_set:Nn \l_fnote_type_tl {default} +\bool_new:N \l_fnote_link_bool +\bool_set_true:N \l_fnote_link_bool +\tl_new:N \l_fnote_link_type_tl +\tl_set:Nn \l_fnote_link_type_tl {link} +\tl_new:N \l__fnote_linktarget_tl +\tl_new:N \l__fnote_currentlabel_tl + +\seq_new:N \l__fnote_currentrefs_seq +\bool_new:N \l__fnote_autodetect_bool +\bool_set_true:N \l__fnote_autodetect_bool +\tl_new:N \l__fnote_currentstruct_tl +\tl_set:Nn \l__fnote_currentstruct_tl {1} +\cs_generate_variant:Nn \ref_label:nn { Vn } +\cs_generate_variant:Nn \ref_value:nn { Vn } +\cs_generate_variant:Nn \prop_gput:Nnn {cxn} +\cs_generate_variant:Nn \hook_gput_code:nnn{nne} +\cs_generate_variant:Nn \tag_struct_use:n {e} \cs_new_protected:Npn \fnote_step_fnmark:nn #1#2 { \tl_if_novalue:nTF {#1} { @@ -75,7 +72,6 @@ \group_end: } } - \cs_new_protected:Npn \fnote_set_fnmark:nn #1#2 { \tl_if_novalue:nTF {#1} { @@ -88,19 +84,20 @@ \group_end: } } - - -\bool_new:N \g_fnote_debug_bool -\bool_gset_true:N \g_fnote_debug_bool % for now we have debugging turned on by default - - \NewMirroredHookPair{fnmark/before}{fnmark/after} \NewHook{fnmark} \NewHook{fnmark/begin} \NewHook{fnmark/end} - -\cs_new:Npn \__fnote_debug_footnotemark: { - \bool_if:NT \g_fnote_debug_bool +\NewMirroredHookPair{fntext/before}{fntext/after} +\NewHook{fntext} +\NewHook{fntext/para} +\NewHook{fntext/begin} +\NewHook{fntext/end} +\bool_new:N \g_fnote_debug_bool +\bool_gset_true:N \g_fnote_debug_bool +\cs_new_protected:Npn \__fnote_debug_footnotemark: + { + \bool_if:NT \g_fnote_debug_bool { \LogHook{fnmark/before} \LogHook{fnmark} @@ -109,8 +106,26 @@ \LogHook{fnmark/after} \cs_gset_eq:NN \__fnote_debug_footnotemark: \prg_do_nothing: } -} - + } +\cs_new_protected:Npn \__fnote_debug_footnotetext: + { + \bool_if:NT \g_fnote_debug_bool + { + \cs_log:N\@footnotetext@cfgpoint + \cs_log:N\@footnotetext@cfgpointii + \cs_log:N\@footnotetext@cfgpointiii + \cs_log:N\@footnotetext@cfgpointiv + \cs_log:N\@makefntext@cfgpoint + \cs_log:N\@makefntext@cfgpointii + \LogHook{fntext/before} + \LogHook{fntext} + \LogHook{fntext/para} + \LogHook{fntext/begin} + \LogHook{fntext/end} + \LogHook{fntext/after} + \cs_gset_eq:NN \__fnote_debug_footnotetext: \prg_do_nothing: + } + } \cs_new_protected:Npn \fnote_footnotemark: { \__fnote_debug_footnotemark: \UseHook{fnmark/before} @@ -125,8 +140,7 @@ \@makefnmark \__fnote_footnotemark_finish: } - -\cs_new:Npn \__fnote_finish: { +\cs_new_protected:Npn \__fnote_finish: { \UseHook{fnmark/end} \ifhmode \spacefactor \@x@sf \relax @@ -135,39 +149,8 @@ } \cs_new_eq:NN \__fnote_footnotemark_finish: \__fnote_finish: - \def \@kernel@process@makefnmark { } - - - \cs_set_eq:NN \@footnotemark \fnote_footnotemark: - - -\NewMirroredHookPair{fntext/before}{fntext/after} -\NewHook{fntext} -\NewHook{fntext/para} -\NewHook{fntext/begin} -\NewHook{fntext/end} - -\cs_new:Npn \__fnote_debug_footnotetext: { - \bool_if:NT \g_fnote_debug_bool - { - \cs_log:N\@footnotetext@cfgpoint - \cs_log:N\@footnotetext@cfgpointii - \cs_log:N\@footnotetext@cfgpointiii - \cs_log:N\@footnotetext@cfgpointiv - \cs_log:N\@makefntext@cfgpoint - \cs_log:N\@makefntext@cfgpointii - \LogHook{fntext/before} - \LogHook{fntext} - \LogHook{fntext/para} - \LogHook{fntext/begin} - \LogHook{fntext/end} - \LogHook{fntext/after} - \cs_gset_eq:NN \__fnote_debug_footnotetext: \prg_do_nothing: - } - } - \cs_new_protected:Npn \fnote_footnotetext:n #1 { \__fnote_debug_footnotetext: \UseHook{fntext/before} @@ -201,32 +184,24 @@ } \UseHook{fntext/after} } - \cs_new_protected:Npn \@footnotetext@cfgpoint { \insert\footins } - \cs_new_protected:Npn \@footnotetext@cfgpointii { \@makefntext } - \cs_new_protected:Npn \@footnotetext@cfgpointiii { \rule\z@\footnotesep } - \cs_new_protected:Npn \@footnotetext@cfgpointiv { \@finalstrut\strutbox } - \cs_new_protected:Npn \@kernel@process@footnotetext {} - - -\AddToHook{begindocument}{ - \cs_set_eq:NN \@footnotetext \fnote_footnotetext:n -} - - - +\AddToHook{begindocument} + { + \cs_set_eq:NN \@footnotetext \fnote_footnotetext:n + } \newdimen\footnotemargin \footnotemargin\maxdimen % no value given -\AtBeginDocument{ - \ifdim \footnotemargin=\maxdimen - \setlength\footnotemargin{1.8em} - \fi -} +\AtBeginDocument + { + \ifdim \footnotemargin=\maxdimen + \setlength\footnotemargin{1.8em} + \fi + } \cs_new_protected:Npn \fnote_makefntext:n #1 { \@makefntext@cfgpoint @@ -248,16 +223,12 @@ \@makefntext@cfgpointii { #1 } } - \cs_new_protected:Npn \@makefntext@cfgpoint { \noindent } - \cs_new_protected:Npn \@makefntext@cfgpointii #1 { #1 } \newcommand\old@std@class@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} - - \tl_new:N \l__fnote_patch_tl \cs_new_eq:NN \__fnote_tmp:w \ERROR @@ -289,139 +260,245 @@ { \exp_stop_f: #1 \@makefntext@processX { \use:n } { \@makefnmark } } \cs_new:Npn \@makefntext@processX #1#2{\@makefntext@cfgpoint{#1{#2}}} -\AddToHook{begindocument}{ - \cs_if_eq:NNTF \@makefntext \old@std@class@makefntext - { - \cs_set_eq:NN \@makefntext \fnote_makefntext:n - } - { - \__fnote_patch: - } -} - - -\DeclareDocumentCommand\footnotetext {o+m} { - \fnote_set_fnmark:nn {#1} \@mpfn - \@footnotetext {#2} -} - - -\DeclareDocumentCommand\footnote {o+m} { - \fnote_step_fnmark:nn {#1} \@mpfn - \cs_set_eq:NN \__fnote_footnotemark_finish: \prg_do_nothing: - \@footnotemark - \cs_set_eq:NN \__fnote_footnotemark_finish: \__fnote_finish: - \@footnotetext {#2} - \__fnote_footnotemark_finish: -} - - -\DeclareDocumentCommand\footnotemark {o} { - \fnote_step_fnmark:nn {#1} { footnote } - \@footnotemark -} +\AddToHook{begindocument} + { + \cs_if_eq:NNTF \@makefntext \old@std@class@makefntext + { + \cs_set_eq:NN \@makefntext \fnote_makefntext:n + } + { + \__fnote_patch: + } + } +\DeclareDocumentCommand\footnotetext {o+m} + { + \fnote_set_fnmark:nn {#1} \@mpfn + \@footnotetext {#2} + } +\DeclareDocumentCommand\footnote {o+m} + { + \fnote_step_fnmark:nn {#1} \@mpfn + \cs_set_eq:NN \__fnote_footnotemark_finish: \prg_do_nothing: + \@footnotemark + \cs_set_eq:NN \__fnote_footnotemark_finish: \__fnote_finish: + \@footnotetext {#2} + \__fnote_footnotemark_finish: + } -\DeclareDocumentCommand\footref {m}{% - \begingroup - \unrestored@protected@xdef\@thefnmark{\ref{#1}}% - \endgroup - \@footnotemark -} +\DeclareDocumentCommand\footnotemark {o} + { + \fnote_step_fnmark:nn {#1} { footnote } + \@footnotemark + } +\DeclareDocumentCommand\footref {m} + { + \begingroup + \unrestored@protected@xdef\@thefnmark{\ref*{#1}}% + \endgroup + \bool_set_false:N \l__fnote_autodetect_bool + \tl_set:Nn \l__fnote_currentlabel_tl {#1} + \@footnotemark + \bool_set_true:N \l__fnote_autodetect_bool + } +\cs_new_protected:Npn \@mpfootnotetext@cfgpoint #1 + { + \global\setbox\@mpfootins\vbox{% + \unvbox\@mpfootins + #1 + } + } +\RequirePackage{etoolbox} +\ExplSyntaxOff +\patchcmd\@iiiminipage + {\let\@footnotetext\@mpfootnotetext} + {\let\@footnotetext@cfgpoint\@mpfootnotetext@cfgpoint} + {}{\ERROR} +\ExplSyntaxOn +\AddToHook{class/memoir/before} + { \let\new@std@class@makecol\@makecol } +\AddToHook{class/memoir/after} + { + \cs_set_eq:NN \@footnotemark \fnote_footnotemark: + \cs_set_eq:NN \@makefntext\old@std@class@makefntext + \cs_set_eq:NN \@makecol\new@std@class@makecol + } \AddToHook{package/setspace/after} {\let \@footnotetext \fnote_footnotetext:n \AddToHook{fntext}[setspace]{\let\baselinestretch\setspace@singlespace}} -\AddToHook{package/hyperref/after}{ - \let\H@@footnotetext\fnote_footnotetext:n - \let\H@@footnotemark\fnote_footnotemark: - \let \@footnotetext \fnote_footnotetext:n - \let \@footnotemark \fnote_footnotemark: -} - - - - - - - - -\newcounter{absfootnote} -\AddToHook{fnmark/begin}{\stepcounter{absfootnote}} % too simple (fails with opt args) - - -\cs_new_protected:Npn \tag_if_loaded:TF { \cs_if_exist:NTF \tag_struct_begin:n } - -\cs_new_protected:Npn \tag@FEMark #1 { - \tag_if_loaded:TF +\def\hyper@nopatch@footnote{} +\AtBeginDocument + { + \providecommand\hyper@linkstart{\@gobbletwo} + \providecommand\hyper@linkend{\@empty} + } +\AtBeginDocument + { + \@ifpackageloaded{hyperref} { - \tag_mc_end_push: - \exp_args:Nx - \tag_struct_begin:n{tag=Lbl,ref=fn.\the\c@absfootnote} - \tag_mc_begin:n{tag=Lbl} - \IfPackageLoadedTF{hyperref}{ \hyper@linkstart - {link}{fn.\the\c@absfootnote} }{} - #1 - \IfPackageLoadedTF{hyperref}{ \hyper@linkend }{} - \tag_mc_end: - \tag_struct_end: - \tag_mc_begin_pop:n{} + \legacy_if:nF{Hy@hyperfootnotes}{\bool_set_false:N \l_fnote_link_bool} } + { + \bool_set_false:N \l_fnote_link_bool + } + } +\ref_attribute_gset:nnnn {fnote/struct}{1}{now}{\l__fnote_currentstruct_tl} +\cs_new_protected:Npn \__fnote_label_hook: {} +\AddToHook{begindocument/before} + { + \RequirePackage{nameref} + \g@addto@macro\label@hook + { + \__fnote_label_hook: + } + } +\AddToHook{fntext/begin} + { + \cs_set_protected:Npn \__fnote_label_hook: + { + \ref_label:Vn \label@name {fnote/struct} + } + } +\cs_new_protected:Npn \fnote_new:nn #1 #2 % #1 name, #2 options + { + \prop_new:c { g__fnote_currentmarks_ #1 _prop } + } + +\fnote_new:nn {default}{} +\cs_new_protected:Npn \fnote_mark_gput:nn #1 #2 % #1 the representation of the mark, #2 type + { + \prop_gput:cxn { g__fnote_currentmarks_ #2 _prop } + { \tag_get:n{struct_num} } { #1 } -} + } +\cs_generate_variant:Nn \fnote_mark_gput:nn {no,oo} +\cs_new_protected:Npn \fnote_mark_gpop:nnN #1 #2 #3 + { + \seq_clear:N #3 + \prop_set_eq:Nc \l__fnote_tmpa_prop { g__fnote_currentmarks_ #2 _prop } + \prop_map_inline:Nn \l__fnote_tmpa_prop + { + \tl_if_eq:nnT {#1} { ##2 } + { + \seq_put_right:Nn #3 { ##1 } + \prop_gremove:cn { g__fnote_currentmarks_ #2 _prop } {##1} + } + } + } +\cs_generate_variant:Nn\fnote_mark_gpop:nnN {ooN} +\cs_new_protected:Npn \tag@FEMark #1 %#1 content + { + \tag_mc_end_push: + \tag_struct_begin:n { tag=footnotemark } + \bool_if:NTF \l__fnote_autodetect_bool + { + \fnote_mark_gput:oo {\@thefnmark}{\l_fnote_type_tl} + \tl_set:Nx \l__fnote_linktarget_tl {footnote*.\tag_get:n{struct_num}} + } + { + \hook_gput_code:nne {tagpdf/finish/before} {tagpdf/footnote} + { + \exp_not:N\fnote_gput_refs:ee + { \tag_get:n{struct_num} } + { \ref_value:Vn\l__fnote_currentlabel_tl {fnote/struct} } + } + \tl_set:Nx \l__fnote_linktarget_tl {footnote*.\ref_value:Vn\l__fnote_currentlabel_tl {fnote/struct}} + } + \tag_mc_begin:n{tag=Lbl} + % + \bool_if:NTF \l_fnote_link_bool + { + \exp_args:No + \hyper@linkstart + { \l_fnote_link_type_tl } + { \l__fnote_linktarget_tl } + #1 + \hyper@linkend + } + { #1 } + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } \cs_set_eq:NN \@kernel@process@makefnmark \tag@FEMark -\cs_set:Npn \@kernel@process@footnotetext #1#2 { - \tag_if_loaded:TF - { - \tag_mc_end_push: - \tag_struct_begin:n { tag=FENote,label=fn.\the\c@absfootnote } - #1 {#2} - \tag_struct_end: - \tag_mc_begin_pop:n{} - } - { #1 {#2} } -} - -\cs_set:Npn \@makefntext@cfgpoint #1 { - \noindent - \cs_if_exist:NT \tag_struct_begin:n { \tag_mc_end_push: } - \tag@FELbl { #1 } -} -\cs_set:Npn \@makefntext@cfgpointii #1 { - \tag@FENote { #1 } - \cs_if_exist:NT \tag_struct_begin:n { \tag_mc_begin_pop:n{} } -} - -\cs_new_protected:Npn \tag@FELbl #1 { - \tag_if_loaded:TF - { - % target should perhaps be raised ... - \IfPackageLoadedTF{hyperref}{ \hypertarget{fn.\the\c@absfootnote}{} }{} - %\tag_struct_begin:n { tag=FENote,label=fn.\the\c@absfootnote } %alternativ location for structure - \tag_struct_begin:n { tag=Lbl } - \tag_mc_begin:n { tag=Lbl } - #1 - \tag_mc_end: - \tag_struct_end: - } - { #1 } -} +\cs_new_protected:Npn \__fnote_gput_ref:nn #1 #2 %#1 the structure number receiving the ref #2 + { + \tag_if_active:T + { + \tag_struct_gput:nne {#1}{ref}{\tag_struct_object_ref:e { #2 }} + } + } +\cs_new_protected:Npn \fnote_gput_refs:nn #1 #2 % pair of numbers + { + \__fnote_gput_ref:nn {#1}{#2} + \__fnote_gput_ref:nn {#2}{#1} + } +\cs_generate_variant:Nn \fnote_gput_refs:nn {ee} +\tl_new:N \l__fnote_dflt_struct_tl +\tl_set:Nn \l__fnote_dflt_struct_tl {1} +\cs_new_protected:Npn \tag@FENote #1#2 % #1 config point, \insert\footins #2 content + { + \tag_mc_end_push: + \tag_check_child:nnTF {FENote}{pdf2} + { + \tag_struct_begin:n { tag=footnote } + } + { + \tag_struct_begin:n { tag=footnote,parent=\l__fnote_dflt_struct_tl } + } + \tl_set:Nx \l__fnote_currentstruct_tl { \tag_get:n{struct_num} } + \tag_struct_begin:n { tag=footnotelabel }\tag_struct_end: + \bool_if:NTF \l__fnote_autodetect_bool + { + \fnote_mark_gpop:ooN { \@thefnmark }{ \l_fnote_type_tl } \l__fnote_currentrefs_seq + \seq_map_inline:Nn \l__fnote_currentrefs_seq + { + \fnote_gput_refs:ee {##1}{ \l__fnote_currentstruct_tl } + } + } + {%no auto -\cs_new_protected:Npn \tag@FENote #1 { - \tag_if_loaded:TF - { - \tag_mc_begin:n{tag=FENote} - #1 + } + #1 {#2} + \tag_struct_end: + \tag_mc_begin_pop:n{} + } +\cs_set_eq:NN \@kernel@process@footnotetext \tag@FENote +\cs_set_protected:Npn \@makefntext@cfgpoint #1 %#1 code that typesets the mark. + { + \noindent + \tag_mc_end_push: + \tag@FENoteLbl { #1 } + \tag_mc_begin_pop:n{} + } +\cs_new_protected:Npn \tag@FENoteLbl #1 + { + %\seq_show:N\l__fnote_currentrefs_seq + \seq_map_inline:Nn\l__fnote_currentrefs_seq {\MakeLinkTarget*{footnote*.##1}} + \MakeLinkTarget*{footnote*.\l__fnote_currentstruct_tl} + \tag_struct_begin:n { tag=NonStruct,parent=\l__fnote_currentstruct_tl +1 } + \tag_mc_begin:n { tag=Lbl } + #1 \tag_mc_end: - %\tag_struct_end: %alternative location for structure end but ends inside a P - } - { #1 } -} - + \tag_struct_end: + } +\cs_set_protected:Npn \@makefntext@cfgpointii #1 + { + \tag_mc_end_push: + \tag@FENotetext { #1 } + \tag_mc_begin_pop:n{} + } +\cs_new_protected:Npn \tag@FENotetext #1 + { + \tag_mc_begin:n{} + #1 + \tag_mc_end: + } \ExplSyntaxOff \endinput diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty new file mode 100644 index 00000000000..2c990ee7ef8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty @@ -0,0 +1,110 @@ +%% +%% This is file `latex-lab-kernel-changes.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-toc-kernel-changes.dtx (with options: `kernelchange') +%% latex-lab-sec.dtx (with options: `kernelchange') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-toc-kernel-functions.dtx (C) Copyright 2022-2023 LaTeX Project +\def\hyper@nopatch@counter{} +\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname + \setcounter{#1}\z@ + \global\expandafter\let\csname cl@#1\endcsname\@empty + \@addtoreset{#1}{@ckpt}% + \global\expandafter\let\csname p@#1\endcsname\@empty + \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%new + \expandafter + \gdef\csname the#1\expandafter\endcsname\expandafter + {\expandafter\@arabic\csname c@#1\endcsname}} +\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}% + \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}% +} +\gdef\theHenumi{\the\value{enumi}} +\gdef\theHenumii{\the\value{enumii}} +\gdef\theHenumiii{\the\value{enumiii}} +\gdef\theHenumiv{\the\value{enumiv}} +\gdef\theHequation{\the\value{equation}} +\gdef\theHfootnote{\the\value{footnote}} +\gdef\theHmpfootnote{\the\value{mpfootnote}} +\def\@currentHref{} +\def\refstepcounter#1{\stepcounter{#1}% + \edef\@currentcounter{#1}% + \xdef\@currentHref {#1.\csname theH#1\endcsname}% + \protected@edef\@currentlabel + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% +} +\let\@kernel@refstepcounter\refstepcounter +\def\toclevel@document{-10} +\def\toclevel@part{-1} +\def\toclevel@chapter{0} +\def\toclevel@section{1} +\def\toclevel@subsection{2} +\def\toclevel@subsubsection{3} +\def\toclevel@paragraph{4} +\def\toclevel@subparagraph{5} +\def\toclevel@figure{1} +\def\toclevel@table{1} + +%% File: latex-lab-sec.dtx (C) Copyright 2022-2023 LaTeX Project +\ifdefined\directlua + \pdfvariable gentounicode =1 + \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode } + \protected\edef\pdfgentounicode {\pdfvariable gentounicode} + \input{glyphtounicode} +\fi +\ifdefined\pdfglyphtounicode + \input{glyphtounicode-cmex} +\fi +\ExplSyntaxOn +\int_new:N\g__kernel_target_int +\RenewDocumentCommand\MakeLinkTarget{sO{}m} + {% + \ifvmode + \special{}% + \else + \@savsf\spacefactor + \smash{}% + \spacefactor\@savsf + \fi + \IfBooleanTF {#1} + { + \tl_gset:Nx \@currentHref {#3} + } + { + \int_gincr:N\g__kernel_target_int + \tl_gset:Nx \@currentHref {target*.\int_use:N\g__kernel_target_int} + } + } +\ExplSyntaxOff + +\endinput +%% +%% End of file `latex-lab-kernel-changes.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathpkg.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathpkg.ltx new file mode 100644 index 00000000000..ca7d617a0a6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathpkg.ltx @@ -0,0 +1,51 @@ +%% +%% This is file `latex-lab-mathpkg.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-mathpkg.dtx (with options: `kernel') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-mathpkg.dtx +\ProvidesFile{latex-lab-mathpkg.ltx} + [2023-01-05 v0.1a mathpkg adaptions] +\RequirePackage{tagpdf-base} +\AddToHook{package/breqn/after}{ + \RegisterMathEnvironment{dmath} + \RegisterMathEnvironment{dgroup*} + \AddToHook{env/dmath/begin}{\tagpdfparaOff} + \AddToHook{env/dgroup*/begin}{\tagpdfparaOff} +} +\AddToHook {package/cases/before}{\RequirePackage{amsmath}} +\AddToHook{package/cases/after}{ + \RegisterMathEnvironment{subnumcases} +} +\endinput +%% +%% End of file `latex-lab-mathpkg.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtagging.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtagging.ltx new file mode 100644 index 00000000000..d333b5ca9a3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtagging.ltx @@ -0,0 +1,660 @@ +%% +%% This is file `latex-lab-mathtagging.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-mathtagging.dtx (with options: `kernel') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-mathtagging.dtx +\def\ltmathtaggingdate{2023-03-08} +\def\ltmathtaggingversion{v0.5a} +\ProvidesFile{latex-lab-mathtagging.ltx} + [\ltmathtaggingdate\space + \ltmathtaggingversion\space + Grab all the math(s) and tag it (experiments)] +\AddToHook{begindocument/before}{\RequirePackage{latex-lab-testphase-block-tagging}} +\ExplSyntaxOn +\tl_gput_right:Nn \@kernel@before@begindocument + { \RequirePackage { amsmath } } +\bool_new:N \l__math_collected_bool +\tl_new:N \g__math_grabbed_env_tl +\tl_new:N \g__math_grabbed_math_tl +\cs_new_protected:Npn \__math_process:nn #1#2 + { + \legacy_if:nF { measuring@ } + { + \tl_if_in:nnF {#2} { \m@th } + { \tl_trim_spaces_apply:nN {#2} \__math_process_auxi:nn {#1} } + } + } +\cs_generate_variant:Nn \__math_process:nn { V } +\cs_new_protected:Npn \__math_process_auxi:nn #1#2 + { + \tl_gset:Nn \g__math_grabbed_env_tl {#2} + \tl_gset:Nn \g__math_grabbed_math_tl {#1} + \__math_process_auxii:nn {#2} {#1} + } +\cs_new_protected:Npn \__math_process_auxii:nn #1#2 { } +\cs_new_protected:Npn \math_processor:n #1 + { \cs_set_protected:Npn \__math_process_auxii:nn ##1##2 {#1} } +\cs_new_protected:Npn \__math_grab_dollar:w % $ + #1 $ + { + \tl_if_blank:nF {#1} + { + \__math_process:nn { math } {#1} % $ + \tagmcend %end P-chunk, in code: \tag_mc_end_push: + \@kernel@math@begin + #1 $ + \@kernel@math@end + \tagmcbegin{} % restart P-chunk (whatsits in pdftex) + } + } + +\skip_new:N \l__math_tmpa_skip + +\cs_new_protected:Npn \__math_grab_dollardollar:w % $$ + #1 $$ + { + \tl_if_blank:nF {#1} + { + \__math_tag_dollardollar_display:nn { equation* }{#1} + #1 + $$ + } + } + +\cs_new_protected:Npn \@kernel@close@P { + \tagmcend %end P-chunk, in code: \tag_mc_end_push: + \int_gincr:N \g__tag_para_end_int + \bool_if:NT \l__tag_para_show_bool + { \tag_mc_begin:n{artifact} + \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int} + \tag_mc_end: + } + \tag_struct_end: +} + +\cs_new_protected:Npn \__math_tag_dollardollar_display:nn #1#2 { + \__math_process:nn {#1} {#2} + \@kernel@close@P + \@kernel@math@begin +%% +} + +\cs_new_protected:Npn \__math_tag_dollardollar_display_end: { + \tagpdfparaOff + \para_raw_end: + \tagpdfparaOn + \l__math_tmpa_skip \lastskip + \@kernel@math@end + \penalty \postdisplaypenalty + \skip_vertical:n { -\l__math_tmpa_skip } + \@doendpe % this has no \end{...} to take care of it +} + +\cs_new_protected:Npn \__math_grab_inline:w % \( + #1 \) + { + \tl_if_blank:nF {#1} + { + \__math_process:nn { math } {#1} + $ #1 $ + } + \bool_set_false:N \l__math_collected_bool + } +\cs_new_protected:Npn \__math_grab_eqn:w % \[ + #1 \] + { + \begin { equation* } #1 \end { equation* } + } +\tl_new:N \l__math_env_name_tl +\keys_define:nn { __math } + { + arg-spec .code:n = + { + \ExpandArgs { c } \DeclareDocumentCommand + { __math_env \l__math_env_name_tl _aux: } + {#1} + { \__math_env_forward:w } + } + } +\cs_new_protected:Npn \math_register_env:nn #1#2 + { + \tl_set:Nn \l__math_env_name_tl {#1} + \keys_set:nn { __math } {#2} + \cs_gset_eq:cc { __math_env_ #1 _begin: } {#1} + \cs_gset_eq:cc { __math_env_ #1 _end: } { end #1 } + \ExpandArgs { nnx } \RenewDocumentEnvironment {#1} { b } + { + \exp_not:N \bool_if:NTF \exp_not:N \l__math_collected_bool + { + } + { + \cs_if_exist:cTF { __math_env #1 _aux: } + { + \exp_not:c { __math_env #1 _aux: } + ####1 \exp_not:N \__math_env_end: {#1} + } + { \exp_not:N \__math_process:nn {#1} {####1} } + \exp_not:n { \@kernel@math@registered@begin } + \bool_set_true:N \exp_not:N \l__math_collected_bool + } + \exp_not:c { __math_env_ #1 _begin: } + ####1 + \exp_not:c { __math_env_ #1 _end: } + } + { + } + } + +\cs_set_protected:Npn \__cs_tmp:w #1 + { + \group_begin: + \exp_args:No \__cs_generate_internal_variant:n + { \tl_to_str:n {#1} } + \group_end: + } +\__cs_tmp:w { nnxx } + +\cs_new_protected:Npn \math_register_halign_env:nn #1#2 + { + \tl_set:Nn \l__math_env_name_tl {#1} + \keys_set:nn { __math } {#2} + \cs_gset_eq:cc { __math_env_ #1 _begin: } {#1} + \cs_gset_eq:cc { __math_env_ #1 _end: } { end #1 } + \ExpandArgs { nnxx } \RenewDocumentEnvironment {#1} { b } + { + \exp_not:N \bool_if:NTF \exp_not:N \l__math_collected_bool + { + } + { + \cs_if_exist:cTF { __math_env #1 _aux: } + { + \exp_not:c { __math_env #1 _aux: } + ####1 \exp_not:N \__math_env_end: {#1} + } + { \exp_not:N \__math_process:nn {#1} {####1} } + \exp_not:n { \@kernel@math@registered@begin } + \bool_set_true:N \exp_not:N \l__math_collected_bool + } + \exp_not:c { __math_env_ #1 _begin: } + ####1 + } + { + \exp_not:c { __math_env_ #1 _end: } + } + } + +\cs_new_protected:Npn \math_register_odd_env:nn #1#2 + { + \tl_set:Nn \l__math_env_name_tl {#1} + \keys_set:nn { __math } {#2} + \cs_gset_eq:cc { __math_env_ #1 _begin: } {#1} + \cs_gset_eq:cc { __math_env_ #1 _end: } { end #1 } + \ExpandArgs { nnxx } \RenewDocumentEnvironment {#1} { b } + { + \exp_not:N \bool_if:NTF \exp_not:N \l__math_collected_bool + { + } + { + \cs_if_exist:cTF { __math_env #1 _aux: } + { + \exp_not:c { __math_env #1 _aux: } + ####1 \exp_not:N \__math_env_end: {#1} + } + { \exp_not:N \__math_process:nn {#1} {####1} } + \exp_not:n { \@kernel@math@registered@begin } + \bool_set_true:N \exp_not:N \l__math_collected_bool + } + \exp_not:c { __math_env_ #1 _begin: } + ####1 + } + { + \exp_not:c { __math_env_ #1 _end: } + \exp_not:n { \@kernel@math@registered@end } + } + } + + +\cs_new:Npn \@kernel@math@registered@begin { + \mode_if_vertical:TF + { + \exp_args:Noo\str_if_eq:nnF \g__tag_struct_tag_tl { \l__tag_para_main_tag_tl } % needs correction! + { + \__block_beginpar_vmode: + } % needs correction! + } + { + \@kernel@close@P + } + \@kernel@math@begin + \tagpdfparaOff +} + +\cs_new:Npn \@kernel@math@registered@end { + \para_raw_end: + \tagpdfparaOn + \@kernel@math@end + \@endpetrue +} + +\cs_new_protected:Npn \math_register_env:n #1 + { \math_register_env:nn {#1} { } } +\NewDocumentCommand \RegisterMathEnvironment { O{} m } + { \math_register_env:nn {#2} {#1} } +\cs_new_protected:Npn \__math_env_forward:w #1 \__math_env_end: #2 + { \__math_process:nn {#2} {#1} } +\tl_gput_right:Nn \@kernel@before@begindocument + { + \math_register_env:n { equation } + \math_register_env:n { equation* } + \RenewDocumentEnvironment{math} {b}{$#1$}{} + \RenewDocumentEnvironment{displaymath} {b}{\[#1\]}{} + } +\cs_gset_protected:Npn \( % \) + { + \bool_if:NTF \l__math_collected_bool + { + \mode_if_math:TF + { \@badmath } + { $ } + } + { + \bool_set_true:N \l__math_collected_bool + \__math_grab_inline:w + } + } % \( +\cs_gset_protected:Npn \) + { + \mode_if_math:TF + { $ } + { \@badmath } + } +\tl_gput_right:Nn \@kernel@before@begindocument + { + \cs_gset_protected:Npn \[ % \] + { + \bool_if:NTF \l__math_collected_bool + { \begin { equation* } } + { \__math_grab_eqn:w } + } % \[ + \cs_gset_protected:Npn \] + { + \bool_if:NTF \l__math_collected_bool + { \end{ equation* } } + { \@badmath } + } + } + +\tl_new:N\tmpmathcontent + +\def\@kernel@math@begin { + \tl_gset:Nx\tmpmathcontent + { + LaTeX~ formula~ starts~ + \exp_not:N\begin{\g__math_grabbed_env_tl} + \space + \exp_not:V\g__math_grabbed_math_tl + \space + \exp_not:N\end{\g__math_grabbed_env_tl} + \space LaTeX~ formula~ ends~ + } + \tagstructbegin{tag=Formula, + AFinline-o=\tmpmathcontent, + title-o=\g__math_grabbed_env_tl, + actualtext=\tmpmathcontent + } + \grabaformulapartandstart +} +\def\@kernel@math@end { + \tagmcend + \if@subformulas + \tagstructend + \else + \fi + \tagstructend +} + +\exp_args:No \tex_everymath:D + { + \tex_the:D \tex_everymath:D + \bool_if:NF \l__math_collected_bool + { + \bool_set_true:N \l__math_collected_bool + \__math_grab_dollar:w + } + } +\exp_args:No \tex_everydisplay:D + { + \tex_the:D \tex_everydisplay:D + \iftrue % this may have to be a settable flag! + \skip_set:Nn \belowdisplayskip {-\belowdisplayskip} + \skip_set:Nn \belowdisplayshortskip {-\belowdisplayshortskip} + \int_set:Nn \postdisplaypenalty {10000} + \group_insert_after:N \__math_tag_dollardollar_display_end: + \fi + \bool_if:NF \l__math_collected_bool + { + \bool_set_true:N \l__math_collected_bool + \__math_grab_dollardollar:w + } + } +\math_register_env:n { eqnarray } +\math_register_env:n { eqnarray* } +\clist_map_inline:nn + { tabular } + { + \AddToHook{ env / #1 / begin } + { \bool_set_true:N \l__math_collected_bool } + } +\cs_new_eq:NN \__math_m@th: \m@th +\cs_gset_protected:Npn \m@th + { + \bool_set_true:N \l__math_collected_bool + \__math_m@th: + } + +\tl_gput_right:Nn \@kernel@before@begindocument { +\renewenvironment{gather*}{% + \start@gather\st@rredtrue +} +{% + % \endgather + \math@cr \black@\totwidth@ \egroup + $$\ignorespacesafterend +} +\def\common@align@ending { + \math@cr \black@\totwidth@ + \egroup + \ifingather@ + \restorealignstate@ + \egroup + \nonumber + \ifnum0=`{\fi\iffalse}\fi + \else + $$% + \fi + \ignorespacesafterend +} +\renewenvironment{alignat}{% + \start@align\z@\st@rredfalse +}{% + \common@align@ending +} +\renewenvironment{alignat*}{% + \start@align\z@\st@rredtrue +}{% + \common@align@ending +} +\renewenvironment{xalignat}{% + \start@align\@ne\st@rredfalse +}{% + \common@align@ending +} +\renewenvironment{xalignat*}{% + \start@align\@ne\st@rredtrue +}{% + \common@align@ending +} +\renewenvironment{xxalignat}{% + \start@align\tw@\st@rredtrue +}{% + \common@align@ending +} +\renewenvironment{align}{% + \start@align\@ne\st@rredfalse\m@ne +}{% + \common@align@ending +} +\renewenvironment{align*}{% + \start@align\@ne\st@rredtrue\m@ne +}{% + \common@align@ending +} +\renewenvironment{flalign}{% + \start@align\tw@\st@rredfalse\m@ne +}{% + \common@align@ending +} +\renewenvironment{flalign*}{% + \start@align\tw@\st@rredtrue\m@ne +}{% + \common@align@ending +} +\renewenvironment{multline*}{\start@multline\st@rredtrue} +{% + \iftagsleft@ \@xp\lendmultline@ \else \@xp\rendmultline@ \fi + \ignorespacesafterend +} +\def\measuring@true{\let\ifmeasuring@\iftrue\tag_stop:} + \math_register_halign_env:nn {align}{} + \math_register_halign_env:nn {align*}{} + \math_register_halign_env:nn {flalign}{} + \math_register_halign_env:nn {flalign*}{} + \math_register_halign_env:nn {gather}{} + \math_register_halign_env:nn {gather*}{} + \math_register_halign_env:nn {multline}{} + \math_register_halign_env:nn {multline*}{} + \math_register_halign_env:nn {xalignat}{} + \math_register_halign_env:nn {xalignat*}{} + \math_register_halign_env:nn {xxalignat}{} + % + \@namedef{maketag @ @ @} #1{% + \ifmeasuring@ + \hbox{\m@th\normalfont#1}% + \else + \tagmcend \tagstructbegin{tag=Lbl}% + \tagmcbegin{tag=Lbl}% + \hbox{\m@th\normalfont#1}% + \tagmcend \tagstructend \tagmcbegin{}% + \fi + } + \def\intertext@{% + \def\intertext##1{% + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip-\belowdisplayskip + \vbox{ + \ifmeasuring@\tag_stop:\fi + \normalbaselines + \ifdim\linewidth=\columnwidth + \else \parshape\@ne \@totalleftmargin \linewidth + \fi + \tag_mc_end_push: + \tagpdfsetup{paratag=P}% + \tagpdfparaOn + \noindent\ignorespaces##1\par + \tag_mc_begin_pop:n{}}% + \penalty\predisplaypenalty\vskip\abovedisplayskip% + }% + } + } +\@namedef{math@cr @ @ @ gather}{% + \ifst@rred\nonumber\fi + &\relax + \make@display@tag + \maybestartnewformulatag + \ifst@rred\else\global\@eqnswtrue\fi + \global\advance\row@\@ne + \cr +} +\@namedef{math@cr @ @ @ align}{% + \ifst@rred\nonumber\fi + \if@eqnsw \global\tag@true \fi + \global\advance\row@\@ne + \add@amps\maxfields@ + \omit + \kern-\alignsep@ + \iftag@ + \setboxz@h{\@lign\strut@{\make@display@tag}}% + \place@tag + \fi + \maybestartnewformulatag + \ifst@rred\else\global\@eqnswtrue\fi + \global\lineht@\z@ + \cr +} +\def\restore@math@cr{\@namedef{math@cr @ @ @}{ + \maybestartnewformulatag + \cr}} +\restore@math@cr +} + +\cs_new:Npn \__math_split_at_nl_first:w #1 \\ #2 \\ #3 \s_stop + { + \quark_if_nil:nTF {#2} + { {#1} { } } + { + \__math_split_chk_if_begin:ww #1 \begin \q_nil \s_mark + #2 \\ #3 \s_stop + } + } +\cs_new:Npn \__math_split_chk_if_begin:ww #1 \begin #2 #3 \s_mark + #4 \\ \q_nil \\ \s_stop + { + \quark_if_nil:nTF {#2} + { {#1} {#4} } + { + \exp_after:wN \__math_split_collect_one_end:w + \__math_split_cleanup_begin_q_nil:w #1 \begin{#2} #3 \\ #4 \s_stop + { } { 1 } + } + } +\cs_new:Npn \__math_split_cleanup_begin_q_nil:w #1 \begin \q_nil {#1} +\cs_new:Npn \__math_split_collect_one_end:w #1 \end #2 #3 \s_stop #4 #5 + { + \exp_args:Nf \__math_split_check_count_begins:nnnn + { \__math_split_count_begins:n { #4 #1 } } {#5} + { #4 #1 \end{#2} } {#3} + } +\cs_new:Npn \__math_split_count_begins:n #1 + { \int_eval:n { 0 \__math_split_count_begins:w #1 \begin \q_nil } } +\cs_new:Npn \__math_split_count_begins:w #1 \begin #2 + { \quark_if_nil:nF {#2} { +1 \__math_split_count_begins:w } } +\cs_new:Npn \__math_split_check_count_begins:nnnn #1 #2 #3 #4 + { + \int_compare:nNnTF {#1} = {#2} + { + \exp_last_unbraced:Nf \__math_split_final_cleanup:nn + { \split:n { \__math_split_guard:n {#3} #4 } } + } + { + \exp_args:No \use_ii_i:nn + { \exp_after:wN { \int_value:w \int_eval:n { #2 + 1 } } } + { \__math_split_collect_one_end:w #4 \s_stop {#3} } + } + } +\cs_new:Npn \__math_split_final_cleanup:nn #1 #2 + { + \exp:w \__math_split_final_cleanup:w #1 + \__math_split_guard:n \q_nil \s_mark { } + {#2} + } +\cs_new:Npn \__math_split_final_cleanup:w #1 \__math_split_guard:n #2 #3 \s_mark #4 + { + \quark_if_nil:nTF {#2} + { \exp_end: { #4 #1 } } + { \__math_split_final_cleanup:w #3 \s_mark { #4 #1 #2 } } + } +\NewDocumentCommand \splitnl { mm +m } + { + \tl_set:Nf \l_tmpa_tl { \split:n {#3} } + \show \l_tmpa_tl + \exp_after:wN \__splitnl_aux:nnNN \l_tmpa_tl #1 #2 + } + +\cs_new:Npn \split:n #1 { + \__math_split_at_nl_first:w #1 \\ \q_nil \\ \s_stop } + +\cs_new:Npn \__math_split_at_nl:NN #1#2 { + \tl_set:Nf \l_tmpa_tl { + \exp_after:wN \__math_split_at_nl_first:w #1 \\ \q_nil \\ \s_stop } + \exp_after:wN \__math_split_at_nl_aux:nnNN \l_tmpa_tl #1 #2 +} + +\cs_new_protected:Npn \__math_split_at_nl_aux:nnNN #1 #2 #3 #4 + { + \tl_gset:Nn #4 {#1} + \tl_gset:Nn #3 {#2} +} + + +\newif\if@subformulas +\tl_new:N \result + +\cs_new_protected:Npn\grabaformulapartandstart { + \__math_split_at_nl:NN \g__math_grabbed_math_tl \result + \typeout{====>first-result=\meaning\result} + \typeout{====>first-tmpmathcontent=\meaning\g__math_grabbed_math_tl} + \tl_if_empty:NTF \g__math_grabbed_math_tl + { + \typeout{====>formula~ has~ no~ subparts} + \global\@subformulasfalse + } + { + \typeout{====>formula~ has~ subparts} + \global\@subformulastrue + \edef\resulttitle{\g__math_grabbed_env_tl\space (part)} + \tagstructbegin{tag=Formula, + title-o=\resulttitle + } + } + \tagmcbegin{} +} + +\cs_new_protected:Npn\grabaformulapartandmayberestart { + \__math_split_at_nl:NN \g__math_grabbed_math_tl \result + \typeout{====>result=\meaning\result} + \typeout{====>tmpmathcontent=\meaning\g__math_grabbed_math_tl} + \edef\resulttitle{\g__math_grabbed_env_tl\space (part)} + \tagstructbegin{tag=Formula, + alt=\result, + title-o=\resulttitle + } + \tagmcbegin{} +} +\def\maybestartnewformulatag { +\if@subformulas + \ifmeasuring@\else + \tl_if_empty:NF \g__math_grabbed_math_tl + { + \tagmcend + \tagstructend + \grabaformulapartandmayberestart + } + \fi +\fi +} +\ExplSyntaxOff + +\endinput +%% +%% End of file `latex-lab-mathtagging.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx new file mode 100644 index 00000000000..575490f5803 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx @@ -0,0 +1,152 @@ +%% +%% This is file `latex-lab-mathtools.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-mathtools.dtx (with options: `kernel') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-mathtools.dtx +\ProvidesFile{latex-lab-mathtools.ltx} + [2023-01-05 v0.1a mathtools adaptions] +\RequirePackage{tagpdf-base} +\ExplSyntaxOn +\tl_new:N\l__math_mathtools_init_tl +\AddToHook{package/mathtools/after} + {% + \cs_if_eq:NNTF\intertext@ \MT_intertext: + { + \tl_set:Nn \l__math_mathtools_init_tl {\MT_orig_intertext_false:} + } + { + \tl_set:Nn \l__math_mathtools_init_tl {\MT_orig_intertext_true:} + } + \cs_if_eq:NNTF\shortintertext@ \MT_shortintertext:n + { + \tl_put_right:Nn \l__math_mathtools_init_tl + {\MT_orig_shortintertext_false:} + } + { + \tl_put_right:Nn \l__math_mathtools_init_tl + {\MT_orig_shortintertext_true:} + } + \def\MT_intertext: {% + \def\intertext##1{% + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip\belowdisplayskip + \vskip-\lineskiplimit % CCS + \vskip\normallineskiplimit % CCS + \vskip\l_MT_above_intertext_sep + \vbox{% + \ifmeasuring@\tag_stop:\fi + \normalbaselines + \ifdim + \ifdim\@totalleftmargin=\z@ + \linewidth + \else + -\maxdimen + \fi + =\columnwidth + \else \parshape\@ne \@totalleftmargin \linewidth + \fi + \tag_mc_end_push: + \tagpdfsetup{paratag=Span} + \noindent\ignorespaces##1\par + \tag_mc_begin_pop:n{}}% + \penalty\predisplaypenalty\vskip\abovedisplayskip% + \vskip-\lineskiplimit % CCS + \vskip\normallineskiplimit % CCS + \vskip\l_MT_below_intertext_sep + }% + }% + \MH_let:NwN \shortintertext \shortintertext@ + } + \def\MT_orig_shortintertext:n #1{% + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip\abovedisplayshortskip + \vbox{% + \ifmeasuring@\tag_stop:\fi + \normalbaselines + \MH_if_dim:w + \MH_if_dim:w \@totalleftmargin=\z@ + \linewidth + \MH_else: + -\maxdimen + \MH_fi: + =\columnwidth + \MH_else: + \parshape\@ne \@totalleftmargin \linewidth + \MH_fi: + \tag_mc_end_push: + \tagpdfsetup{paratag=Span} + \noindent\ignorespaces#1\par + \tag_mc_begin_pop:n{}} + \penalty\predisplaypenalty\vskip\abovedisplayshortskip% + }% + } + + \def\MT_shortintertext:n #1{% + \ifvmode\else\\\@empty\fi + \noalign{% + \penalty\postdisplaypenalty\vskip\abovedisplayshortskip + \vskip-\lineskiplimit + \vskip\normallineskiplimit + \vskip\l_MT_above_shortintertext_sep + \vbox{% + \ifmeasuring@\tag_stop:\fi + \normalbaselines + \MH_if_dim:w + \MH_if_dim:w \@totalleftmargin=\z@ + \linewidth + \MH_else: + -\maxdimen + \MH_fi: + =\columnwidth + \MH_else: + \parshape\@ne \@totalleftmargin \linewidth + \MH_fi: + \tag_mc_end_push: + \tagpdfsetup{paratag=Span} + \noindent\ignorespaces#1\par + \tag_mc_begin_pop:n{}}% + \penalty\predisplaypenalty\vskip\abovedisplayshortskip% + \vskip-\lineskiplimit + \vskip\normallineskiplimit + \vskip\l_MT_below_shortintertext_sep + }% + } + + \l__math_mathtools_init_tl +} +\ExplSyntaxOff +\endinput +%% +%% End of file `latex-lab-mathtools.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty new file mode 100644 index 00000000000..62e98a45f63 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty @@ -0,0 +1,178 @@ +%% +%% This is file `latex-lab-testphase-bib.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-bib.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-bib.dtx (C) Copyright 2023 LaTeX Project +\ProvidesExplPackage {latex-lab-testphase-bib} {2023-05-18} {0.8} + {Code related to the tagging of bibliography and cite command} +\RequirePackage{latex-lab-testphase-block-tagging} +\def\hyper@nopatch@bib{} + +\providecommand*\@extra@binfo{}% +\providecommand\@extra@b@citeb{} +\tl_new:N\l__tag_bib_citekey_tl +\AddToHookWithArguments{cmd/@lbibitem/before} + { + \tl_set:Nn\l__tag_bib_citekey_tl{#2} + } +\AddToHookWithArguments{cmd/@lbibitem/before}[latex-lab-testphase-bib/target] + { + \AddToHookNext{para/begin} + { + \makebox[0pt][r]{\MakeLinkTarget*{cite.#2\@extra@b@citeb}\hspace{\leftmargin}} + } + } +\let\@kernel@copy@lbibitem\@lbibitem +\AddToHookWithArguments{cmd/@bibitem/before} + { + \tl_set:Nn\l__tag_bib_citekey_tl{#1} + } +\AddToHookWithArguments{cmd/@bibitem/before}[latex-lab-testphase-bib/target] + { + \AddToHookNext{para/begin} + { + \makebox[0pt][r]{\MakeLinkTarget*{cite.#1\@extra@b@citeb}\hspace{\leftmargin}} + } + } +\let\@kernel@copy@bibitem\@bibitem +\AddToHook{env/thebibliography/begin} + { + \cs_set:Npn \__block_list_item_begin: + { + \tag_struct_begin:n + { + tag=\LItag, + label= cite.\l__tag_bib_citekey_tl\@extra@b@citeb + } + } + } +\NewMirroredHookPairWithArguments{bibcite/before}{bibcite/after}{2} +\def\bibcite#1#2{% + \@newl@bel{b}{#1\@extra@binfo}{% + \UseHookWithArguments{bibcite/before}{2}{#1}{#2} + #2 + \UseHookWithArguments{bibcite/after}{2}{#1}{#2} + }% + }% +\let\@kernel@copy@bibcite\bibcite +\AddToHookWithArguments{bibcite/before} + { + \tag_mc_end_push: + \exp_args:Nx\tagstructbegin{tag=Reference,ref=cite.#1\@extra@b@citeb} + \tagmcbegin{} + } +\AddToHookWithArguments{bibcite/after}[tag] + { + \tag_mc_end: + \tagstructend + \tag_mc_begin_pop:n{} + } +\AddToHook{package/hyperref/after} + { + \AddToHookWithArguments{bibcite/before} + { + \hyper@linkstart{cite}{cite.#1\@extra@b@citeb} + } + \AddToHookWithArguments{bibcite/after}{\hyper@linkend} + } +\newcommand\hyper@natlinkstart[1]{} +\newcommand\hyper@natlinkend{} +\AddToHook{package/natbib/after} + { + \RemoveFromHook{cmd/@bibitem/before} [latex-lab-testphase-bib/target] + \RemoveFromHook{cmd/@lbibitem/before}[latex-lab-testphase-bib/target] + } +\AddToHookWithArguments{cmd/hyper@natlinkstart/before} + { + \leavevmode + \tag_mc_end_push: + \exp_args:Nx\tag_struct_begin:n{tag=Reference,ref=cite.#1\@extra@b@citeb} + \tag_mc_begin:n{} + } +\AddToHook{cmd/hyper@natlinkend/after} + { + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } + +\AddToHook{package/hyperref/after} + { + \renewcommand\hyper@natlinkstart[1]{} + \renewcommand\hyper@natlinkend{} + \AddToHookWithArguments{cmd/hyper@natlinkstart/before} + { + \Hy@backout{#1}% + \hyper@linkstart{cite}{cite.#1}% + \def\hyper@nat@current{#1} + } + \AddToHook{cmd/hyper@natlinkend/after} + { + \hyper@linkend + } + } + +\AddToHook{cmd/blx@bibinit/after} + { + \cs_set:Npn \__block_list_item_begin: + { + \xifinlist{\the\c@refsection @\abx@field@entrykey}{\blx@anchors} + { + \tag_struct_begin:n + { + tag=\LItag, + } + } + { + \tag_struct_begin:n + { + tag=\LItag, + label= cite.\the\c@refsection @\abx@field@entrykey + } + } + } + } +\AddToHook{package/biblatex/after} + { + \appto\blx@mknohyperref + { + \let\blx@anchors\@empty + \protected\def\blx@anchor{% + \xifinlist{\the\c@refsection @\abx@field@entrykey}{\blx@anchors} + {} + {\listxadd\blx@anchors{\the\c@refsection @\abx@field@entrykey}}}% + } + } +\endinput +%% +%% End of file `latex-lab-testphase-bib.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block-tagging.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block-tagging.sty new file mode 100644 index 00000000000..c65c155fc5c --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block-tagging.sty @@ -0,0 +1,1426 @@ +%% +%% This is file `latex-lab-testphase-block-tagging.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-block-tagging.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-block-tagging.dtx (C) Copyright 2021-2023 LaTeX Project + +\def\ltblocksversion{v0.8d} +\def\ltblocksdate{2023/06/07} + +\ProvidesPackage {latex-lab-testphase-block-tagging} + [\ltblocksdate\space \ltblocksversion\space + blockenv implementation] +\RequirePackage{xtemplate} +\RequirePackage{latex-lab-kernel-changes} +\ExplSyntaxOn +\tl_new:N \l__block_item_align_tl +\tl_new:N\l__block_legacy_env_params_tl + +\def\@doendpe{\@endpetrue + \def\par + { + \@restorepar + \clubpenalty\@clubpenalty + \__kernel_displayblock_doendpe: + \@endpefalse + \everypar{} + \par + } + \everypar{{\setbox\z@\lastbox} + \everypar{} + \@endpefalse + } +} +\cs_new_eq:NN \__kernel_displayblock_doendpe: \prg_do_nothing: +\def\@endpetrue {\global\let\if@endpe\iftrue} +\def\@endpefalse{\global\let\if@endpe\iffalse} +\DeclareObjectType{blockenv}{1} +\DeclareObjectType{block}{1} +\DeclareObjectType{para}{1} +\DeclareObjectType{list}{1} +\DeclareObjectType{item}{1} +\DeclareTemplateInterface{blockenv}{display}{1} +{ + env-name : tokenlist , + tag-name : tokenlist , + tag-class : tokenlist , + tagging-recipe : tokenlist = standard, + level-increase : boolean = true , + setup-code : tokenlist , + block-instance : tokenlist = displayblock , + para-instance : tokenlist , + inner-level-counter : tokenlist, + max-inner-levels : tokenlist = 4, + inner-instance-type : tokenlist = list , + inner-instance : tokenlist , + para-flattened : boolean = false , + final-code : tokenlist = \ignorespaces , +} +\DeclareTemplateInterface{block}{display}{1} +{ + heading : tokenlist = , %?? + beginsep : skip = \topsep , + begin-par-skip : skip = \partopsep , + par-skip : skip = \parsep , + end-skip : skip = \KeyValue{beginsep} , % conflict with name below + end-par-skip : skip = \KeyValue{begin-par-skip} , + beginpenalty : integer = \UseName{@beginparpenalty} , + endpenalty : integer = \UseName{@endparpenalty} , + leftmargin : length = \leftmargin , + rightmargin : length = \rightmargin , + parindent : length = \listparindent , +} +\DeclareTemplateInterface{para}{std}{1} +{ + indent-width : length = \parindent , + start-skip : skip = 0pt , + left-skip : skip = 0pt , + right-skip : skip = 0pt , + end-skip : skip = \@flushglue , + fixed-word-spaces : boolean = false , + final-hyphen-demerits : integer = 5000 , + cr-cmd : tokenlist = \@normalcr , + para-class : tokenlist = justify , +} +\DeclareTemplateInterface{list}{std}{1} % optional +{ + counter : tokenlist = , + item-label : tokenlist = , + start : integer = 1 , + resume : boolean = false , + item-instance : instance{item} = basic , + item-skip : skip = \itemsep , + item-penalty : integer = \UseName{@itempenalty} , + item-indent : length = 0pt , % was \itemindent + label-width : length = \labelwidth , + label-sep : length = \labelsep , + legacy-support : boolean = false , +} +\DeclareTemplateInterface{item}{std}{1} + { + counter-label : function{1} = \arabic{#1} , + counter-ref : function{1} = \KeyValue{counter-label} , + label-ref : function{1} = #1 , + label-autoref : function{1} = item~#1 , + label-format : function{1} = #1 , + label-strut : boolean = false , + label-align : choice {left,center,right,parleft} = right , + label-boxed : boolean = true , + next-line : boolean = false , + text-font : tokenlist , + compatibility : boolean = true , + } +\cs_new_protected:Npn \__block_skip_set_to_last:N #1 { + \skip_set:Nn #1 { \tex_lastskip:D } +} +\cs_new_eq:NN \__block_skip_remove_last: \tex_unskip:D +\cs_generate_variant:Nn \tl_if_novalue:nTF { o } +\cs_if_exist:NF \tag_if_active:T + { \cs_new_eq:NN \tag_if_active:T \use_none:n } +\bool_new:N \g__block_debug_bool +\cs_new_eq:NN \__block_debug:n \use_none:n +\cs_new_eq:NN \__block_debug_typeout:n \use_none:n +\cs_new_protected:Npn \block_debug_on: + { + \bool_gset_true:N \g__block_debug_bool + \__block_debug_gset: + } +\cs_new_protected:Npn \block_debug_off: + { + \bool_gset_false:N \g__block_debug_bool + \__block_debug_gset: + } +\cs_new_protected:Npn \__block_debug_gset: + { + \cs_gset_protected:Npx \__block_debug:n ##1 + { \bool_if:NT \g__block_debug_bool {##1} } + \cs_gset_protected:Npx \__block_debug_typeout:n ##1 + { \bool_if:NT \g__block_debug_bool { \typeout{==>~ ##1} } } + } +\cs_new_protected:Npn \DebugBlocksOn { \block_debug_on: } +\cs_new_protected:Npn \DebugBlocksOff { \block_debug_off: } +\DebugBlocksOff +\NewDocumentEnvironment{displayblock}{ !O{} } + { \UseInstance{blockenv}{displayblock} {#1} } + { \endblockenv } +\NewDocumentEnvironment{displayblockflattened}{ !O{} } + { \UseInstance{blockenv}{displayblockflattened} {#1} } + { \endblockenv } +\AddToHook{begindocument/before}{ + \RenewDocumentEnvironment{center} { !O{} } + { \UseInstance{blockenv}{center}{#1} } + { \endblockenv } + \RenewDocumentEnvironment{flushright} { !O{} } + { \UseInstance{blockenv}{flushright}{#1} } + { \endblockenv } + \RenewDocumentEnvironment{flushleft} { !O{} } + { \UseInstance{blockenv}{flushleft}{#1} } + { \endblockenv } +} +\AddToHook{begindocument/before}{ + \RenewDocumentEnvironment{quote}{ !O{} } + { \UseInstance{blockenv}{quote} {#1} } + { \endblockenv } + \RenewDocumentEnvironment{quotation}{ !O{} } + { \UseInstance{blockenv}{quotation} {#1} } + { \endblockenv } +} +\AddToHook{begindocument/before}{ + \RenewDocumentEnvironment{verbatim}{ !O{} } + { \UseInstance{blockenv}{verbatim} {#1} + \@setupverbinvisiblespace\frenchspacing\@vobeyspaces + \@xverbatim + } + { \endblockenv } + \RenewDocumentEnvironment{verbatim*}{ !O{} } + { \UseInstance{blockenv}{verbatim} {#1} + \@setupverbvisiblespace\frenchspacing\@vobeyspaces + \@sxverbatim + } + { \endblockenv } +} +\def\legacyverbatimsetup{% + \language\l@nohyphenation + \@tempswafalse + \def\par{% + \if@tempswa + \leavevmode \null {\@@par}\penalty\interlinepenalty + \else + \@tempswatrue + \ifhmode{\@@par}\penalty\interlinepenalty\fi + \fi}% + \let\do\@makeother \dospecials + \obeylines \verbatim@font \@noligs + \everypar \expandafter{\the\everypar \unpenalty}% + \tl_set:Nn \l__tag_para_main_tag_tl {codeline} + \tagtool{paratag=Code}% oder faster: \tl_set:Nn\l__tag_para_tag_tl{Code} +} +\newcommand\@setupverbinvisiblespace{} +\tag_if_active:T { + \bool_if:NF\g__tag_mode_lua_bool + { + \renewcommand\@setupverbinvisiblespace{\def\@xobeysp{\nobreakspace\pdffakespace}} + } +} +\AddToHook{begindocument/before}{ + \RenewDocumentEnvironment{itemize}{!O{}} + { \UseInstance{blockenv}{itemize} {#1} } + { \endblockenv } + \RenewDocumentEnvironment{enumerate}{!O{}} + { \UseInstance{blockenv}{enumerate} {#1} } + { \endblockenv } + \RenewDocumentEnvironment{description}{!O{}} + { \UseInstance{blockenv}{description} {#1} } + { \endblockenv } +} +\AddToHook{begindocument/before}{ + \RenewDocumentEnvironment{list}{O{} m m } + { + \tl_set:Nn \@itemlabel {#2} + \tl_set:Nn \l__block_legacy_env_params_tl {#3} + \UseInstance{blockenv}{list} {#1} + } + { \endblockenv } +} +\tag_if_active:T { + \tagpdfsetup{add-new-tag={tag=list,role=L}} +} +\tl_new:N \l__block_env_params_tl +\cs_new:Npn \legacylistsetupcode { + \dim_zero:N \listparindent + \dim_zero:N \rightmargin + \dim_zero:N \itemindent + \tl_set:Nn \@listctr {} + \legacy_if_set_false:n { @nmbrlist } % needed if lists are nested + \let\makelabel\@mklab % TODO: customize + \l__block_legacy_env_params_tl + \legacy_if:nTF { @nmbrlist } + { \tl_set:Nn \l__tag_L_attr_class_tl {enumerate} } % numbered list + { \tl_if_empty:NTF \@itemlabel + { \tl_set:Nn \l__tag_L_attr_class_tl {list} } % no label + { \tl_set:Nn \l__tag_L_attr_class_tl {itemize} } % unnumbered, unordered + } +} +\AddToHook{begindocument/before}{ + \RenewDocumentEnvironment{trivlist}{ !O{} } + { \list[#1]{} + { + \dim_zero:N \leftmargin + \dim_zero:N \labelwidth + \cs_set_eq:NN \makelabel \use:n + } + } + { \endblockenv } +} +\RenewDocumentCommand \newtheorem { m O{#1} m o } +{ + \expandafter\@ifdefinable\csname #1\endcsname + { + \str_if_eq:nnTF{#1}{#2} + { + \@definecounter {#2} + \IfNoValueTF {#4} + { % @ynthm + \tl_gset:cx { the #2 } + { + \@thmcounter{#2} + } + } + { % @xnthm + \@newctr{#1}[#4] + \tl_gset:cx { the #2 } + { + \expandafter\noexpand\csname the#4\endcsname + \@thmcountersep + \@thmcounter{#2} + } + } + } + { % @othm + \@ifundefined{c@#2} + { \@nocounterr{#2} } + { + \tl_gset:cn { the #1 } + { \UseName { the #2 } } + } + } + \global\@namedef{#1} { \@thm{#2}{#3} } + \global\@namedef{end#1}{ \@endtheorem } + } +} +\def\@begintheorem#1#2{ + \UseInstance{blockenv}{theorem}{} + \tagpdfparaOff + \mode_leave_vertical: + \tag_struct_begin:n{tag=Caption} + \group_begin: + \bfseries + \tag_mc_begin:n {} + #1\ + \tag_mc_end: + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n {} + #2 + \tag_mc_end: + \tag_struct_end: + \group_end: + \tag_struct_end: + \tagpdfparaOn + \__block_start_para_structure_unconditionally:n { \PARALABEL } + \itshape + \hskip\labelsep + \ignorespaces +} +\def\@opargbegintheorem#1#2#3{ + \UseInstance{blockenv}{theorem}{} + \tagpdfparaOff + \mode_leave_vertical: + \tag_struct_begin:n{tag=Caption} + \group_begin: + \bfseries + \tag_mc_begin:n {} + #1\ + \tag_mc_end: + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n {} + #2 + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n {} + \ (#3) + \tag_mc_end: + \group_end: + \tag_struct_end: + \tagpdfparaOn + \__block_start_para_structure_unconditionally:n { \PARALABEL } + \itshape + \hskip\labelsep + \ignorespaces +} +\def\@endtheorem{\endblockenv} +\cs_new:Npn \g_block_nesting_depth_int { \@listdepth } % a fake int + % for now +\DeclareTemplateCode{blockenv}{display}{1} +{ + env-name = \l__block_env_name_tl , + tag-name = \l__block_tag_name_tl , + tag-class = \l__block_tag_class_tl , + tagging-recipe = \l__block_tagging_recipe_tl , + level-increase = \l__block_level_incr_bool , + setup-code = \l__block_setup_code_tl , + block-instance = \l__block_block_instance_tl , + para-instance = \l__block_para_instance_tl , + inner-level-counter = \l__block_inner_level_counter_tl , + max-inner-levels = \l__block_max_inner_levels_tl , + inner-instance-type = \l__block_inner_instance_type_tl , + inner-instance = \l__block_inner_instance_tl , + para-flattened = \l__tag_para_flattened_bool , + final-code = \l__block_final_code_tl , +} +{ + \__block_debug_typeout:n{\l__block_env_name_tl -env-start} + \tl_if_empty:nF {#1} { \SetTemplateKeys{blockenv}{display}{#1} } + % \begin{macrocode} + \int_compare:nNnTF \l__block_flattened_level_int > 0 + { + \int_incr:N \l__block_flattened_level_int + } + { + \bool_if:NT \l__tag_para_flattened_bool + { + \int_incr:N \l__block_flattened_level_int + } + } + \tl_if_empty:NF \l__block_inner_level_counter_tl + { + \int_compare:nNnTF \l__block_inner_level_counter_tl > + { \l__block_max_inner_levels_tl - 1 } + { \@toodeep } + { \int_incr:N \l__block_inner_level_counter_tl } % not clean "o"? + } + \bool_if:NT \l__block_level_incr_bool + { + \int_compare:nNnTF \g_block_nesting_depth_int > + { \c@maxblocklevels - 1 } + { \@toodeep } + { + \int_gincr:N \g_block_nesting_depth_int + \use:c { @list \int_to_roman:n { \g_block_nesting_depth_int } } + } + } + \tag_if_active:T { \use:c { __block_recipe_ \l__block_tagging_recipe_tl : } } + \l__block_setup_code_tl + \__block_debug_typeout:n{use~ instance:~ + \l__block_block_instance_tl - \int_use:N \g_block_nesting_depth_int } + \UseInstance{block} + { \l__block_block_instance_tl - \int_use:N + \g_block_nesting_depth_int } + {#1} + \tl_if_empty:NF \l__block_para_instance_tl + { + \__block_debug_typeout:n{use~ para~ instance:~ \l__block_para_instance_tl } + \UseInstance{para}{ \l__block_para_instance_tl } {} + } + \tl_if_empty:NF \l__block_inner_instance_tl + { + \__block_debug_typeout:n{use~ instance:~ \l__block_inner_instance_tl + \tl_if_empty:NF \l__block_inner_level_counter_tl + { - \int_use:N \l__block_inner_level_counter_tl }} + \UseInstance{ \l__block_inner_instance_type_tl } + { \l__block_inner_instance_tl + \tl_if_empty:NF \l__block_inner_level_counter_tl + { - \int_use:N \l__block_inner_level_counter_tl } % not clean + % use "o"? + } + {#1} + } + \l__block_final_code_tl +} +\int_new:N \l__block_flattened_level_int +\newcounter{maxblocklevels} +\setcounter{maxblocklevels}{6} +\cs_new:Npn \endblockenv { + \__block_debug_typeout:n{blockenv~ common~ ending \on@line} + \bool_if:NT \l__block_level_incr_bool + { \int_gdecr:N \g_block_nesting_depth_int } + \legacy_if:nT { @inlabel } + { + \mode_leave_vertical: + \legacy_if_gset_false:n { @inlabel } + } + \legacy_if:nT { @newlist } + { + \@noitemerr + \legacy_if_gset_false:n { @newlist } + } + \mode_if_horizontal:TF + { \__block_skip_remove_last: \__block_skip_remove_last: \par } + { \@inmatherr{\end{\@currenvir}} } + \__kernel_displayblock_end: + \legacy_if:nF { @noparlist } + { + \__block_skip_set_to_last:N \l_tmpa_skip + \dim_compare:nNnT \l_tmpa_skip > \c_zero_dim + { + \skip_vertical:n { - \l_tmpa_skip } + \skip_vertical:n { \l_tmpa_skip + \parskip - \@outerparskip } + } + \addpenalty \@endparpenalty + \addvspace \l__block_topsepadd_skip + } + % \begin{macrocode} + \bool_if:NTF \l__block_standalone_bool + { \legacy_if_gset_false:n { @endpe } } + { \legacy_if_gset_true:n { @endpe } } +} +\cs_new:Npn \__kernel_displayblock_end: { + \__block_debug_typeout:n{\detokenize{__kernel_displayblock_end:}} +} +\bool_new:N \l__block_standalone_bool +\bool_set_false:N \l__block_standalone_bool +\DeclareTemplateCode{para}{std}{1} +{ + indent-width = \parindent , + start-skip = \l__par_start_skip , % name?? + left-skip = \leftskip , + right-skip = \rightskip , + end-skip = \parfillskip , + fixed-word-spaces = \l__par_fixed_word_spaces_bool , % name?? + final-hyphen-demerits = \finalhyphendemerits , + cr-cmd = \\ , + para-class = \l_tag_para_attr_class_tl , +} +{ + \tl_if_empty:nF {#1} { \SetTemplateKeys{para}{std}{#1} } + \skip_set:Nn \@rightskip \rightskip +} +\DeclareTemplateCode{block}{display}{1} +{ + heading = \l__block_heading_tl , + beginsep = \topsep , + begin-par-skip = \partopsep , + par-skip = \parsep , + end-skip = \l__block_botsep_skip , + end-par-skip = \l__block_parbotsep_skip , + beginpenalty = \@beginparpenalty , + endpenalty = \@endparpenalty , + rightmargin = \rightmargin , + leftmargin = \leftmargin , + parindent = \listparindent , +} +{ + \tl_if_empty:nF {#1} { \SetTemplateKeys{block}{display}{#1} } + \tl_if_blank:oF \l__block_heading_tl + { \mode_leave_vertical: \textbf{\l__block_heading_tl} } % TODO customize + \legacy_if:nT { @noskipsec } { \mode_leave_vertical: } + \skip_set:Nn \l__block_topsepadd_skip { \topsep } + \mode_if_vertical:TF + { + \skip_add:Nn \l__block_topsepadd_skip { \partopsep } + \__kernel_displayblock_beginpar_vmode: + } + { + \__block_skip_remove_last: \__block_skip_remove_last: + \__kernel_displayblock_beginpar_hmode:w \par + } + \legacy_if:nTF { @inlabel } + { + \legacy_if_set_true:n { @noparitem } + \legacy_if_set_true:n { @noparlist } + } + { + \legacy_if:nT { @newlist } { \@noitemerr } + \legacy_if_set_false:n { @noparlist } + \skip_set_eq:NN \l__block_effective_top_skip \l__block_topsepadd_skip + } + \skip_add:Nn \l__block_effective_top_skip { \parskip } + \skip_zero:N \leftskip + \skip_set_eq:NN \rightskip \@rightskip + \skip_set_eq:NN \parfillskip \@flushglue + \int_zero:N \par@deathcycles + \@setpar + { + \legacy_if:nTF { @newlist } + { + \int_incr:N \par@deathcycles + \int_compare:nNnTF \par@deathcycles > { 1000 } + { \@noitemerr + { \para_end: } + } + } + { + { \para_end: } + } + } + \skip_set_eq:NN \@outerparskip \parskip + \skip_set_eq:NN \parskip \parsep + \dim_set_eq:NN \parindent \listparindent + \dim_add:Nn \linewidth { - \rightmargin - \leftmargin } + \dim_add:Nn \@totalleftmargin { \leftmargin } + \tex_parshape:D 1 ~ \@totalleftmargin \linewidth + \__kernel_displayblock_begin: + \legacy_if:nTF { @noparitem } + { + \legacy_if_set_false:n { @noparitem } + \hbox_gset:Nn \g__block_labels_box + { + \skip_horizontal:n { - \leftmargin } + \hbox_unpack_drop:N \g__block_labels_box + \skip_horizontal:n { \leftmargin } + } + \legacy_if:nF { @minipage } % Why this chunk of code? + { + \__block_skip_set_to_last:N \l__block_tmpa_skip + \skip_vertical:n { - \l__block_tmpa_skip } + \skip_vertical:n { \l__block_tmpa_skip + \@outerparskip - \parskip } + } + } + { + \legacy_if:nTF { @nobreak } + { \addvspace{\skip_eval:n{\@outerparskip-\parskip}} } + { + \addpenalty \@beginparpenalty + \addvspace \l__block_effective_top_skip + \addvspace{-\parskip} + } + } +} +\keys_define:nn { template/block/display } +{ + ,topsep .skip_set:N = \topsep + ,partopsep .skip_set:N = \partopsep + ,listparindent .skip_set:N = \listparindent +} +\cs_new:Npn \__kernel_displayblock_begin: { + \__block_debug_typeout:n{\detokenize{__kernel_displayblock_begin:}} +} +\cs_new:Npn \__kernel_displayblock_beginpar_hmode:w { + \__block_debug_typeout:n{\detokenize{__kernel_displayblock_beginpar_hmode:w}} +} +\cs_new:Npn \__kernel_displayblock_beginpar_vmode: { + \__block_debug_typeout:n{\detokenize{__kernel_displayblock_beginpar_vmode:}} +} +\tl_new:N \@itemlabel % should have a top-level definition +\tl_new:N \@listctr % should have a top-level definition +\DeclareTemplateCode{list}{std}{1} +{ + counter = \l__block_counter_tl, + item-label = \l__block_item_label_tl, + start = \l__block_counter_start_int , + resume = \l__block_resume_bool , + item-instance = \__block_item_instance:n , + item-skip = \itemsep , + item-penalty = \@itempenalty , + item-indent = \itemindent , + label-width = \labelwidth , + label-sep = \labelsep , + legacy-support = \l__block_legacy_support_bool , % FMi questionable +} +{ + \__block_debug_typeout:n{template:list:std} + \tl_if_empty:nF {#1} { \SetTemplateKeys{list}{std}{#1} } + \tl_if_empty:NTF \l__block_counter_tl + { + \tl_if_blank:oF \@listctr + { + \bool_if:NF \l__block_resume_bool + { + \int_gset:cn{ c@ \@listctr } + { \l__block_counter_start_int - 1 } + } + } + { \@nmbrlistfalse } + } + { + \@nmbrlisttrue + \tl_set_eq:NN \@listctr \l__block_counter_tl + \bool_if:NF \l__block_resume_bool + { + \int_gset:cn{ c@ \@listctr } + { \l__block_counter_start_int - 1 } + } + } + \tl_if_empty:NF \l__block_item_label_tl + { + \tl_set_eq:NN \@itemlabel \l__block_item_label_tl + } + \legacy_if_gset_true:n { @newlist } + \__block_debug_typeout:n{template:list:std~end} +} +\keys_define:nn { template/list/std } +{ + ,nosep .code:n = + \dim_zero:N \itemsep + \dim_zero:N \parsep + \dim_zero:N \topsep + \dim_zero:N \l__block_botsep_skip + \dim_zero:N \l__block_parbotsep_skip + ,midsep .skip_set:N = \topsep +} +\keys_define:nn { template/item/std } + { label .tl_set:N = \l__block_label_given_tl } +\DeclareTemplateCode{item}{std}{1} + { + counter-label = \__block_counter_label:n , + counter-ref = \__block_counter_ref:n , + label-ref = \__block_label_ref:n , + label-autoref = \__block_label_autoref:n , + label-format = \__block_label_format:n , + label-strut = \l__block_label_strut_bool , + label-boxed = \l__block_label_boxed_bool , + next-line = \l__block_next_line_bool , + text-font = \l__block_text_font_tl , + compatibility = \l__block_item_compatibility_bool , + label-align = { + left = \tl_set:Nn \l__block_item_align_tl { \relax \hss } , + center = \tl_set:Nn \l__block_item_align_tl { \hss \hss } , + right = \tl_set:Nn \l__block_item_align_tl { \hss \relax } , + parleft = \NOT_IMPLEMENTED , + } , + } + { + \__block_debug_typeout:n{template:item:std} + \tl_set_eq:NN \l__block_label_given_tl \c_novalue_tl + \tl_if_empty:nF{#1}{ \SetTemplateKeys{item}{std}{#1} } + \tl_if_novalue:oTF \l__block_label_given_tl + { + \tl_if_blank:oF \@listctr { \@kernel@refstepcounter \@listctr } + \bool_if:NTF \l__block_item_compatibility_bool % not sure that conditional + % makes sense + { \__block_make_label_box:n { \MakeLinkTarget[\@listctr]{}\@itemlabel } } % TODO ? + { \__block_make_label_box:n { \MakeLinkTarget[\@listctr]{}\__block_counter_label:n { \@listctr } } } + } + { + \__block_debug_typeout:n{item~ with~ optional} + \__block_make_label_box:n { \l__block_label_given_tl } } + \bool_if:nT + { + \l__block_label_boxed_bool + && \dim_compare_p:n { \box_wd:N \l__block_one_label_box <= \linewidth } % TODO: is \linewidth correct? + } + { + \dim_compare:nNnT + { \box_wd:N \l__block_one_label_box } < \labelwidth + { + \hbox_set_to_wd:Nnn \l__block_one_label_box { \labelwidth } + { + \exp_after:wN \use_i:nn \l__block_item_align_tl + \box_use_drop:N \l__block_one_label_box + \exp_after:wN \use_ii:nn \l__block_item_align_tl + } + } + \hbox_set:Nn \l__block_one_label_box + { \box_use_drop:N \l__block_one_label_box } + } + \dim_compare:nNnTF { \box_wd:N \l__block_one_label_box } > \labelwidth + { \bool_set_true:N \l__block_long_label_bool } + { \bool_set_false:N \l__block_long_label_bool } + \hbox_gset:Nn \g__block_labels_box + { + \hbox_unpack_drop:N \g__block_labels_box + \skip_horizontal:n { \itemindent - \labelsep - \labelwidth } + \hbox_unpack_drop:N \l__block_one_label_box + \skip_horizontal:n { \labelsep } + \bool_if:NT \l__block_next_line_bool + { \bool_if:NT \l__block_long_label_bool { \nobreak \hfil \break } } + % version of \newline inside an hbox that will be unpacked + } + % \skip_set_eq:NN \parsep \l__block_item_parsep_skip TODO??? FMi + % what's that? + \dim_set_eq:NN \parindent \listparindent + \cs_set_eq:NN \__block_item_everypar: \__block_item_everypar_std: + } +\box_new:N \l__block_one_label_box +\box_new:N \g__block_labels_box +\bool_new:N \l__block_long_label_bool +\cs_new_protected:Npn \__block_make_label_box:n #1 + { + \hbox_set:Nn \l__block_one_label_box + { + \__kernel_list_label_begin: + \__block_label_format:n + { + \bool_if:NT \l__block_label_strut_bool { \strut } + \bool_if:NTF \l__block_legacy_support_bool + \makelabel + \use:n + {#1} + } + \__kernel_list_label_end: + } + } +\cs_new_eq:NN \__kernel_list_label_begin: \prg_do_nothing: +\cs_new_eq:NN \__kernel_list_label_end: \prg_do_nothing: +\cs_new_eq:NN \__block_item_everypar: \prg_do_nothing: +\AddToHook{para/begin}[lists]{\__block_item_everypar:} +\DeclareHookRule{para/begin}{lists}{after}{tagpdf} +\cs_new_protected:Npn \__block_item_everypar_std: { + \__block_debug_typeout:n{item~ everypar \on@line } + \legacy_if_set_false:n { @minipage } + \legacy_if_gset_false:n { @newlist } + \legacy_if:nT { @inlabel } + { + \legacy_if_gset_false:n { @inlabel } + \box_if_empty:NT \g_para_indent_box { \kern - \itemindent } + \para_omit_indent: + \box_use_drop:N \g__block_labels_box + \__kernel_list_label_after: + \penalty \c_zero_int + } + \legacy_if:nTF { @nobreak } + { + \legacy_if_gset_false:n { @nobreak } + \int_set:Nn \clubpenalty { 10000 } + } + { + \int_set_eq:NN \clubpenalty \@clubpenalty + \cs_set_eq:NN \__block_item_everypar: \prg_do_nothing: + } +} +\cs_new_eq:NN \__kernel_list_label_after: \prg_do_nothing: +\skip_new:N \l__block_tmpa_skip +\skip_new:N \l__block_topsepadd_skip +\skip_new:N \l__block_effective_top_skip +\AddToHook{begindocument/before}{ + \RenewDocumentCommand{\item}{ ={label}o } + { + \@inmatherr \item + \tl_if_empty:oTF \__block_item_instance:n %%FMi? + { \msg_error:nnn { __block } { item-in-nonlist } { \item[{#1}] } } + { + \legacy_if:nTF { @newlist } + { \__kernel_list_item_begin: } + { \__block_inter_item: } + \tl_if_novalue:nTF {#1} % avoids reparsing label={} + { \__block_item_instance:n { } } + { \__block_item_instance:n {#1} } + \legacy_if_gset_true:n { @inlabel } + \ignorespaces + } + } +} +\cs_new_protected:Npn \__block_inter_item: { + \legacy_if:nT { @inlabel } + { \indent \par } % case of \item\item + \mode_if_horizontal:T { \__block_skip_remove_last: + \__block_skip_remove_last: \par } + \__kernel_list_item_end: + \__kernel_list_item_begin: + \addpenalty \@itempenalty + \addvspace \itemsep +} +\cs_new_eq:NN \__kernel_list_item_begin: \prg_do_nothing: +\cs_new_eq:NN \__kernel_list_item_end: \prg_do_nothing: +\cs_new:Npn \__block_recipe_basic: { + \cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w + \__block_beginpar_hmode:N + \cs_set_eq:NN \__kernel_displayblock_beginpar_vmode: + \__block_beginpar_vmode: + \let \__kernel_displayblock_begin: \prg_do_nothing: + \let \__kernel_displayblock_end: \prg_do_nothing: +} +\cs_new:Npn \__block_recipe_standalone: { + \cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w + \prg_do_nothing: + \cs_set_eq:NN \__kernel_displayblock_beginpar_vmode: + \prg_do_nothing: + \cs_set_eq:NN \__kernel_displayblock_begin: \__block_inner_begin: + \cs_set_eq:NN \__kernel_displayblock_end: \__block_inner_end: + \bool_set_true:N \l__block_standalone_bool + \tl_if_empty:NTF \l__block_tag_name_tl + { \tl_set:Nn \l__block_tag_inner_tag_tl {Sect} } + { \tl_set_eq:NN \l__block_tag_inner_tag_tl \l__block_tag_name_tl } +} +\cs_new:Npn \__block_recipe_standard: +{ + \cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w + \__block_beginpar_hmode:N + \cs_set_eq:NN \__kernel_displayblock_beginpar_vmode: + \__block_beginpar_vmode: + \cs_set_eq:NN \__kernel_displayblock_begin: \__block_inner_begin: + \cs_set_eq:NN \__kernel_displayblock_end: \__block_inner_end: + \tl_if_empty:NTF \l__block_tag_name_tl + { \tl_set:Nn \l__block_tag_inner_tag_tl {Figure} } + { \tl_set_eq:NN \l__block_tag_inner_tag_tl \l__block_tag_name_tl } +} +\tl_new:N \l__block_tag_inner_tag_tl +\cs_new:Npn \__block_recipe_list: +{ + \cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w + \__block_beginpar_hmode:N + \cs_set_eq:NN \__kernel_displayblock_beginpar_vmode: + \__block_beginpar_vmode: + \cs_set_eq:NN \__kernel_displayblock_begin: \__block_list_begin: + \cs_set_eq:NN \__kernel_displayblock_end: \__block_list_end: + \cs_set_eq:NN \__kernel_list_item_begin: \__block_list_item_begin: + \cs_set_eq:NN \__kernel_list_item_end: \__block_list_item_end: + \tl_if_empty:NTF \l__block_tag_name_tl + { \tl_set:Nn \l__tag_L_tag_tl {L} } + { \tl_set_eq:NN \l__tag_L_tag_tl \l__block_tag_name_tl } + \tl_if_empty:NTF \l__block_tag_class_tl + { \tl_set:Nn \l__tag_L_attr_class_tl {} } + { \tl_set_eq:NN \l__tag_L_attr_class_tl \l__block_tag_class_tl } +} + +\DeclareInstance{blockenv}{displayblock}{display} +{ + env-name = displayblock, + tag-name = , + tag-class = , + tagging-recipe = standard, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , + inner-instance = , +} +\DeclareInstance{blockenv}{displayblockflattened}{display} +{ + env-name = displayblockflattened, + tag-name = , + tag-class = , + tagging-recipe = basic, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , + para-flattened = true , + inner-instance = , +} +\DeclareInstance{blockenv}{center}{display} +{ + env-name = center, + tag-name = , + tag-class = , + tagging-recipe = basic, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , + para-flattened = true , + para-instance = center , + inner-instance = , +} +\DeclareInstance{blockenv}{flushleft}{display} +{ + env-name = flushleft, + tag-name = , + tag-class = , + tagging-recipe = basic, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , + para-flattened = true , + para-instance = raggedright , + inner-instance = , +} +\DeclareInstance{blockenv}{flushright}{display} +{ + env-name = flushleft, + tag-name = , + tag-class = , + tagging-recipe = basic, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , + para-flattened = true , + para-instance = raggedleft , + inner-instance = , +} +\tag_if_active:T { + \tagpdfsetup{add-new-tag={tag=quote,role=BlockQuote}} + \tagpdfsetup{add-new-tag={tag=quotation,role=BlockQuote}} +} +\DeclareInstance{blockenv}{quotation}{display} +{ + env-name = quotation, + tag-name = quotation, + tag-class = , + tagging-recipe = standard, + inner-level-counter = , + level-increase = true, + setup-code = , + block-instance = quotationblock , + inner-instance = , +} +\DeclareInstance{blockenv}{quote}{display} +{ + env-name = quote, + tag-name = quote, + tag-class = , + tagging-recipe = standard, + inner-level-counter = , + level-increase = true, + setup-code = , + block-instance = quoteblock , + inner-instance = , +} + +\DeclareInstance{blockenv}{theorem}{display} +{ + env-name = theorem-like, + tag-name = theorem-like, + tag-class = , + tagging-recipe = standalone, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = displayblock , +} +\tag_if_active:T { + \tagpdfsetup{add-new-tag={tag=theorem-like,role=Sect}} +} +\tag_if_active:T { + \tagpdfsetup{add-new-tag={tag=verbatim,role=P}} + \tagpdfsetup{add-new-tag={tag=codeline,role=Sub}} +} +\DeclareInstance{blockenv}{verbatim}{display} +{ + env-name = verbatim, + tag-name = verbatim, + tag-class = , + tagging-recipe = standard, + inner-level-counter = , + level-increase = false, + setup-code = , + block-instance = verbatimblock , + inner-instance = , + final-code = \legacyverbatimsetup , +} +\DeclareInstance{blockenv}{itemize}{display} +{ + env-name = itemize, + tag-name = itemize, + tag-class = itemize, + tagging-recipe = list, + inner-level-counter = \@itemdepth, + level-increase = true, + max-inner-levels = 4, + setup-code = , + block-instance = list , + inner-instance = itemize , +} +\DeclareInstance{blockenv}{enumerate}{display} +{ + env-name = enumerate, + tag-name = enumerate, + tag-class = enumerate, + tagging-recipe = list, + level-increase = true, + setup-code = , + block-instance = list , + inner-level-counter = \@enumdepth, + max-inner-levels = 4, + inner-instance = enum , +} + +\DeclareInstance{blockenv}{description}{display} +{ + env-name = description, + tag-name = description, + tag-class = description, + tagging-recipe = list, + inner-level-counter = , + level-increase = true, + setup-code = , + block-instance = list , + inner-instance = description , +} +\DeclareInstance{blockenv}{list}{display} +{ + env-name = list, + tag-name = list, + tag-class = , + tagging-recipe = list, + level-increase = true, + setup-code = \legacylistsetupcode , + block-instance = list , + inner-level-counter = , + inner-instance = legacy , +} +\setcounter{maxblocklevels}{6} +\DeclareInstance{block}{displayblock-0}{display} + { + leftmargin = 0pt , + parindent = 0pt , + } +\DeclareInstanceCopy{block}{displayblock-1}{displayblock-0} +\DeclareInstanceCopy{block}{displayblock-2}{displayblock-0} +\DeclareInstanceCopy{block}{displayblock-3}{displayblock-0} +\DeclareInstanceCopy{block}{displayblock-4}{displayblock-0} +\DeclareInstanceCopy{block}{displayblock-5}{displayblock-0} +\DeclareInstanceCopy{block}{displayblock-6}{displayblock-0} +\DeclareInstance{block}{verbatimblock-0}{display} + { + leftmargin = 0pt , + parindent = 0pt , + par-skip = 0pt , + } +\DeclareInstanceCopy{block}{verbatimblock-1}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-2}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-3}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-4}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-5}{verbatimblock-0} +\DeclareInstanceCopy{block}{verbatimblock-6}{verbatimblock-0} +\DeclareInstance{block}{quoteblock-1}{display} + { rightmargin = \KeyValue{leftmargin} } +\DeclareInstanceCopy{block}{quoteblock-2}{quoteblock-1} +\DeclareInstanceCopy{block}{quoteblock-3}{quoteblock-1} +\DeclareInstanceCopy{block}{quoteblock-4}{quoteblock-1} +\DeclareInstanceCopy{block}{quoteblock-5}{quoteblock-1} +\DeclareInstanceCopy{block}{quoteblock-6}{quoteblock-1} +\DeclareInstance{block}{quotationblock-1}{display} + { parindent = 1.5em , rightmargin = \KeyValue{leftmargin} } +\DeclareInstanceCopy{block}{quotationblock-2}{quotationblock-1} +\DeclareInstanceCopy{block}{quotationblock-3}{quotationblock-1} +\DeclareInstanceCopy{block}{quotationblock-4}{quotationblock-1} +\DeclareInstanceCopy{block}{quotationblock-5}{quotationblock-1} +\DeclareInstanceCopy{block}{quotationblock-6}{quotationblock-1} +\DeclareInstance{block}{list-1}{display}{ +} +\DeclareInstance{block}{list-2}{display}{} +\DeclareInstance{block}{list-3}{display}{} +\DeclareInstance{block}{list-4}{display}{} +\DeclareInstance{block}{list-5}{display}{} +\DeclareInstance{block}{list-6}{display}{} +\DeclareInstance{list}{itemize-1}{std}{ item-label = \labelitemi } +\DeclareInstance{list}{itemize-2}{std}{ item-label = \labelitemii } +\DeclareInstance{list}{itemize-3}{std}{ item-label = \labelitemiii } +\DeclareInstance{list}{itemize-4}{std}{ item-label = \labelitemiv } +\DeclareInstance{list}{enum-1}{std} + { item-label = \labelenumi , counter = enumi } +\DeclareInstance{list}{enum-2}{std} + { item-label = \labelenumii , counter = enumii } +\DeclareInstance{list}{enum-3}{std} + { item-label = \labelenumiii , counter = enumiii } +\DeclareInstance{list}{enum-4}{std} + { item-label = \labelenumiv , counter = enumiv } +\DeclareInstance{list}{legacy}{std} { + item-instance = basic , + legacy-support = true , +} +\DeclareInstance{list}{description}{std} { item-instance = description } +\DeclareInstance{item}{basic}{std} + { + label-align = right , + } +\DeclareInstance{item}{description}{std} + { + label-format = \normalfont\bfseries #1 , + } +\tag_if_active:T +{ + \tagpdfsetup + { + newattribute = {justify} {/O /Layout /TextAlign/Justify}, + newattribute = {center} {/O /Layout /TextAlign/Center}, + newattribute = {raggedright}{/O /Layout /TextAlign/Start}, + newattribute = {raggedleft} {/O /Layout /TextAlign/End}, + } +} +\DeclareInstance{para}{center}{std} +{ + indent-width = 0pt , + start-skip = 0pt , + left-skip = \@flushglue , + right-skip = \@flushglue , + end-skip = \z@skip , + final-hyphen-demerits = 0 , + cr-cmd = \@centercr , + para-class = center , +} +\DeclareInstance{para}{raggedright}{std} +{ + indent-width = 0pt , + start-skip = 0pt , + left-skip = \z@skip , + right-skip = \@flushglue , + end-skip = \z@skip , + final-hyphen-demerits = 0 , + cr-cmd = \@centercr , + para-class = raggedright , +} +\DeclareInstance{para}{raggedleft}{std} +{ + indent-width = 0pt , + start-skip = 0pt , + left-skip = \@flushglue , + right-skip = \z@skip , + end-skip = \z@skip , + final-hyphen-demerits = 0 , + cr-cmd = \@centercr , + para-class = raggedleft , +} +\DeclareInstance{para}{justify}{std} +{ + start-skip = 0pt , + left-skip = \z@skip , + right-skip = \z@skip , + end-skip = \@flushglue , + final-hyphen-demerits = 5000 , + cr-cmd = \@normalcr , + para-class = justify , +} +\DeclareRobustCommand\centering {\UseInstance{para}{center}{}} +\DeclareRobustCommand\raggedleft {\UseInstance{para}{raggedleft}{}} +\DeclareRobustCommand\raggedright{\UseInstance{para}{raggedright}{}} +\DeclareRobustCommand\justifying {\UseInstance{para}{justify}{}} + +\justifying +\tag_if_active:T { + \cs_set:Npn \__block_beginpar_vmode: { + \__block_debug_typeout:n + { @endpe = \legacy_if:nTF { @endpe }{true}{false} + \on@line } + \legacy_if:nTF { @endpe } + { + \legacy_if_gset_false:n { @endpe } + } + { + \int_compare:nNnT \l__block_flattened_level_int < 2 + { + \int_gincr:N \g__tag_para_main_begin_int + \tagstructbegin{tag=\l__tag_para_main_tag_tl} + } + } + } + \cs_set:Npn \__block_beginpar_hmode:N #1 + { + \tag_mc_end: + \int_gincr:N \g__tag_para_end_int + \__block_debug_typeout:n{increment~ /P \on@line } + \bool_if:NT \l__tag_para_show_bool + { \tag_mc_begin:n{artifact} + \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int} + \tag_mc_end: + } + \tag_struct_end: + \tagpdfparaOff \par \tagpdfparaOn + } +\cs_set:Npn \__kernel_displayblock_doendpe: { + \bool_if:NT \l__tag_para_bool + { + \legacy_if:nT { @endpe } + { + \__block_debug_typeout:n + { flattened= \bool_if:NTF + \l__tag_para_flattened_bool {true}{false} + \on@line } + \bool_if:NF \l__tag_para_flattened_bool + { + \__block_debug_typeout:n{Structure-end~ + \l__tag_para_main_tag_tl\space after~ displayblock \on@line } + \int_gincr:N \g__tag_para_main_end_int + \tag_struct_end: %text-unit + } + } + } +} +\RemoveFromHook{para/begin}[tagpdf] +\AddToHook{para/begin}[tagpdf]{ + \bool_if:NT \l__tag_para_bool { + \legacy_if:nF { @inlabel } + { + \__block_start_para_structure:n { \PARALABEL } + } + } +} +\cs_new_protected:Npn \__block_start_para_structure:n #1 { + \__block_debug_typeout:n + { @endpe = \legacy_if:nTF { @endpe }{true}{false} + \on@line } + \legacy_if:nF { @endpe } + { + \bool_if:NF \l__tag_para_flattened_bool + { + \int_gincr:N \g__tag_para_main_begin_int + \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl} + } + } + \int_gincr:N \g__tag_para_begin_int + \__block_debug_typeout:n{increment~ P \on@line } + \tag_struct_begin:n + { + tag=\l__tag_para_tag_tl + ,attribute-class=\l_tag_para_attr_class_tl + } + \__tag_check_para_begin_show:nn {green}{#1} + \tag_mc_begin:n {} +} +\cs_new_protected:Npn \__block_start_para_structure_unconditionally:n #1 { + \bool_if:NF \l__tag_para_flattened_bool + { + \int_gincr:N \g__tag_para_main_begin_int + \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl} + } + \int_gincr:N \g__tag_para_begin_int + \__block_debug_typeout:n{increment~ P \on@line } + \tag_struct_begin:n + { + tag=\l__tag_para_tag_tl + ,attribute-class=\l_tag_para_attr_class_tl + } + \__tag_check_para_begin_show:nn {green}{#1} + \tag_mc_begin:n {} +} +\tag_if_active:T { +} +\RemoveFromHook{para/end}[tagpdf] +\AddToHook{para/end} + { + \bool_if:NT \l__tag_para_bool + { + \int_gincr:N \g__tag_para_end_int + \__block_debug_typeout:n{increment~ /P \on@line } + \tag_mc_end: + \__tag_check_para_end_show:nn {red}{} + \tag_struct_end: + \bool_if:NF \l__tag_para_flattened_bool + { + \int_gincr:N \g__tag_para_main_end_int + \tag_struct_end: + } + } + } +\def\PARALABEL{NP-} +\cs_set_protected:Npn \para_end: { + \scan_stop: + \mode_if_horizontal:TF { + \mode_if_inner:F { + \tex_unskip:D + \hook_use:n{para/end} + \@kernel@after@para@end + \mode_if_horizontal:TF { + \if_int_compare:w 11 = \tex_lastnodetype:D + \tex_hskip:D \c_zero_dim + \fi: + \tex_par:D + \hook_use:n{para/after} + \@kernel@after@para@after + } + { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} } + } + } + { + \__kernel_endpe_vmode: % should do nothing if no tagging + \tex_par:D + } +} +\cs_set_eq:NN \par \para_end: +\cs_set_eq:NN \__blockpar \para_end: +\cs_set_eq:NN \endgraf \para_end: +\DeclareRobustCommand*\begin[1]{% + \UseHook{env/#1/before}% + \@ifundefined{#1}% + {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% + {\def\reserved@a{\def\@currenvir{#1}% + \edef\@currenvline{\on@line}% + \@execute@begin@hook{#1}% + \csname #1\endcsname}}% + \@ignorefalse + \begingroup + \__kernel_endpe_vmode: + \reserved@a} +\cs_new:Npn \__kernel_endpe_vmode: { + \if@endpe \ifvmode + \bool_if:NT \l__tag_para_bool +{ + \bool_if:NF \l__tag_para_flattened_bool + { + \int_gincr:N \g__tag_para_main_end_int + \tag_struct_end: + } + \@endpefalse +} + \fi \fi +} +\cs_set:Npn \__kernel_list_label_after: { + \bool_if:NT \l__tag_para_bool + { + \__block_start_para_structure_unconditionally:n { LI- } + } +} +\cs_new:Npn \__block_inner_begin: { + \tagstructbegin{tag=\l__block_tag_inner_tag_tl} +} +\cs_new:Npn \__block_inner_end: { + \__block_debug_typeout:n{block-end \on@line} + \legacy_if:nT { @endpe } + { + \int_gincr:N \g__tag_para_main_end_int + \__block_debug_typeout:n{close~ /text-unit \on@line} + \tagstructend + } + \tagstructend % end inner structure +} +\tl_new:N \l__tag_L_tag_tl +\tl_set:Nn \l__tag_L_tag_tl {L} + +\tl_new:N\l__tag_L_attr_class_tl +\tl_set:Nn \l__tag_L_attr_class_tl {list} +\tag_if_active:T +{ + \tagpdfsetup + { + % default if unknown + newattribute = {list}{/O /List /ListNumbering/None}, + newattribute = {itemize}{/O /List /ListNumbering/Unordered}, + newattribute = {enumerate}{/O /List /ListNumbering/Ordered}, + newattribute = {description}{/O /List /ListNumbering/Description}, + } +} +\def\LItag{LI} +\cs_set:Npn \__block_list_begin: { + \tagstructbegin + { + tag=\l__tag_L_tag_tl + ,attribute-class=\l__tag_L_attr_class_tl + } +} +\cs_set:Npn \__block_list_item_begin: { \tagstructbegin{tag=\LItag} } +\cs_set:Npn \__kernel_list_label_begin: { + \tagstructbegin{tag=Lbl} + \tagmcbegin{tag=Lbl} +} +\cs_set:Npn \__kernel_list_label_end: { + \tagmcend % end mc-Lbl or artifact + \tagstructend % end Lbl + \tagstructbegin{tag=\LBody} +} +\def\LBody{LBody} +\cs_set:Npn \__block_list_item_end: { + \legacy_if:nT { @endpe } + { + \int_gincr:N \g__tag_para_main_end_int + \tagstructend % text-unit + } + \tagstructend \tagstructend % end LBody, LI +} +\cs_set:Npn \__block_list_end: { + \legacy_if:nT { @endpe } + { + \int_gincr:N \g__tag_para_main_end_int + \tagstructend % text-unit + \__block_debug_typeout:n{Structure-end~ P~ at~ list-end \on@line } + } + \tagstructend\tagstructend % end LBody, LI + \tagstructend % end L +} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `latex-lab-testphase-block-tagging.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty new file mode 100644 index 00000000000..b95e81c61b4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty @@ -0,0 +1,103 @@ +%% +%% This is file `latex-lab-testphase-firstaid.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-firstaid.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-firstaid.dtx (C) Copyright 2023 LaTeX Project + +\ProvidesPackage {latex-lab-testphase-firstaid} [2023-06-04 v0.8 + Temporary patches to external packages need for the tagging project] + +\AddToHook{file/blindtext.sty/after}[latex-lab-firstaid]{% + \FirstAidNeededT{blindtext}{sty}{\blindfiledate\space\blindfileversion\space% + blindtext-Package}% + {% + \renewcommand{\blind@items}{% + \setcounter{blind@listcount}{1}% + \loop + \ifblind@optional + \ifblind@long + \item[\blindtext@countitem] \blindtext@text + \else + \item[\blindtext@count] \blindtext@item + \fi + \else % \blind@optionalfalse + \ifblind@long + \item \blindtext@text + \else + \item \blindtext@countitem + \fi + \fi % \ifblind@optional + {% + \loop + \ifnum\value{blindlistlevel}>\value{blindlist@level}% + \stepcounter{blind@levelcount}% + \blind@list[\value{blindlist}]\relax + \addtocounter{blind@levelcount}{-1}% + \setcounter{blind@listcount}{1}% + \repeat + \expandafter}\if@endpe\@doendpe\fi % <----------changed + \ifnum\value{blind@listcount}<\value{blindlist}% + \stepcounter{blind@listcount}% + \repeat + } + }% + } +\AddToHook{file/ltugboat.cls/after} + { + \def\l@section#1#2{\addpenalty{\@secpenalty}% + \addvspace{\TBtocsectionspace}% + \@tempdima 1.5em + \begingroup + \parindent\z@ \rightskip\z@ % article style makes \rightskip > 0 + \parfillskip\z@ + \TBtocsectionfont + \leavevmode\advance\leftskip\@tempdima\hskip-\leftskip + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \csname contentsline@text@1@format\endcsname{#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + }\par + \endgroup} + } + +\endinput +%% +%% End of file `latex-lab-testphase-firstaid.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty new file mode 100644 index 00000000000..92268acbe81 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty @@ -0,0 +1,265 @@ +%% +%% This is file `latex-lab-testphase-float.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-float.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project +\ProvidesExplPackage {latex-lab-testphase-float} {2023-04-28} {0.8} + {Code related to the tagging of floats} +\tagpdfsetup{add-new-tag=float/Aside} +\tagpdfsetup{add-new-tag=figures/Sect} +\tagpdfsetup{add-new-tag=tables/Sect} +\prop_new:N \g__tag_float_sect_prop +\seq_new:N \g__tag_float_types_seq +\seq_gput_right:Nn \g__tag_float_types_seq {figure} +\seq_gput_right:Nn \g__tag_float_types_seq {table} +\tl_new:N\@current@float@struct +\bool_new:N \g__tag_float_sect_bool +\bool_gset_true:N \g__tag_float_sect_bool +\cs_new_protected:Npn\__tag_float_init_collect: + { + \bool_if:NT\g__tag_float_sect_bool + { + \seq_map_inline:Nn\g__tag_float_types_seq + { + \tag_struct_begin:n{tag=##1s,stash} + \prop_gput:Nnx\g__tag_float_sect_prop {##1-struct}{\int_use:N\c@g__tag_struct_abs_int} + \tag_struct_end: + } + } + } +\cs_new_protected:Npn \__tag_float_stop_sect: + { + \bool_if:NT\g__tag_float_sect_bool + { + \seq_map_inline:Nn\g__tag_float_types_seq + { + \prop_get:NnNT\g__tag_float_sect_prop{##1-used}\l__tag_tmpa_tl + { + \exp_args:Ne + \tag_struct_use_num:n{\prop_item:Nn\g__tag_float_sect_prop{##1-struct}} + \prop_gremove:Nn \g__tag_float_sect_prop{##1-used} + } + } + } + } + +\keys_define:nn { tag / tool} + { + flush-floats .code:n = + { + \keys_set:nn {tag / tool} {sec-stop=#1} + \__tag_float_stop_sect: + \__tag_float_init_collect: + }, + flush-float .default:n = Document + } +\AddToHook{begindocument/end}[latex-lab/float] + {\__tag_float_init_collect:} +\AddToHook{tagpdf/finish/before}[latex-lab/float] + {\par\__tag_sec_end:n{-10}\__tag_float_stop_sect:} +\DeclareHookRule{tagpdf/finish/before}{latex-lab/float}{before}{tagpdf} +\keys_define:nn { tag / tool} + { + split-float .code:n = + { + \__tag_float_end: + \__tag_float_begin: + \MakeLinkTarget[tagstructure]{g__tag_struct_abs_int} + } + } + +\cs_new_protected:Npn \__tag_float_stop_par: + { + \tag_mc_end: + \bool_if:NF \g__tag_float_sect_bool + { + \tag_struct_end: + } + } +\cs_new_protected:Npn \__tag_float_start_par: + { + \bool_if:NF \g__tag_float_sect_bool + { + \tag_struct_begin:n{tag=text}% + } + \tag_mc_begin:n{tag=P} + } + +\cs_new_protected:Npn \__tag_float_begin: + {% + \bool_if:NTF\g__tag_float_sect_bool + { + \exp_args:Ne + \tag_struct_begin:n{tag=float,parent=0\prop_item:No\g__tag_float_sect_prop{\@captype-struct}}% + \prop_gput:Nxx \g__tag_float_sect_prop {\@captype-used}{true} + } + { + \tag_struct_begin:n{tag=float} + } + \tl_set:Nx\@current@float@struct{\tag_get:n{struct_num}}% + \typeout{Float structure: \@current@float@struct} + } + +\cs_new_protected:Npn\__tag_float_end:{\tag_struct_end:} %end Aside + +\ExplSyntaxOff +\def\@xfloat #1[#2]{% + \@nodocument + \def \@captype {#1}% + \def \@fps {#2}% + \@onelevel@sanitize \@fps + \def \reserved@b {!}% + \ifx \reserved@b \@fps + \@fpsadddefault + \else + \ifx \@fps \@empty + \@fpsadddefault + \fi + \fi + \ifhmode + \@bsphack + \@nameuse{__tag_float_stoppar:} %<---end P + \@floatpenalty -\@Mii + \else + \@floatpenalty-\@Miii + \fi + \ifinner + \@parmoderr\@floatpenalty\z@ + \else + \@next\@currbox\@freelist + {% + \@tempcnta \sixt@@n + \expandafter \@tfor \expandafter \reserved@a + \expandafter :\expandafter =\@fps + \do + {% + \if \reserved@a h% + \ifodd \@tempcnta + \else + \advance \@tempcnta \@ne + \fi + \else\if \reserved@a t% + \@setfpsbit \tw@ + \else\if \reserved@a b% + \@setfpsbit 4% + \else\if \reserved@a p% + \@setfpsbit 8% + \else\if \reserved@a !% + \ifnum \@tempcnta>15 + \advance\@tempcnta -\sixt@@n\relax + \fi + \else + \@latex@error{Unknown float option `\reserved@a'}% + {Option `\reserved@a' ignored and `p' used.}% + \@setfpsbit 8% + \fi\fi\fi\fi\fi + }% + \@tempcntb \csname ftype@\@captype \endcsname + \multiply \@tempcntb \@xxxii + \advance \@tempcnta \@tempcntb + \global \count\@currbox \@tempcnta + }% + \@fltovf + \fi + \@nameuse{__tag_float_begin:}% + \global \setbox\@currbox + \color@vbox + \normalcolor + \vbox \bgroup + \hsize\columnwidth + \@parboxrestore + \@floatboxreset + \MakeLinkTarget[tagstructure]{g__tag_struct_abs_int}% +}% +\def\end@float{% + \@endfloatbox + \@nameuse{__tag_float_end:}% + \ifnum\@floatpenalty <\z@ + \@largefloatcheck + \@cons\@currlist\@currbox + \ifnum\@floatpenalty <-\@Mii + \penalty -\@Miv + \@tempdima\prevdepth + \vbox{}% + \prevdepth\@tempdima + \penalty\@floatpenalty + \else + \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack + \@nameuse{__tag_float_start_par:} %restart P safe here?? + \fi + \fi +} +\ExplSyntaxOn +\def\hyper@nopatch@caption{} +\providecommand\theHg__tag_struct_abs_int{\int_use:N\c@g__tag_struct_abs_int} + +\AddToHook{begindocument} + { + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \xdef\@currentHref{tagstructure.\@current@float@struct}% + \tag_stop:n{caption} + \sbox\@tempboxa{#1:~#2}% + \tag_start:n{caption} + \tagtool{para=false} + \tag_struct_begin:n{tag=Caption,parent=\@current@float@struct} + \seq_gpop_right:cN {g__tag_struct_kids_\@current@float@struct _seq}\l__tag_tmpa_tl + \seq_gput_left:cV {g__tag_struct_kids_\@current@float@struct _seq}\l__tag_tmpa_tl + \ifdim \wd\@tempboxa >\hsize + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n{} + #1:~ + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n{} + #2\par + \tag_mc_end: + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n{} + #1:~ + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n{} + #2\par + \tag_mc_end:\hfil}% + \fi + \tag_struct_end: %caption + \vskip\belowcaptionskip} + } + +\endinput +%% +%% End of file `latex-lab-testphase-float.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty new file mode 100644 index 00000000000..afe5a4625e5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty @@ -0,0 +1,694 @@ +%% +%% This is file `latex-lab-testphase-graphic.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-graphic.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-graphic.dtx (C) Copyright 2022-2023 LaTeX Project +\ProvidesExplPackage {latex-lab-testphase-graphic} {2023-04-07} {0.8} + {Code related to the tagging of graphics} +\RequirePackage{l3opacity} +\ref_attribute_gset:nnnn{xpos}{0}{shipout}{\int_use:N\tex_lastxpos:D} +\ref_attribute_gset:nnnn{ypos}{0}{shipout}{\int_use:N\tex_lastypos:D} + +\cs_new_protected:Npn\__tag_graphic_savepos:n #1 + { + \tex_savepos:D + \ref_label:nn{#1}{xpos,ypos,abspage} + \tex_savepos:D + } +\cs_generate_variant:Nn \__tag_graphic_savepos:n {e} +\bool_new:N \l__tag_graphic_debug_bool +\keys_define:nn { document / metadata } + { + debug / BBox .code:n = { \bool_set_true:N \l__tag_graphic_debug_bool } + } +\int_new:N\g__tag_graphic_int + +\tl_new:N \g__tag_graphic_lx_tl +\tl_new:N \g__tag_graphic_ly_tl +\tl_new:N \g__tag_graphic_ux_tl +\tl_new:N \g__tag_graphic_uy_tl +\seq_new:N\l__tag_graphic_bboxcorr_seq +\bool_new:N\l__tag_graphic_bboxcorr_bool +\tl_new:N \l__tag_graphic_currentlabel_tl + +\tl_new:N \l__tag_graphic_alt_tl +\tl_new:N \l__tag_graphic_alt_dflt_tl +\tl_set:Nn \l__tag_graphic_alt_dflt_tl {\Gin@base\Gin@ext} +\tl_new:N \l__tag_graphic_actual_tl +\tl_new:N \l__tag_graphic_struct_tl +\tl_set:Nn\l__tag_graphic_struct_tl {Figure} +\bool_new:N\l__tag_graphic_artifact_bool +\bool_new:N\l__tag_graphic_BBox_bool +\bool_set_true:N\l__tag_graphic_BBox_bool + +\fp_new:N\l__tag_graphic_sin_fp +\fp_new:N\l__tag_graphic_cos_fp +\fp_new:N\l__tag_graphic_lxly_fp +\fp_new:N\l__tag_graphic_lxuy_fp +\fp_new:N\l__tag_graphic_uxly_fp +\fp_new:N\l__tag_graphic_uxuy_fp +\fp_new:N\l__tag_graphic_ux_fp +\fp_new:N\l__tag_graphic_ly_fp +\fp_new:N\l__tag_graphic_lx_fp +\fp_new:N\l__tag_graphic_uy_fp +\fp_new:N\l__tag_graphic_scale_fp +\fp_new:N\l__tag_graphic_trim_ux_fp +\fp_new:N\l__tag_graphic_trim_ly_fp +\fp_new:N\l__tag_graphic_trim_lx_fp +\fp_new:N\l__tag_graphic_trim_uy_fp +\msg_new:nnn {tag}{alt-text-missing} + { + Alternative~text~for~graphic~is~missing.\\ + Using~'#1'~instead + } +\cs_new_protected:Npn\Gin@tag@struct@begin + { + \tag_if_active:T + { + \tag_mc_end_push: + \bool_if:NTF\l__tag_graphic_artifact_bool + { + \tag_mc_begin:n{artifact} + } + { + \tl_if_empty:NTF\l__tag_graphic_actual_tl + { + \tl_if_empty:NT\l__tag_graphic_alt_tl + { + \msg_warning:nnx{tag}{alt-text-missing}{\l__tag_graphic_alt_dflt_tl} + \tl_set:Nx\l__tag_graphic_alt_tl {\l__tag_graphic_alt_dflt_tl} + } + \tag_struct_begin:n + { + tag=\l__tag_graphic_struct_tl, + alt=\l__tag_graphic_alt_tl, + } + } + { + \tag_struct_begin:n + { + tag=Span, + actualtext=\l__tag_graphic_actual_tl, + } + \bool_set_false:N\l__tag_graphic_BBox_bool + } + \tag_mc_begin:n{} + } + } + } + +\cs_new_protected:Npn\Gin@tag@struct@end + { + \tag_if_active:T + { + \tag_mc_end: + \bool_if:NF\l__tag_graphic_artifact_bool + { + \tag_struct_end: + } + \tag_mc_begin_pop:n{} + } + } +\AddToHook{package/graphics/after} + { + \def\Gin@setfile#1#2#3{% + \ifx\\#2\\\Gread@false\fi + \ifGin@bbox\else + \ifGread@ + \csname Gread@% + \expandafter\ifx\csname Gread@#1\endcsname\relax + eps% + \else + #1% + \fi + \endcsname{\Gin@base#2}% + \else + \Gin@nosize{#3}% + \fi + \fi + \Gin@viewport@code + \Gin@nat@height\Gin@ury bp% + \advance\Gin@nat@height-\Gin@lly bp% + \Gin@nat@width\Gin@urx bp% + \advance\Gin@nat@width-\Gin@llx bp% + \Gin@req@sizes + \expandafter\ifx\csname Ginclude@#1\endcsname\relax + \Gin@drafttrue + \expandafter\ifx\csname Gread@#1\endcsname\relax + \@latex@error{Can not include graphics of type: #1}\@ehc + \global\expandafter\let\csname Gread@#1\endcsname\@empty + \fi + \fi + \leavevmode + \Gin@tag@struct@begin %NEW + \ifGin@draft + \hb@xt@\Gin@req@width{% + \vrule\hss + \vbox to \Gin@req@height{% + \hrule \@width \Gin@req@width + \vss + \edef\@tempa{#3}% + \rlap{ \ttfamily\expandafter\strip@prefix\meaning\@tempa}% + \vss + \hrule}% + \hss\vrule}% + \else + \@addtofilelist{#3}% + \ProvidesFile{#3}[Graphic file (type #1)]% + \setbox\z@\hbox{\csname Ginclude@#1\endcsname{#3}}% + \dp\z@\z@ + \ht\z@\Gin@req@height + \wd\z@\Gin@req@width + \Gin@tag@bbox@attribute %new + \box\z@ + \Gin@tag@struct@end %new + \fi} + } +\AddToHook{package/graphicx/after}[latex-lab] + { + \define@key{Gin}{alt} {\tl_set:Nx\l__tag_graphic_alt_tl{\text_purify:n{#1}}} + \define@key{Gin}{artifact}[] + { + \bool_set_true:N \l__tag_graphic_artifact_bool + \bool_set_false:N \l__tag_graphic_BBox_bool + } + \define@key{Gin}{actualtext} + { + \tl_set:Nx\l__tag_graphic_actual_tl{\text_purify:n{#1}} + \bool_set_false:N \l__tag_graphic_BBox_bool + } + \define@key{Gin}{correct-BBox} + { + \bool_set_true:N \l__tag_graphic_bboxcorr_bool + \seq_set_split:Nnn\l__tag_graphic_bboxcorr_seq{~}{#1~0pt~0pt~0pt~0pt} + } + \define@key{Gin}{tag} + { + \str_case:nnF {#1} + { + {artifact} + { + \bool_set_true:N \l__tag_graphic_artifact_bool + \bool_set_false:N \l__tag_graphic_BBox_bool + } + {false}{\tag_stop:} + } + {\tl_set:Nn\l__tag_graphic_struct_tl{#1}} + } + } +\AddToHook{package/graphics/after}[latex-lab] + {\RequirePackage{graphicx}} +\keys_define:nn{tag/picture} + { + ,alt .code:n = + {\tl_set:Nx\l__tag_graphic_alt_tl{\text_purify:n{#1}}} + ,artifact .code:n = + { + \bool_set_true:N \l__tag_graphic_artifact_bool + \bool_set_false:N \l__tag_graphic_BBox_bool + } + ,actualtext .code:n = + { + \tl_set:Nx\l__tag_graphic_actual_tl{\text_purify:n{#1}} + \bool_set_false:N \l__tag_graphic_BBox_bool + } + ,correct-BBox .code:n = + { + \bool_set_true:N \l__tag_graphic_bboxcorr_bool + \seq_set_split:Nnn\l__tag_graphic_bboxcorr_seq{~}{#1~0pt~0pt~0pt~0pt} + } + ,tag .code:n = + { + \str_case:nnF {#1} + { + {artifact} + { + \bool_set_true:N \l__tag_graphic_artifact_bool + \bool_set_false:N \l__tag_graphic_BBox_bool + } + {false}{\tag_stop:} + } + {\tl_set:Nn\l__tag_graphic_struct_tl{#1}} + } + } +\cs_new_protected:Npn \__tag_graphic_get_trim: + { + \legacy_if:nTF {Gin@clip} + { + \fp_zero:N\l__tag_graphic_trim_lx_fp + \fp_zero:N\l__tag_graphic_trim_ly_fp + \fp_zero:N\l__tag_graphic_trim_ux_fp + \fp_zero:N\l__tag_graphic_trim_uy_fp + } + { + \fp_set:Nn \l__tag_graphic_trim_lx_fp {\l__tag_graphic_scale_fp*\Gin@vllx} + \fp_set:Nn \l__tag_graphic_trim_ly_fp {\l__tag_graphic_scale_fp*\Gin@vlly} + \fp_set:Nn \l__tag_graphic_trim_ux_fp {\l__tag_graphic_scale_fp*\Gin@vurx} + \fp_set:Nn \l__tag_graphic_trim_uy_fp {\l__tag_graphic_scale_fp*\Gin@vury} + \cs_if_exist:NT \Gin@ollx + { + \fp_set:Nn \l__tag_graphic_trim_ux_fp {\l__tag_graphic_scale_fp* (\Gin@ourx-(\Gin@urx)) } + \fp_set:Nn \l__tag_graphic_trim_uy_fp {\l__tag_graphic_scale_fp* (\Gin@oury-(\Gin@ury)) } + } + } + } +\cs_new_protected:Npn \__tag_graphic_get_scale: + { + \fp_set:Nn \l__tag_graphic_scale_fp { \Gin@scalex } + } +\cs_new_protected:Npn \__tag_graphic_applyangle:nnnn #1#2#3#4 %lx,ly,ux,uy + { + \bool_lazy_and:nnT + {\cs_if_exist_p:N \Grot@angle } + {! \int_compare_p:nNn { \Grot@angle }={0}} + { + \fp_set:Nn \l__tag_graphic_sin_fp { sind(\Grot@angle) } + \fp_set:Nn \l__tag_graphic_cos_fp { cosd(\Grot@angle) } + \fp_set:Nn \l__tag_graphic_lx_fp {#1} + \fp_set:Nn \l__tag_graphic_ly_fp {#2} + \fp_set:Nn \l__tag_graphic_ux_fp {#3} + \fp_set:Nn \l__tag_graphic_uy_fp {#4} + \fp_set:Nn\l__tag_graphic_lxly_fp + { + -\l__tag_graphic_trim_lx_fp * \l__tag_graphic_cos_fp + +\l__tag_graphic_trim_ly_fp * \l__tag_graphic_sin_fp + } + \fp_set:Nn\l__tag_graphic_lxuy_fp + { + (-\l__tag_graphic_trim_lx_fp) * \l__tag_graphic_cos_fp + + + (\l__tag_graphic_uy_fp-\l__tag_graphic_ly_fp-\l__tag_graphic_trim_ly_fp) + * (-\l__tag_graphic_sin_fp) + } + \fp_set:Nn\l__tag_graphic_uxly_fp + { + (\l__tag_graphic_ux_fp-\l__tag_graphic_lx_fp-\l__tag_graphic_trim_lx_fp) + * \l__tag_graphic_cos_fp + + + (\l__tag_graphic_trim_ly_fp) * (\l__tag_graphic_sin_fp) + } + \fp_set:Nn\l__tag_graphic_uxuy_fp + { + (\l__tag_graphic_ux_fp-\l__tag_graphic_lx_fp-\l__tag_graphic_trim_lx_fp) + * \l__tag_graphic_cos_fp + + + (\l__tag_graphic_uy_fp-\l__tag_graphic_ly_fp-\l__tag_graphic_trim_ly_fp) + * (-\l__tag_graphic_sin_fp) + } + \tl_gset:Nx\g__tag_graphic_lx_tl + { + \fp_eval:n + { + min + ( + \l__tag_graphic_lxly_fp, + \l__tag_graphic_lxuy_fp, + \l__tag_graphic_uxly_fp, + \l__tag_graphic_uxuy_fp, + ) + +\l__tag_graphic_lx_fp + +\l__tag_graphic_trim_lx_fp + } + } + \tl_gset:Nx\g__tag_graphic_ux_tl + { + \fp_eval:n + { + max + ( + \l__tag_graphic_lxly_fp, + \l__tag_graphic_lxuy_fp, + \l__tag_graphic_uxly_fp, + \l__tag_graphic_uxuy_fp + ) + +\l__tag_graphic_lx_fp + +\l__tag_graphic_trim_lx_fp + } + } + \fp_set:Nn\l__tag_graphic_lxly_fp + { + -\l__tag_graphic_trim_lx_fp * \l__tag_graphic_sin_fp + -\l__tag_graphic_trim_ly_fp * \l__tag_graphic_cos_fp + } + \fp_set:Nn\l__tag_graphic_lxuy_fp + { + - \l__tag_graphic_trim_lx_fp * \l__tag_graphic_sin_fp + + + (\l__tag_graphic_uy_fp-\l__tag_graphic_ly_fp-\l__tag_graphic_trim_ly_fp) + * \l__tag_graphic_cos_fp + } + \fp_set:Nn\l__tag_graphic_uxly_fp + { + (\l__tag_graphic_ux_fp-\l__tag_graphic_lx_fp-\l__tag_graphic_trim_lx_fp) + * \l__tag_graphic_sin_fp + - \l__tag_graphic_trim_ly_fp * \l__tag_graphic_cos_fp + } + \fp_set:Nn\l__tag_graphic_uxuy_fp + { + (\l__tag_graphic_ux_fp-\l__tag_graphic_lx_fp-\l__tag_graphic_trim_lx_fp) + * \l__tag_graphic_sin_fp + + + (\l__tag_graphic_uy_fp-\l__tag_graphic_ly_fp-\l__tag_graphic_trim_ly_fp) + * \l__tag_graphic_cos_fp + } + \tl_gset:Nx\g__tag_graphic_ly_tl + { + \fp_eval:n + { + min + ( + \l__tag_graphic_lxly_fp, + \l__tag_graphic_lxuy_fp, + \l__tag_graphic_uxly_fp, + \l__tag_graphic_uxuy_fp + ) + + \l__tag_graphic_ly_fp + \l__tag_graphic_trim_ly_fp + } + } + \tl_gset:Nx\g__tag_graphic_uy_tl + { + \fp_eval:n + { + max + ( + \l__tag_graphic_lxly_fp, + \l__tag_graphic_lxuy_fp, + \l__tag_graphic_uxly_fp, + \l__tag_graphic_uxuy_fp, + ) + + \l__tag_graphic_ly_fp + \l__tag_graphic_trim_ly_fp + } + } + } + } +\cs_generate_variant:Nn\__tag_graphic_applyangle:nnnn {VVVV} +\cs_new_protected:Npn \__tag_graphic_applycorr:NNNN #1 #2 #3 #4 + { + \bool_if:NT\l__tag_graphic_bboxcorr_bool + { + \tl_set:Nx #1 + { + \fp_eval:n + { + #1 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l__tag_graphic_bboxcorr_seq {1} } + } + } + \tl_set:Nx #2 + { + \fp_eval:n + { + #2 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l__tag_graphic_bboxcorr_seq {2} } + } + } + \tl_set:Nx #3 + { + \fp_eval:n + { + #3 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l__tag_graphic_bboxcorr_seq {3} } + } + } + \tl_set:Nx #4 + { + \fp_eval:n + { + #4 + + + \dim_to_decimal_in_bp:n {\seq_item:Nn \l__tag_graphic_bboxcorr_seq {4} } + } + } + } + } +\cs_new_protected:Npn \Gin@tag@bbox@attribute + { + \bool_lazy_all:nT + { + {\tag_if_active_p:} + {!\l__tag_graphic_artifact_bool} + {\l__tag_graphic_BBox_bool} + } + { + \fp_set:Nn \l__tag_graphic_scale_fp { \Gin@scalex } + \__tag_graphic_get_trim: + \int_gincr:N\g__tag_graphic_int + \tl_set:Nx\l__tag_graphic_currentlabel_tl {__tag_graphic_\int_use:N \g__tag_graphic_int} + \__tag_graphic_savepos:e { \l__tag_graphic_currentlabel_tl } + \tl_gset:Nx\g__tag_graphic_lx_tl + { + \dim_to_decimal_in_bp:n + { \__tag_ref_value:enn {\l__tag_graphic_currentlabel_tl}{xpos}{0}sp } + } + \tl_gset:Nx\g__tag_graphic_ly_tl + { + \dim_to_decimal_in_bp:n + { \__tag_ref_value:enn {\l__tag_graphic_currentlabel_tl}{ypos}{0}sp } + } + \tl_gset:Nx\g__tag_graphic_ux_tl + { + \fp_eval:n + { + \g__tag_graphic_lx_tl + + + \dim_to_decimal_in_bp:n { \Gin@req@width } + } + } + \tl_gset:Nx\g__tag_graphic_uy_tl + { + \fp_eval:n + { + \g__tag_graphic_ly_tl + + + \dim_to_decimal_in_bp:n { \Gin@req@height } + } + } + \legacy_if:nF {Gin@clip} + { + \tl_gset:Nx\g__tag_graphic_ux_tl + { + \fp_eval:n + { + \g__tag_graphic_ux_tl + + + \l__tag_graphic_trim_ux_fp + } + } + \tl_gset:Nx\g__tag_graphic_lx_tl + { + \fp_eval:n + { + \g__tag_graphic_lx_tl + - + \l__tag_graphic_trim_lx_fp + } + } + \tl_gset:Nx\g__tag_graphic_uy_tl + { + \fp_eval:n + { + \g__tag_graphic_uy_tl + + + \l__tag_graphic_trim_uy_fp + } + } + \tl_gset:Nx\g__tag_graphic_ly_tl + { + \fp_eval:n + { + \g__tag_graphic_ly_tl + - + \l__tag_graphic_trim_ly_fp + } + } + } + \__tag_graphic_applyangle:VVVV + \g__tag_graphic_lx_tl + \g__tag_graphic_ly_tl + \g__tag_graphic_ux_tl + \g__tag_graphic_uy_tl + \__tag_graphic_applycorr:NNNN + \g__tag_graphic_lx_tl + \g__tag_graphic_ly_tl + \g__tag_graphic_ux_tl + \g__tag_graphic_uy_tl + \bool_if:NT\l__tag_graphic_debug_bool + { + \__tag_graphic_show_bbox:VVVVne + \g__tag_graphic_lx_tl + \g__tag_graphic_ly_tl + \g__tag_graphic_ux_tl + \g__tag_graphic_uy_tl + {red} + {\int_use:N\g__tag_graphic_int} + } + \__tag_prop_gput:cnx + { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + { A } + { + << + /O /Layout /BBox~ + [ + \g__tag_graphic_lx_tl\c_space_tl + \g__tag_graphic_ly_tl\c_space_tl + \g__tag_graphic_ux_tl\c_space_tl + \g__tag_graphic_uy_tl + ] + >> + } + } + } +\newcommand\picture@tag@bbox@attribute + { + \bool_lazy_all:nT + { + {\tag_if_active_p:} + {!\l__tag_graphic_artifact_bool} + {\l__tag_graphic_BBox_bool} + } + { + \int_gincr:N\g__tag_graphic_int + \tl_set:Nx\l__tag_graphic_currentlabel_tl {__tag_graphic_\int_use:N \g__tag_graphic_int} + \__tag_graphic_savepos:e { \l__tag_graphic_currentlabel_tl } + \tl_gset:Nx \g__tag_graphic_lx_tl + { + \dim_to_decimal_in_bp:n + { \__tag_ref_value:enn {\l__tag_graphic_currentlabel_tl}{xpos}{0}sp } + } + \tl_gset:Nx \g__tag_graphic_ly_tl + { + \dim_to_decimal_in_bp:n + { \__tag_ref_value:enn {\l__tag_graphic_currentlabel_tl}{ypos}{0}sp - \dp\@picbox } + } + \tl_gset:Nx \g__tag_graphic_ux_tl + { + \dim_to_decimal_in_bp:n + { + \g__tag_graphic_lx_tl bp + \wd\@picbox + } + } + \tl_gset:Nx \g__tag_graphic_uy_tl + { + \dim_to_decimal_in_bp:n + { + \g__tag_graphic_ly_tl bp + \ht\@picbox + \dp\@picbox + } + } + \__tag_graphic_applycorr:NNNN + \g__tag_graphic_lx_tl + \g__tag_graphic_ly_tl + \g__tag_graphic_ux_tl + \g__tag_graphic_uy_tl + \bool_if:NT\l__tag_graphic_debug_bool + { + \__tag_graphic_show_bbox:VVVVne + \g__tag_graphic_lx_tl + \g__tag_graphic_ly_tl + \g__tag_graphic_ux_tl + \g__tag_graphic_uy_tl + {red} + {\int_use:N\g__tag_graphic_int} + } + \__tag_prop_gput:cnx + { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop } + { A } + { + << + /O /Layout /BBox~ + [ + \g__tag_graphic_lx_tl\c_space_tl + \g__tag_graphic_ly_tl\c_space_tl + \g__tag_graphic_ux_tl\c_space_tl + \g__tag_graphic_uy_tl + ] + >> + } + } + } + +\RenewDocumentCommand\picture{O{}m} + { + \leavevmode + \keys_set:nn{tag/picture}{#1} % + \tl_set:Nn\l__tag_graphic_alt_dflt_tl {picture~environment} + \pictur@#2 + } +\def\@picture(#1,#2)(#3,#4){% + \@defaultunitsset\@picht{#2}\unitlength + \@defaultunitsset\@tempdimc{#1}\unitlength + \Gin@tag@struct@begin + \setbox\@picbox\hb@xt@\@tempdimc\bgroup + \tag_stop: %do not tag inside the picture box + \@defaultunitsset\@tempdimc{#3}\unitlength + \hskip -\@tempdimc + \@defaultunitsset\@tempdimc{#4}\unitlength + \lower\@tempdimc\hbox\bgroup + \ignorespaces} +\def\endpicture{% + \egroup\hss\egroup + \ht\@picbox\@picht\dp\@picbox\z@ + \picture@tag@bbox@attribute + \mbox{\box\@picbox} + \Gin@tag@struct@end} +\cs_new_protected:Npn \__tag_graphic_show_bbox:nnnnnn #1#2#3#4#5#6%#5 color, #6 graphic + { + \iow_log:n {tag/graphic~debug:~BBox~of~graphics~#6~is~#1~#2~#3~#4} + \hook_gput_code:nnn + {shipout/foreground} + {tag/graphic} + { + \int_compare:nNnT + {\g_shipout_readonly_int} + = + {\__tag_ref_value:enn{__tag_graphic_#6}{abspage}{0}} + { + \put + (#1 bp,\dim_eval:n{-\paperheight + \dim_eval:n{#2 bp}}) + { + \opacity_select:n{0.5}\color_select:n{#5} + \rule + {\dim_eval:n {#3 bp-\dim_eval:n{#1 bp}}} + {\dim_eval:n {#4 bp-\dim_eval:n{#2 bp}}} + } + } + } + } + \cs_generate_variant:Nn \__tag_graphic_show_bbox:nnnnnn {VVVVne} + + +\endinput +%% +%% End of file `latex-lab-testphase-graphic.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-math.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-math.sty new file mode 100644 index 00000000000..efda100178d --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-math.sty @@ -0,0 +1,45 @@ +%% +%% This is file `latex-lab-testphase-math.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-testphase.dtx (with options: `math-sty') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-testphase.dtx + +\ProvidesPackage{latex-lab-testphase-math} + [2023-01-07 v0.8 code related to the math tagging] +\input{latex-lab-mathtagging.ltx} +\input{latex-lab-amsmath.ltx} +\input{latex-lab-mathtools.ltx} +\input{latex-lab-mathpkg.ltx} +\endinput +%% +%% End of file `latex-lab-testphase-math.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty new file mode 100644 index 00000000000..b6f6fe4357a --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty @@ -0,0 +1,120 @@ +%% +%% This is file `latex-lab-testphase-minipage.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-minipage.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-minipage.dtx (C) Copyright 2023 LaTeX Project + +\def\ltlistsversion{v0.81} +\def\ltlistsdate{2023/05/10} + +\ProvidesExplPackage {latex-lab-testphase-minipage} {2023-05-10} {0.81} + {Code related to the tagging of minipages and parboxes} + +\def\@kernel@init@minipage{} +\def\@kernel@init@parbox{} +\def\@kernel@before@minipage{} +\def\@kernel@after@minipage{} +\def\@kernel@before@parbox{} +\def\@kernel@after@parbox{} +\def\@iiiminipage#1#2[#3]#4{% + \@kernel@init@minipage + \leavevmode + \@pboxswfalse + \setlength\@tempdima{#4}% + \def\@mpargs{{#1}{#2}[#3]{#4}}% + \@kernel@before@minipage% new + \setbox\@tempboxa\vbox\bgroup + \color@begingroup + \hsize\@tempdima + \textwidth\hsize \columnwidth\hsize + \@parboxrestore + \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ + \let\@footnotetext\@mpfootnotetext + \let\@listdepth\@mplistdepth \@mplistdepth\z@ + \@minipagerestore + \@setminipage} +\def\endminipage{% + \par + \unskip + \ifvoid\@mpfootins\else + \vskip\skip\@mpfootins + \normalcolor + \footnoterule + \unvbox\@mpfootins + \fi + \@minipagefalse %% added 24 May 89 + \color@endgroup + \egroup + \tag_stop:n{minipage} + \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}% + \tag_start:n{minipage} + \@kernel@after@minipage%new end ... + } +\long\def\@iiiparbox#1#2[#3]#4#5{% + \@kernel@init@parbox + \leavevmode + \@pboxswfalse + \setlength\@tempdima{#4}% + \@kernel@before@parbox% new + \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}% + \ifx\relax#2\else + \setlength\@tempdimb{#2}% + \edef\@parboxto{to\the\@tempdimb}% + \fi + \if#1b\vbox + \else\if #1t\vtop + \else\ifmmode\vcenter + \else\@pboxswtrue $\vcenter + \fi\fi\fi + \@parboxto{\let\hss\vss\let\unhbox\unvbox + \csname bm@#3\endcsname}% + \if@pboxsw \m@th$\fi + \@end@tempboxa% + \@kernel@after@parbox%new end + } +\tl_new:N \l__ltboxes_tag_tl +\tl_set:Nn \l__ltboxes_tag_tl {Div} +\cs_set_protected:Npn\@kernel@before@minipage + { + \tag_mc_end_push:\tag_struct_end: + \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}} +\cs_set_protected:Npn\@kernel@after@minipage + {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}} +\cs_set_protected:Npn\@kernel@before@parbox + {\tag_mc_end_push:\tag_struct_end:\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}} +\cs_set_protected:Npn\@kernel@after@parbox + {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}} + +\endinput +%% +%% End of file `latex-lab-testphase-minipage.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-1.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-1.sty new file mode 100644 index 00000000000..a0c12a56ee0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-1.sty @@ -0,0 +1,83 @@ +%% +%% This is file `latex-lab-testphase-new-or-1.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-new-or-1.dtx (with options: `code') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-new-or-1.dtx (C) Copyright 2020-2023 Frank Mittelbach +\ProvidesPackage{latex-lab-testphase-new-or-1} + [2022-11-94 v0.1a Temporary output patches for tagging and better link support] +\RequirePackage{etoolbox} +\providecommand\@kernel@before@head{} +\providecommand\@kernel@before@foot{} +\providecommand\@kernel@after@head{} +\providecommand\@kernel@after@foot{} +\providecommand\@mult@ptagging@hook{}% multicol + +\patchcmd\@outputpage + {\vfil\color@hbox\normalcolor\hb@xt@\textwidth{\@thehead}\color@endbox} + {\vfil\@kernel@before@head\color@hbox\normalcolor\hb@xt@\textwidth{\@thehead}\color@endbox\@kernel@after@head} + {\typeout{Patching header in \string\@outputpage}}{\PATCHerror } + +\patchcmd\@outputpage + {\color@hbox\normalcolor\hb@xt@\textwidth{\@thefoot}\color@endbox} + {\@kernel@before@foot\color@hbox\normalcolor\hb@xt@\textwidth{\@thefoot}\color@endbox\@kernel@after@foot} + {\typeout{Patching footer in \string\@outputpage}}{\PATCHerror } + \providecommand\@kernel@before@footins{} + \providecommand\@kernel@before@cclv{} + + \patchcmd\@makecol + {\vskip\skip\footins} + {\vskip\skip\footins\@kernel@before@footins} + {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror } + + + \pretocmd\@makecol{\@kernel@before@cclv} + {\typeout{Patching \string\@makecol\space for tagging}}{\PATCHerror } +\AddToHook{package/multicol/after} + {% multicol needs later loading + \patchcmd\page@sofar + {\global\dimen\tw@\dp\z@}% + {% + \global\dimen\tw@\dp\z@ + \@mult@ptagging@hook + }% + {\typeout{Patching \string\page@sofar\space for tagging}}{\PATCHerror}% +} +\ExplSyntaxOn +\def\@kernel@before@head{\pdfannot_link_off:} +\def\@kernel@before@foot{\pdfannot_link_off:} +\def\@kernel@after@head {\pdfannot_link_on:} +\def\@kernel@after@foot {\pdfannot_link_on:} +\ExplSyntaxOff +\endinput +%% +%% End of file `latex-lab-testphase-new-or-1.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-2.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-2.sty new file mode 100644 index 00000000000..7b7be705354 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or-2.sty @@ -0,0 +1,169 @@ +%% +%% This is file `latex-lab-testphase-new-or-2.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-new-or-2.dtx (with options: `code') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-new-or-2.dtx +\ProvidesPackage{latex-lab-testphase-new-or-2} + [2022-11-04 v0.1c changes to the output routine] +\def \@makecol {% + \@kernel@before@cclv + \setbox\@outputbox \box\@cclv + \@outputbox@removebskip + \let\@elt\relax + \xdef\@freelist{\@freelist\@midlist}% + \global \let \@midlist \@empty + \@makecol@cfgpoint + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \@makenormalcolbox + \fi + \global \maxdepth \@maxdepth +} +\newdimen\@outputbox@depth +\def \@makenormalcolbox {% + \setbox\@outputbox \vbox to\@colht {% + \@texttop + \@outputbox@depth \dp\@outputbox + \unvbox \@outputbox + \vskip -\@outputbox@depth + \@textbottom + }% +} +\def \@makespecialcolbox {% + \@outputbox@append {\vskip-\@outputbox@depth}% + \@tempdima \@colht + \ifdim \wd\@kludgeins>\z@ + \advance \@tempdima -\ht\@outputbox + \advance \@tempdima \pageshrink + \setbox\@outputbox \vbox to \@colht {% + \unvbox\@outputbox + \vskip \@tempdima + \@textbottom + }% + \else + \advance \@tempdima -\ht\@kludgeins + \setbox \@outputbox \vbox to \@colht {% + \vbox to \@tempdima {% + \unvbox\@outputbox + \@textbottom}% + \vss}% + \fi + {\setbox \@tempboxa \box \@kludgeins}% +} +\def\@outputbox@removebskip{% + \ifx\@textbottom\relax \else + \@outputbox@append{% + \@tempskipa\lastskip + \ifnum \gluestretchorder\@tempskipa>\z@ + \vskip-\@tempskipa + \xdef\@outputbox@reinsertbskip + {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}% + \else + \global\let\@outputbox@reinsertbskip\relax + \fi + }% + \fi +} +\let\@outputbox@reinsertbskip\relax +\providecommand\@kernel@before@cclv{} +\providecommand\@kernel@before@footins{} +\def\@outputbox@append #1{% + \setbox\@outputbox \vbox {% + \boxmaxdepth \@maxdepth + \@outputbox@depth\dp\@outputbox % if needed in #1 + \unvbox \@outputbox + #1% + }% +} +\def\@outputbox@appendfootnotes {% + \ifvoid\footins \else + \@makecol@handlesplitfootnotes + \@makecol@cfgpointii + \@outputbox@append{% + \vskip \skip\footins + \@kernel@before@footins + \color@begingroup + \normalcolor + \footnoterule + \csname pdfcolfoot@current\endcsname + \unvbox \footins + \color@endgroup + }% + \fi +} +\let \@outputbox@attachfloats \@combinefloats +\def \@outputbox@attachtopfloats {% + \ifx \@toplist\@empty \else \@cflt \fi +} +\def \@outputbox@attachbottomfloats {% + \ifx \@botlist\@empty \else \@cflb \fi +} +\def\@makecol@handlesplitfootnotes {% + \ifnum\insertpenalties>\z@ + \@makecol@splitfootnotemessagehook + \fi +} +\let \@makecol@splitfootnotemessagehook \@empty +\let \@makecol@cfgpointii \@empty +\def\@if@flushbottom@TF{% + \ifx\@textbottom\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\def\@if@footnotes@TF{% + \ifvoid\footins + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +} +\def\@if@bfloats@TF{% + \ifx \@botlist\@empty + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +} + \def\@makecol@cfgpoint {% + \@outputbox@appendfootnotes + \@outputbox@attachfloats + \@outputbox@reinsertbskip + } +\declare@file@substitution{footmisc.sty}{latex-lab-footmisc.ltx} +\input{latex-lab-footnotes.ltx} +\endinput +%% +%% End of file `latex-lab-testphase-new-or-2.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty deleted file mode 100644 index 61c8fd594c9..00000000000 --- a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty +++ /dev/null @@ -1,169 +0,0 @@ -%% -%% This is file `latex-lab-testphase-new-or.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% latex-lab-new-or.dtx (with options: `code') -%% -%% This is a generated file. -%% -%% Copyright 2021,2022 LaTeX Project -%% -%% This file was generated from file(s) of the `LaTeX-lab Bundle'. -%% ------------------------------------------------------------------------------------ -%% -%% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2008 or later. -%% -%% This file may only be distributed together with a copy of the LaTeX -%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' -%% without such generated files. -%% -%% The newest sources can be found below -%% -%% https://github.com/latex3/latex2e/required/latex-lab -%% -%% where one can also log issues in case there are any. -%% -%% -%% File: latex-lab-new-or.dtx -\ProvidesFile{latex-lab-new-or.ltx} - [2022-03-09 v0.1b changes to the output routine] -\def \@makecol {% - \@kernel@before@cclv - \setbox\@outputbox \box\@cclv - \@outputbox@removebskip - \let\@elt\relax - \xdef\@freelist{\@freelist\@midlist}% - \global \let \@midlist \@empty - \@makecol@cfgpoint - \ifvbox\@kludgeins - \@makespecialcolbox - \else - \@makenormalcolbox - \fi - \global \maxdepth \@maxdepth -} -\newdimen\@outputbox@depth -\def \@makenormalcolbox {% - \setbox\@outputbox \vbox to\@colht {% - \@texttop - \@outputbox@depth \dp\@outputbox - \unvbox \@outputbox - \vskip -\@outputbox@depth - \@textbottom - }% -} -\def \@makespecialcolbox {% - \@outputbox@append {\vskip-\@outputbox@depth}% - \@tempdima \@colht - \ifdim \wd\@kludgeins>\z@ - \advance \@tempdima -\ht\@outputbox - \advance \@tempdima \pageshrink - \setbox\@outputbox \vbox to \@colht {% - \unvbox\@outputbox - \vskip \@tempdima - \@textbottom - }% - \else - \advance \@tempdima -\ht\@kludgeins - \setbox \@outputbox \vbox to \@colht {% - \vbox to \@tempdima {% - \unvbox\@outputbox - \@textbottom}% - \vss}% - \fi - {\setbox \@tempboxa \box \@kludgeins}% -} -\def\@outputbox@removebskip{% - \ifx\@textbottom\relax \else - \@outputbox@append{% - \@tempskipa\lastskip - \ifnum \gluestretchorder\@tempskipa>\z@ - \vskip-\@tempskipa - \xdef\@outputbox@reinsertbskip - {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}% - \else - \global\let\@outputbox@reinsertbskip\relax - \fi - }% - \fi -} -\let\@outputbox@reinsertbskip\relax -\providecommand\@kernel@before@cclv{} -\providecommand\@kernel@before@footins{} -\def\@outputbox@append #1{% - \setbox\@outputbox \vbox {% - \boxmaxdepth \@maxdepth - \@outputbox@depth\dp\@outputbox % if needed in #1 - \unvbox \@outputbox - #1% - }% -} -\def\@outputbox@appendfootnotes {% - \ifvoid\footins \else - \@makecol@handlesplitfootnotes - \@makecol@cfgpointii - \@outputbox@append{% - \vskip \skip\footins - \@kernel@before@footins - \color@begingroup - \normalcolor - \footnoterule - \csname pdfcolfoot@current\endcsname - \unvbox \footins - \color@endgroup - }% - \fi -} -\let \@outputbox@attachfloats \@combinefloats -\def \@outputbox@attachtopfloats {% - \ifx \@toplist\@empty \else \@cflt \fi -} -\def \@outputbox@attachbottomfloats {% - \ifx \@botlist\@empty \else \@cflb \fi -} -\def\@makecol@handlesplitfootnotes {% - \ifnum\insertpenalties>\z@ - \@makecol@splitfootnotemessagehook - \fi -} -\let \@makecol@splitfootnotemessagehook \@empty -\let \@makecol@cfgpointii \@empty -\def\@if@flushbottom@TF{% - \ifx\@textbottom\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\def\@if@footnotes@TF{% - \ifvoid\footins - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi -} -\def\@if@bfloats@TF{% - \ifx \@botlist\@empty - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi -} - \def\@makecol@cfgpoint {% - \@outputbox@appendfootnotes - \@outputbox@attachfloats - \@outputbox@reinsertbskip - } -\declare@file@substitution{footmisc.sty}{latex-lab-footmisc.ltx} -\input{latex-lab-footnotes.ltx} -\endinput -%% -%% End of file `latex-lab-testphase-new-or.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty new file mode 100644 index 00000000000..37d260300ad --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty @@ -0,0 +1,412 @@ +%% +%% This is file `latex-lab-testphase-sec.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-sec.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-sec.dtx (C) Copyright 2022-2023 LaTeX Project +\ProvidesExplPackage {latex-lab-testphase-sec} {2023-05-20} {0.81} + {Code related to the tagging of sectioning commands} +\RequirePackage{latex-lab-kernel-changes} +\seq_new:N \g__tag_sec_stack_seq +\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}} +\bool_new:N \l__tag_sec_Sect_bool +\bool_set_true:N\l__tag_sec_Sect_bool + +\cs_new_protected:Npn\__tag_sec_begin:nn #1 #2 %#1 level #2 keyval + { + \tag_struct_begin:n + { + tag= {\int_compare:nNnTF {#1}={-1}{Part}{Sect}} + ,#2 + } + \seq_gpush:Nx \g__tag_sec_stack_seq {{\g__tag_struct_tag_tl}{\int_eval:n{#1}}} + } +\msg_new:nnn { tag } {wrong-sect-nesting} + { + The~structure~#1~can~not~be~closed.\\ + It~is~not~equal~to~the~current~structure~#2~on~the~main~stack + } + +\cs_new_protected:Npn\__tag_sec_end:n #1 % #1 level + { + \seq_get:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl + \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nn\l__tag_tmpa_tl+1} + { + \seq_get:NN\g__tag_struct_tag_stack_seq \l__tag_tmpb_tl + \exp_args:Nee + \tl_if_eq:nnTF + {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpa_tl} + {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpb_tl} + { + \seq_gpop:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl + \tag_struct_end: + \__tag_sec_end:n {#1} + } + { + \msg_warning:nnxx {tag}{wrong-sect-nesting} + { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl } + { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpb_tl } + } + } + } + +\cs_new_protected:Npn \__tag_tool_para_split: + { + \tag_mc_end: + \tag_struct_end: + \tag_struct_begin:n{tag=\l__tag_para_tag_default_tl} + \tag_mc_begin:n{} + \__tag_setup_restore_para_default: + } + +\cs_new_protected:Npn \__tag_setup_restore_para_default: + { + \tl_set:Nn \l__tag_para_main_tag_tl {text-unit} + \tl_set_eq:NN\l__tag_para_tag_tl\l__tag_para_tag_default_tl + } +\cs_new_protected:Npn \__tag_sec_end_display: + { + \tag_struct_end: %P = Hn + \__tag_setup_restore_para_default: + } +\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\__tag_sec_end:n{-10}} +\hook_gset_rule:nnnn {tagpdf/finish/before}{tagpdf/sec}{before}{tagpdf} +\AddToHook{cmd/frontmatter/before}{\__tag_sec_end:n{-10}} +\AddToHook{cmd/mainmatter/before} {\__tag_sec_end:n{-10}} +\AddToHook{cmd/backmatter/before} {\__tag_sec_end:n{-10}} +\AddToHook{cmd/appendix/before} {\__tag_sec_end:n{-10}} +\cs_if_free:NT \tag_tool:n + { + \cs_new_protected:Npn \tag_tool:n #1 + { + \tag_if_active:T { \keys_set:nn {tag / tool}{#1} } + } + \cs_set_eq:NN\tagtool\tag_tool:n + } +\keys_define:nn { tag / tool} + { + ,sec-start-part .code:n = + { + \bool_if:NT\l__tag_sec_Sect_bool + { + \__tag_sec_end:n {-1} + \__tag_sec_begin:nn{-1}{tag=Part} + } + \tag_struct_begin:n{tag=part,title=#1} + \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct} + \tl_set:Nn\l__tag_para_tag_tl {Span} + } + ,sec-stop-part .code:n = {\__tag_sec_end_display:} + ,sec-start-chapter .code:n = + { + \bool_if:NT\l__tag_sec_Sect_bool + { + \__tag_sec_end:n {0} + \__tag_sec_begin:nn{0}{tag=Sect} + } + \tag_struct_begin:n{tag=chapter,title=#1} + \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct} + \tl_set:Nn\l__tag_para_tag_tl {Span} + } + ,sec-stop-chapter .meta:n = { sec-stop-part} + ,sec-start .code:n = % #1 is a name like "section" + { + \bool_if:NT\l__tag_sec_Sect_bool + { + \__tag_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0} + \__tag_sec_begin:nn {\cs_if_exist_use:c{toclevel@#1}+0}{tag=Sect} + } + \tl_set:Nn\l__tag_para_tag_tl{#1} + } + ,sec-start .value_required:n = true + ,sec-split-para .code:n = {\__tag_tool_para_split:} + ,restore-para .code:n = {\__tag_setup_restore_para_default:} + ,sec-stop .code:n = + { + \par\__tag_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0} + } + ,sec-stop .value_required:n = true + ,sec-add-grouping .bool_set:N = \l__tag_sec_Sect_bool + } +\AddToHook{class/after} + { + \@ifundefined{chapter} + { + \RenewDocumentCommand\part{ s O{#3} m } + { + \if@noskipsec \leavevmode \fi + \par + \addvspace{4ex}% + \@afterindentfalse + % tagging start commands + \tag_tool:n {sec-start-part=#2} + % end tagging start commands + \bool_lazy_any:nT + { + { #1 } + { + \int_compare_p:nNn {\c@secnumdepth}<{-1} + } + } + { + \MakeLinkTarget[part]{} + } + \IfBooleanTF + {#1} + { \@spart {#3} } + { \@part [#2]{#3} } + \tag_tool:n {sec-stop-part} + } + } + { + \RenewDocumentCommand\chapter{ s O{#3} m } + { + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \tag_tool:n { sec-start-chapter= #2 } + \bool_lazy_any:nT + { + { #1 } + { + \int_compare_p:nNn {\c@secnumdepth}<{0} + } + { + %in book target also needed in frontmatter + \bool_lazy_and_p:nn + { \cs_if_exist_p:c { @mainmattertrue } } + { ! \legacy_if_p:n { @mainmatter } } + } + } + { + \MakeLinkTarget[chapter]{} + %todo public function for this update! + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } + \IfBooleanTF + {#1} + { \@schapter {#3} } + { \@chapter [#2]{#3} } + \tag_tool:n {sec-stop-chapter} + } + \RenewDocumentCommand\part{ s O{#3} m } + { + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \thispagestyle{plain}% + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \null\vfil + \tag_tool:n {sec-start-part=#2} + \bool_lazy_any:nT + { + { #1 } + { + \int_compare_p:nNn {\c@secnumdepth}<{-1} + } + { + %in book target also needed in frontmatter + \bool_lazy_and_p:nn + { \cs_if_exist_p:c { @mainmattertrue } } + { ! \legacy_if_p:n { @mainmatter } } + } + } + { + \MakeLinkTarget[part]{} + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } + \IfBooleanTF + {#1} + { \@spart {#3} } + { \@part [#2]{#3} } + \tag_tool:n{sec-stop-part} + } + } + } +\def\hyper@nopatch@sectioning{} +\cs_new_protected:Npn \@hyp@section@target@nnn #1 #2 #3 %#1 optarg #2 name/counter, #3 indent + { + \makebox[0pt][l] + { + \skip_set:Nn \@tempskipa {#3} + \dim_compare:nNnF {\@tempskipa}<{0pt}{\kern-\@tempskipa} + \MakeLinkTarget#1{#2} + } + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } +\def\@startsection#1#2#3#4#5#6{% + \if@noskipsec \leavevmode \fi + \par + \@tempskipa #4\relax + \@afterindenttrue + \ifdim \@tempskipa <\z@ + \@tempskipa -\@tempskipa \@afterindentfalse + \fi + \if@nobreak + \everypar{}% + \else + \addpenalty\@secpenalty\addvspace\@tempskipa + \fi + \tag_tool:n { sec-start=#1}%new + \@ifstar + {\@ssect{#3}{#4}{#5}{#6}}% + {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} +\cs_new_protected:Npn \@kernel@tag@hangfrom #1 + { + \tagstructbegin{tag=\l__tag_para_tag_tl} + \tagstructbegin{tag=Lbl} + \setbox\@tempboxa + \hbox + { + \bool_lazy_and:nnT + {\tag_if_active_p:} + {\g__tag_mode_lua_bool} + {\tagmcbegin{tag=Lbl}} + {#1} + } + \tag_stop:n{hangfrom} + \hangindent \wd\@tempboxa\noindent + \tag_start:n{hangfrom} + \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}} +\cs_new_protected:Npn \@kernel@tag@svsec + { + \tag_mc_end_push: + \tag_struct_begin:n{tag=Lbl} + \tag_mc_begin:n{} + \@svsec + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \def\@svsec{\@hyp@section@target@nnn{[section]}{}{#3}} + \else + \LinkTargetOff + \refstepcounter{#1}% + \LinkTargetOn + \protected@edef\@svsec{\@hyp@section@target@nnn{}{#1}{#3}\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + \tagtool{para-flattened=true} % or \bool_set_true\l__tag_para_flattened_bool + #6{% + \ifnum #2>\c@secnumdepth + \@hangfrom {\hskip #3\relax\@svsec}% + \else + \@kernel@tag@hangfrom{\hskip #3\relax\@svsec}% + \fi + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \ifnum #2>\c@secnumdepth + \@svsec + \else + \@kernel@tag@svsec + \fi #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +\def\@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup + \tagtool{para-flattened=true} + #4{% + \@hangfrom{\hskip #1\relax\@hyp@section@target@nnn{[section]}{}{#1}}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \else + \def\@svsechd{#4{\hskip #1\relax\@hyp@section@target@nnn{[section]}{}{#3}\relax #5}}% + \fi + \@xsect{#3}} +\def\@xsect#1{% + \@tempskipa #1\relax + \ifdim \@tempskipa>\z@ + \par \nobreak + \vskip \@tempskipa + \tag_tool:n {restore-para} + \@afterheading + \else + \@nobreakfalse + \global\@noskipsectrue + \everypar{% + \if@noskipsec + \global\@noskipsecfalse + {\setbox\z@\lastbox}% + \clubpenalty\@M + \begingroup \@svsechd \endgroup + \unskip + \tag_tool:n {sec-split-para} + \@tempskipa #1\relax + \hskip -\@tempskipa + \else + \clubpenalty \@clubpenalty + \everypar{}% + \fi}% + \fi + \ignorespaces} + +\endinput +%% +%% End of file `latex-lab-testphase-sec.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty new file mode 100644 index 00000000000..eb79c90efea --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty @@ -0,0 +1,83 @@ +%% +%% This is file `latex-lab-testphase-text.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-text.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-text.dtx (C) Copyright 2023 LaTeX Project +\ProvidesExplPackage {latex-lab-testphase-text} {2023-05-28} {0.8} + {Code related to the tagging of inline text commands} + +\AddToHook{cmd/LaTeX/before} + { + \mode_leave_vertical: + \tag_mc_end_push: + \tag_struct_begin:n{tag=Span,actualtext=LaTeX} + \tag_mc_begin:n{} + \tag_stop:n{LaTeX} + } +\AddToHook{cmd/LaTeX/after} + { + \tag_start:n{LaTeX} + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } +\AddToHook{cmd/TeX/before} + { + \mode_leave_vertical: + \tag_mc_end_push: + \tag_struct_begin:n{tag=Span,actualtext=TeX} + \tag_mc_begin:n{} + } +\AddToHook{cmd/TeX/after} + { + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } +\AddToHook{cmd/emph/before} + { + \mode_leave_vertical: + \tag_mc_end_push: + \tag_struct_begin:n{tag=Em} + \tag_mc_begin:n{} + } + +\AddToHook{cmd/emph/after} + { + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin_pop:n{} + } +\endinput +%% +%% End of file `latex-lab-testphase-text.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty new file mode 100644 index 00000000000..effe44b7358 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty @@ -0,0 +1,575 @@ +%% +%% This is file `latex-lab-testphase-toc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-toc-tagging-functions.dtx (with options: `header') +%% latex-lab-toc-kernel-changes.dtx (with options: `package') +%% latex-lab-toc-tagging-functions.dtx (with options: `package') +%% latex-lab-toc-hyperref-changes.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-toc-tagging-functions.dtx (C) Copyright 2022-2023 LaTeX Project +\ProvidesExplPackage {latex-lab-testphase-toc} {2023-05-20} {0.82} + { commands related to the tagging of toc-like lists} +%% File: latex-lab-toc-kernel-functions.dtx (C) Copyright 2022-2023 LaTeX Project +\RequirePackage{latex-lab-kernel-changes} +\def\@contentsline@cfgpoint@before#1#2#3#4{} +\def\@contentsline@cfgpoint@after#1#2#3#4{} +\def\contentsline#1#2#3#4% + {% + \@contentsline@cfgpoint@before{#1}{#2}{#3}{#4}% + \gdef\@contentsline@destination{#4}% + \csname l@#1\endcsname{#2}{#3}% + \@contentsline@cfgpoint@after{#1}{#2}{#3}{#4}% + } +\def\addcontentsline#1#2#3{% #1=toc extension, #2= heading type, tag + \addtocontents{#1}{% + \protect\contentsline{#2}{#3}{\thepage}{\@currentHref}\protected@file@percent + }} +\def\@starttoc@cfgpoint@before#1{} +\def\@starttoc@cfgpoint@after#1{} +\def\@starttoc#1{% + \begingroup + \makeatletter + \@starttoc@cfgpoint@before{#1}% + \@input{\jobname.#1}% + \@starttoc@cfgpoint@after{#1} + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse + \endgroup} +\NewMirroredHookPairWithArguments{contentsline/number/before}{contentsline/number/after}{1}% +\NewMirroredHookPairWithArguments{contentsline/text/before}{contentsline/text/after}{4}% +\NewMirroredHookPairWithArguments{contentsline/page/before}{contentsline/page/after}{4}% +\def\@dottedtocline@cfgpoint@leaders#1{#1} + +\def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth \else + \vskip \z@ \@plus.2\p@ + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + \UseHookWithArguments{contentsline/text/before}{4}{#1}{#4}{#5}{\@contentsline@destination}% + \csname contentsline@text@#1@format\endcsname{#4}% + \UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{\@contentsline@destination}% + \nobreak + \@dottedtocline@cfgpoint@leaders{% + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu$}\hfill}% + \nobreak + \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor + \UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{\@contentsline@destination}% + #5% + \UseHookWithArguments{contentsline/page/after}{4}{#1}{#4}{#5}{\@contentsline@destination}% + \kern-\p@\kern\p@}% + \par}% + \fi} +\def\numberline#1{\hb@xt@\@tempdima{% + \UseHookWithArguments{contentsline/number/before}{1}{#1}% + #1\hfil + \UseHookWithArguments{contentsline/number/after}{1}{#1}% + }} +\AddToHook{class/article/after} + { + \renewcommand*\l@part[2]{% as in contentsline: content, page + \ifnum \c@tocdepth >-2\relax + \addpenalty\@secpenalty + \addvspace{2.25em \@plus\p@}% + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \large \bfseries + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \csname contentsline@text@-1@format\endcsname{#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \hfil + \hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \kern-\p@\kern\p@}}\par + \nobreak + \endgroup + \fi} +\renewcommand*\l@section[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty + \addvspace{1.0em \@plus\p@}% + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@section}{#1}{#2}{\@contentsline@destination}% + \csname contentsline@text@1@format\endcsname{#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@section}{#1}{#2}{\@contentsline@destination}% + \nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@section}{#1}{#2}{\@contentsline@destination}% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@section}{#1}{#2}{\@contentsline@destination}% + \kern-\p@\kern\p@}\par + \endgroup + \fi} + } +\AddToHook{class/report/after} + { + \renewcommand*\l@part[2]{% + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% + \addvspace{2.25em \@plus\p@}% + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \large \bfseries + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \csname contentsline@text@-1@format\endcsname{#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \hfil + \hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}% + \kern-\p@\kern\p@}}\par + \nobreak + \endgroup + \fi} + \renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}% + \csname contentsline@text@0@format\endcsname + {#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}% + \nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%% + \kern-\p@\kern\p@}\par + \penalty\@highpenalty + \endgroup + \fi} + } +\AddToHook{class/book/after} + { + \renewcommand*\l@part[2]{% + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% + \addvspace{2.25em \@plus\p@}% + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \large \bfseries + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}%% + \csname contentsline@text@-1@format\endcsname{#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}%% + \hfil + \hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}%% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@part}{#1}{#2}{\@contentsline@destination}%% + \kern-\p@\kern\p@}}\par + \nobreak + \endgroup + \fi} + \renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + \UseHookWithArguments{contentsline/text/before}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}% + \csname contentsline@text@0@format\endcsname + {#1}% + \UseHookWithArguments{contentsline/text/after}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}% + \nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss + \UseHookWithArguments{contentsline/page/before}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}% + #2% + \UseHookWithArguments{contentsline/page/after}{4} + {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}% + \kern-\p@\kern\p@}\par + \penalty\@highpenalty + \endgroup + \fi} + } + +%% File: latex-lab-toc-tagging-functions.dtx (C) Copyright 2022-2023 LaTeX Project +\tl_new:N \l__tag_toc_tmpa_tl +\AddToHook{cmd/refstepcounter/after} + { + \tl_if_blank:VF \@currentHref + { + \prop_if_exist:NT \g__tag_struct_dest_num_prop + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } + } +\AddToHook{cmd/H@refstepcounter/after} + { + \tl_if_blank:VF \@currentHref + { + \prop_if_exist:NT \g__tag_struct_dest_num_prop + { + \prop_gput:Nxx \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}} + } + } + } +\msg_new:nnn { tag } {struct-dest-unknown} + { + Destination~#1~has~no~related~structure.\\ + /Ref~for~structure~#2~not~updated + } + +\cs_new_protected:Npn \g__tag_struct_ref_by_dest: + { + \prop_map_inline:Nn\g__tag_struct_ref_by_dest_prop + { + \prop_get:NnNTF \g__tag_struct_dest_num_prop {##2} \l__tag_tmpa_tl + { + \__tag_struct_gput_data_ref:ee + { ##1 } + { \tag_struct_object_ref:e{ \l__tag_tmpa_tl }} + } + { + \msg_warning:nnnn {tag}{struct-dest-unknown}{##2}{ ##1} + } + } + } +\hook_gput_code:nnn {tagpdf/finish/before}{tagpdf/struct/Ref}{\g__tag_struct_ref_by_dest:} +\int_new:N \g__tag_toc_level_int +\seq_new:N \g__tag_toc_stack_seq + +\cs_new_protected:Npn \__tag_toc_starttoc_init:n #1 + { + \bool_set_false:N \l__tag_para_bool + \seq_gclear:N \g__tag_toc_stack_seq + \int_gset:Nn \g__tag_toc_level_int {-100} + \tag_struct_begin:n{tag=TOC,title=#1} + } +\cs_set_protected:Npn\@starttoc@cfgpoint@before#1 + { + \__tag_toc_starttoc_init:n{#1} + } +\cs_new_protected:Npn \__tag_toc_starttoc_finalize: + { + \int_step_inline:nn + {\seq_count:N \g__tag_toc_stack_seq } + {\tag_struct_end:} + \tag_struct_end: + \seq_gclear:N \g__tag_toc_stack_seq + } +\cs_set_protected:Npn\@starttoc@cfgpoint@after#1 + { + \__tag_toc_starttoc_finalize: + } + +\cs_new_protected:Npn \__tag_toc_end:n #1 + { + \seq_get:NNT\g__tag_toc_stack_seq \l__tag_toc_tmpa_tl + { + \bool_lazy_and:nnT + { + \str_if_eq_p:ee{\tl_head:N\l__tag_toc_tmpa_tl}{TOC} + } + { + \int_compare_p:nNn {#1}<{\tl_tail:N \l__tag_toc_tmpa_tl} + } + { + \seq_gpop:NN\g__tag_toc_stack_seq \l__tag_toc_tmpa_tl + \tag_struct_end: + \__tag_toc_end:n{#1} + } + } + } +\cs_generate_variant:Nn \__tag_toc_end:n {e} +\cs_new_protected:Npn \__tag_toc_contentsline_begin:nnn #1 #2 #3 %#1 level, #2 content, #3 destination + { + \tag_if_active:T + { + \ExpandArgs{c}\providecommand { toclevel@#1 }{ 1 } % just in case ... + \int_compare:nNnF { \use:c{toclevel@#1} } > {\use:c{c@tocdepth}} + { + \bool_lazy_and:nnT + { \int_compare_p:nNn { \g__tag_toc_level_int } > {-100} } + { \int_compare_p:nNn { \use:c{toclevel@#1} } > { \g__tag_toc_level_int } } + { + \seq_gpush:Nx \g__tag_toc_stack_seq {{TOC}\use:c{toclevel@#1}} + \tag_struct_begin:n{tag=TOC} + } + \int_compare:nNnT + { \use:c{toclevel@#1} } < { \g__tag_toc_level_int } + { + \__tag_toc_end:e { \use:c{toclevel@#1} } + } + \int_gset:Nn \g__tag_toc_level_int { \use:c{toclevel@#1} } + \group_begin: + \text_declare_expand_equivalent:Nn \numberline \use_none:n + \exp_args:Nx \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}} + \prop_gput:Nxx \g__tag_struct_ref_by_dest_prop + { \tag_get:n {struct_num} }{#3} + \seq_gpush:Nx \g__tag_toc_stack_seq {{TOCI}\use:c{toclevel@#1}} + \group_end: + } + } + } +\cs_set_protected:Npn\@contentsline@cfgpoint@before#1#2#3#4 + { + \__tag_toc_contentsline_begin:nnn {#1}{#2}{#4} + } +\msg_new:nnn {tag}{toc-no-TOCI}{Missing~TOCI~structure~on~toc~stack} + +\cs_new_protected:Npn \__tag_toc_contentsline_end:n #1 %#1 level name + { + \int_compare:nNnF { \use:c{toclevel@#1} } > {\use:c{c@tocdepth}} + { + \seq_gpop:NNT \g__tag_toc_stack_seq\l__tag_tmpa_tl + { + \str_if_eq:eeTF{\tl_head:N\l__tag_tmpa_tl}{TOCI} + { + \tag_struct_end: + } + { + \msg_warning:nn{tag}{toc-no-TOCI} + } + } + } + } +\cs_set_protected:Npn \@contentsline@cfgpoint@after #1#2#3#4 + { + \__tag_toc_contentsline_end:n {#1} + } +\AddToHook{contentsline/text/before}[tagpdf]{% + \tag_struct_begin:n{tag=Reference}% + \tag_mc_begin:n{tag=Reference}} +\AddToHook{contentsline/text/after}[tagpdf]{% + \tag_mc_end:} +\AddToHook{contentsline/page/before}[tagpdf]{% + \tag_mc_begin:n{tag=Reference}} +\AddToHook{contentsline/page/after}[tagpdf]{% + \tag_mc_end: + \tag_struct_end:} %Reference +\AddToHook{contentsline/number/before}[tagpdf]{% + \tag_mc_end: + \tag_struct_begin:n{tag=Lbl}% + \tag_mc_begin:n{tag=Lbl}} +\AddToHook{contentsline/number/after}[tagpdf]{% + \tag_mc_end: + \tag_struct_end: + \tag_mc_begin:n{tag=Reference}} +\def\@dottedtocline@cfgpoint@leaders#1{% + \tag_mc_begin:n{artifact}\tag_stop:n{leaders}\nobreak#1\nobreak\tag_start:n{leaders}\tag_mc_end:} + +%% File: latex-lab-toc-hyperref-changes.dtx (C) Copyright 2022-2023 LaTeX Project +\def\hyper@nopatch@toc{} +\AddToHook{package/hyperref/after} + { + \@ifpackagelater{hyperref}{2023-02-07}{} + {\PackageWarning{latex-lab-testphase-toc-tagging}{hyperref too old}{}} + } +\ExplSyntaxOn +\AddToHook{package/hyperref/after} + { + \AddToHookWithArguments{contentsline/text/before}[hyp] + { + \tl_if_blank:nF {#2}%text + { + \tl_if_blank:nF {#4}%destination + { + \int_case:nnF {\Hy@linktoc} + { + {0}{} %none + {1}{\hyper@linkstart{link}{#4}} %section + {2}{} %page + } + {\hyper@linkstart{link}{#4}} %all + } + } + } + \AddToHookWithArguments{contentsline/text/after}[hyp] + { + \tl_if_blank:nF {#2} + { + \tl_if_blank:nF {#4} + { + \int_case:nnF {\Hy@linktoc} + { + {0}{} %none + {1}{\hyper@linkend} %section + {2}{} %page + } + {\hyper@linkend} %all + } % none + } + } + + \AddToHookWithArguments{contentsline/page/before}[hyp] + { + \tl_if_blank:nF {#3} + { + \tl_if_blank:nF {#4} % + { + \int_case:nnF {\Hy@linktoc} + { + {0}{} %none + {1}{} %section + {2}{\hyper@linkstart{link}{#4}} %page + } + {\hyper@linkstart{link}{#4}} %all + } % none + } + } + \AddToHookWithArguments{contentsline/page/after}[hyp] + { + \tl_if_blank:nF {#3} + { + \tl_if_blank:nF {#4} + { + \int_case:nnF {\Hy@linktoc} + { + {0}{} %none + {1}{} %section + {2}{\hyper@linkend} %page + } + {\hyper@linkend} %all + } % none + } + } + \AddToHookWithArguments{cmd/addcontentsline/before}[hyp] + {% + \Hy@addcontentsline@addbookmark + {#1} + {#2} + {#3}% + } + } +\ExplSyntaxOff +\newcommand\Hy@addcontentsline@addbookmark[3]%#1 toc type, #2 level, #3 content + {% + \ifx\@currentHref\@empty + \Hy@Warning{% + No destination for bookmark of \string\addcontentsline,% + \MessageBreak destination is added% + }% + \phantomsection + \fi + \begingroup + \expandafter\ifx\csname toclevel@#2\endcsname\relax + \begingroup + \def\Hy@tempa{#1}% + \ifx\Hy@tempa\Hy@bookmarkstype + \Hy@WarningNoLine{% + bookmark level for unknown #2 defaults to 0% + }% + \else + \Hy@Info{bookmark level for unknown #2 defaults to 0}% + \fi + \endgroup + \expandafter\gdef\csname toclevel@#2\endcsname{0}% + \fi + \edef\Hy@toclevel{\csname toclevel@#2\endcsname}% + \Hy@writebookmark{\csname the#2\endcsname}% + {#3}% + {\@currentHref}% + {\Hy@toclevel}% + {#1}% + \ifHy@verbose + \begingroup + \def\Hy@tempa{#3}% + \@onelevel@sanitize\Hy@tempa + \let\temp@online\on@line + \let\on@line\@empty + \Hy@Info{% + bookmark\temp@online:\MessageBreak + thecounter {\csname the#2\endcsname}\MessageBreak + text {\Hy@tempa}\MessageBreak + reference {\@currentHref}\MessageBreak + toclevel {\Hy@toclevel}\MessageBreak + type {#1}% + }% + \endgroup + \fi + \endgroup + } +\endinput +%% +%% End of file `latex-lab-testphase-toc.sty'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/math-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/math-latex-lab-testphase.ltx new file mode 100644 index 00000000000..d57dc7e8742 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/math-latex-lab-testphase.ltx @@ -0,0 +1,42 @@ +%% +%% This is file `math-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-testphase.dtx (with options: `math-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-testphase.dtx + +\ProvidesFile{math-latex-lab-testphase.ltx} + [2023-01-07 v0.8 code related to the math tagging] +\RequirePackage{latex-lab-testphase-math} +\endinput +%% +%% End of file `math-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx new file mode 100644 index 00000000000..9c0a803cb68 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx @@ -0,0 +1,46 @@ +%% +%% This is file `minipage-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-minipage.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-minipage.dtx (C) Copyright 2023 LaTeX Project + +\def\ltlistsversion{v0.81} +\def\ltlistsdate{2023/05/10} + + +\ProvidesFile{minipage-latex-lab-testphase.ltx} + [2022-10-26 v0.8 code related to the tagging of sectioning commands] +\RequirePackage{latex-lab-testphase-minipage} +\endinput +%% +%% End of file `minipage-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/new-or-1-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/new-or-1-latex-lab-testphase.ltx new file mode 100644 index 00000000000..305ecb25304 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/new-or-1-latex-lab-testphase.ltx @@ -0,0 +1,42 @@ +%% +%% This is file `new-or-1-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-testphase.dtx (with options: `new-or-1') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-testphase.dtx + +\ProvidesFile{new-or-1-latex-lab-testphase.ltx} + [2022-11-04 v0.1a latex-lab wrapper new-or-1] +\RequirePackage{latex-lab-testphase-new-or-1} +\endinput +%% +%% End of file `new-or-1-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/new-or-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/new-or-latex-lab-testphase.ltx index 4a17be70d6b..742a1fa3531 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/new-or-latex-lab-testphase.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/new-or-latex-lab-testphase.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -34,11 +34,10 @@ %% %% File: latex-lab-testphase.dtx -\IfFileExists{latex-lab-testphase-new-or.sty} - { - \RequirePackage{latex-lab-testphase-new-or} - } - {} +\ProvidesFile{new-or-latex-lab-testphase.ltx} + [2022-11-04 v0.1a latex-lab wrapper new-or] +\RequirePackage{latex-lab-testphase-new-or-1} +\RequirePackage{latex-lab-testphase-new-or-2} \endinput %% %% End of file `new-or-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/phase-I-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/phase-I-latex-lab-testphase.ltx index 26d8ecd1da9..477a74076fb 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/phase-I-latex-lab-testphase.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/phase-I-latex-lab-testphase.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -34,11 +34,13 @@ %% %% File: latex-lab-testphase.dtx +\ProvidesFile{phase-I-latex-lab-testphase.ltx} + [2023-02-04 v0.1b latex-lab wrapper phase-I] +\RequirePackage{latex-lab-testphase-new-or-1} \RequirePackage{tagpdf} \AddToDocumentProperties [document]{testphase/tagpdf}{loaded} \tagpdfsetup{activate,interwordspace} \AddToDocumentProperties [document]{tagging}{active} -\AddToDocumentProperties [document]{tagging/para}{active} \AddToDocumentProperties [document]{tagging/interwordspace}{active} \endinput %% diff --git a/Master/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx index a99fdab9ffd..7114d4882b2 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -34,16 +34,15 @@ %% %% File: latex-lab-testphase.dtx -\IfFileExists{latex-lab-testphase-new-or.sty} - { - \RequirePackage{latex-lab-testphase-new-or} - } - {} +\ProvidesFile{phase-II-latex-lab-testphase.ltx} + [2022-11-04 v0.1a latex-lab wrapper phase-II] +\RequirePackage{latex-lab-testphase-new-or-1} +\RequirePackage{latex-lab-testphase-new-or-2} \RequirePackage{tagpdf} \AddToDocumentProperties [document]{testphase/tagpdf}{loaded} \tagpdfsetup{activate,paratagging,interwordspace} -\AddToDocumentProperties [document]{tagging}{active} \AddToDocumentProperties [document]{tagging/para}{active} +\AddToDocumentProperties [document]{tagging}{active} \AddToDocumentProperties [document]{tagging/interwordspace}{active} \endinput %% diff --git a/Master/texmf-dist/tex/latex/latex-lab/phase-III-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/phase-III-latex-lab-testphase.ltx new file mode 100644 index 00000000000..3c36a82f86d --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/phase-III-latex-lab-testphase.ltx @@ -0,0 +1,54 @@ +%% +%% This is file `phase-III-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-testphase.dtx (with options: `phase-III') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-testphase.dtx + +\ProvidesFile{phase-III-latex-lab-testphase.ltx} + [2023-03-06 v0.1a latex-lab wrapper phase-III] +\input{phase-II-latex-lab-testphase.ltx} +\IfFormatAtLeastTF{2023-06-01} + { + \RequirePackage{latex-lab-testphase-block-tagging} + \RequirePackage{latex-lab-testphase-sec} + \RequirePackage{latex-lab-testphase-toc} + \RequirePackage{latex-lab-testphase-minipage} + \RequirePackage{latex-lab-testphase-graphic} + \RequirePackage{latex-lab-testphase-float} + \RequirePackage{latex-lab-testphase-bib} + \RequirePackage{latex-lab-testphase-text} + } + {\PackageWarning{latex-lab}{Testphase III needs newer format}{}} +\endinput +%% +%% End of file `phase-III-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/sec-tagging-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/sec-tagging-latex-lab-testphase.ltx new file mode 100644 index 00000000000..cf6557fa41e --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/sec-tagging-latex-lab-testphase.ltx @@ -0,0 +1,42 @@ +%% +%% This is file `sec-tagging-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-sec.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-sec.dtx (C) Copyright 2022-2023 LaTeX Project + +\ProvidesFile{sec-tagging-latex-lab-testphase.ltx} + [2023-05-20 v0.82 code related to the tagging of sectioning commands] +\RequirePackage{latex-lab-testphase-sec} +\endinput +%% +%% End of file `sec-tagging-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/tagpdf-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/tagpdf-latex-lab-testphase.ltx index 20c85a681a2..c12a0c17bbb 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/tagpdf-latex-lab-testphase.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/tagpdf-latex-lab-testphase.ltx @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 2021,2022 LaTeX Project +%% Copyright 2021-2023 LaTeX Project %% %% This file was generated from file(s) of the `LaTeX-lab Bundle'. %% ------------------------------------------------------------------------------------ @@ -34,16 +34,15 @@ %% %% File: latex-lab-testphase.dtx -\IfFileExists{latex-lab-testphase-new-or.sty} - { - \RequirePackage{latex-lab-testphase-new-or} - } - {} +\ProvidesFile{tagpdf-latex-lab-testphase.ltx} + [2022-11-04 v0.1a latex-lab wrapper tagpdf (deprecated)] +\RequirePackage{latex-lab-testphase-new-or-1} +\RequirePackage{latex-lab-testphase-new-or-2} \RequirePackage{tagpdf} \AddToDocumentProperties [document]{testphase/tagpdf}{loaded} \tagpdfsetup{activate,paratagging,interwordspace} -\AddToDocumentProperties [document]{tagging}{active} \AddToDocumentProperties [document]{tagging/para}{active} +\AddToDocumentProperties [document]{tagging}{active} \AddToDocumentProperties [document]{tagging/interwordspace}{active} \endinput %% diff --git a/Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx new file mode 100644 index 00000000000..62b5de750d7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx @@ -0,0 +1,43 @@ +%% +%% This is file `text-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-text.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-text.dtx (C) Copyright 2023 LaTeX Project +\ProvidesFile{text-latex-lab-testphase.ltx} + [2023-05-28 v0.8 code related to the tagging of bib and citations] + +\RequirePackage{latex-lab-testphase-text} + +\endinput +%% +%% End of file `text-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/latex-lab/toc-tagging-latex-lab-testphase.ltx b/Master/texmf-dist/tex/latex/latex-lab/toc-tagging-latex-lab-testphase.ltx new file mode 100644 index 00000000000..2ec61214410 --- /dev/null +++ b/Master/texmf-dist/tex/latex/latex-lab/toc-tagging-latex-lab-testphase.ltx @@ -0,0 +1,44 @@ +%% +%% This is file `toc-tagging-latex-lab-testphase.ltx', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% latex-lab-toc-kernel-changes.dtx (with options: `latex-lab') +%% +%% This is a generated file. +%% +%% Copyright 2021-2023 LaTeX Project +%% +%% This file was generated from file(s) of the `LaTeX-lab Bundle'. +%% ------------------------------------------------------------------------------------ +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/latex3/latex2e/required/latex-lab +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: latex-lab-toc-kernel-functions.dtx (C) Copyright 2022-2023 LaTeX Project + +\ProvidesFile{toc-tagging-latex-lab-testphase.ltx} + [2023-05-20 v0.81 code related to the tagging of toc and similar lists] + +\RequirePackage{latex-lab-testphase-toc} + +\endinput +%% +%% End of file `toc-tagging-latex-lab-testphase.ltx'. diff --git a/Master/texmf-dist/tex/latex/tools/.tex b/Master/texmf-dist/tex/latex/tools/.tex index 42f2147f508..f3f759f1180 100644 --- a/Master/texmf-dist/tex/latex/tools/.tex +++ b/Master/texmf-dist/tex/latex/tools/.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/afterpage.sty b/Master/texmf-dist/tex/latex/tools/afterpage.sty index 84f854ca729..52ae067c1fa 100644 --- a/Master/texmf-dist/tex/latex/tools/afterpage.sty +++ b/Master/texmf-dist/tex/latex/tools/afterpage.sty @@ -12,7 +12,7 @@ %% reports for it can be opened at https://latex-project.org/bugs/ %% (but please observe conditions on bug reports sent to that address!) %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/array.sty b/Master/texmf-dist/tex/latex/tools/array.sty index e3c173cffcb..ff3a57f6eaa 100644 --- a/Master/texmf-dist/tex/latex/tools/array.sty +++ b/Master/texmf-dist/tex/latex/tools/array.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/bm.sty b/Master/texmf-dist/tex/latex/tools/bm.sty index 6850bcb0196..37ac28e1176 100644 --- a/Master/texmf-dist/tex/latex/tools/bm.sty +++ b/Master/texmf-dist/tex/latex/tools/bm.sty @@ -12,7 +12,7 @@ %% reports for it can be opened at https://latex-project.org/bugs/ %% (but please observe conditions on bug reports sent to that address!) %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/calc.sty b/Master/texmf-dist/tex/latex/tools/calc.sty index 793f7315b2b..f1ecb90347f 100644 --- a/Master/texmf-dist/tex/latex/tools/calc.sty +++ b/Master/texmf-dist/tex/latex/tools/calc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/dcolumn.sty b/Master/texmf-dist/tex/latex/tools/dcolumn.sty index 0e0463b70a6..78a01a5ba14 100644 --- a/Master/texmf-dist/tex/latex/tools/dcolumn.sty +++ b/Master/texmf-dist/tex/latex/tools/dcolumn.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/delarray.sty b/Master/texmf-dist/tex/latex/tools/delarray.sty index 1cabd9e2baf..7f98e7ca54d 100644 --- a/Master/texmf-dist/tex/latex/tools/delarray.sty +++ b/Master/texmf-dist/tex/latex/tools/delarray.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/e.tex b/Master/texmf-dist/tex/latex/tools/e.tex index 3134c33d8ca..f527cdda628 100644 --- a/Master/texmf-dist/tex/latex/tools/e.tex +++ b/Master/texmf-dist/tex/latex/tools/e.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/enumerate.sty b/Master/texmf-dist/tex/latex/tools/enumerate.sty index c1698cafd57..86220225a13 100644 --- a/Master/texmf-dist/tex/latex/tools/enumerate.sty +++ b/Master/texmf-dist/tex/latex/tools/enumerate.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/fontsmpl.sty b/Master/texmf-dist/tex/latex/tools/fontsmpl.sty index 9c14681c3f3..7795c1b0da2 100644 --- a/Master/texmf-dist/tex/latex/tools/fontsmpl.sty +++ b/Master/texmf-dist/tex/latex/tools/fontsmpl.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/fontsmpl.tex b/Master/texmf-dist/tex/latex/tools/fontsmpl.tex index 34e4f9a18c4..4ea37210957 100644 --- a/Master/texmf-dist/tex/latex/tools/fontsmpl.tex +++ b/Master/texmf-dist/tex/latex/tools/fontsmpl.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/ftnright.sty b/Master/texmf-dist/tex/latex/tools/ftnright.sty index 944f69d9f8a..d70101bae11 100644 --- a/Master/texmf-dist/tex/latex/tools/ftnright.sty +++ b/Master/texmf-dist/tex/latex/tools/ftnright.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/h.tex b/Master/texmf-dist/tex/latex/tools/h.tex index 6fc489d6da0..c7af478cf4a 100644 --- a/Master/texmf-dist/tex/latex/tools/h.tex +++ b/Master/texmf-dist/tex/latex/tools/h.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/hhline.sty b/Master/texmf-dist/tex/latex/tools/hhline.sty index 8d823aa3b31..97bb952b645 100644 --- a/Master/texmf-dist/tex/latex/tools/hhline.sty +++ b/Master/texmf-dist/tex/latex/tools/hhline.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/indentfirst.sty b/Master/texmf-dist/tex/latex/tools/indentfirst.sty index af37630543b..a552fdd8d67 100644 --- a/Master/texmf-dist/tex/latex/tools/indentfirst.sty +++ b/Master/texmf-dist/tex/latex/tools/indentfirst.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/layout.sty b/Master/texmf-dist/tex/latex/tools/layout.sty index 8774c9d9dd5..a80bc79e1f3 100644 --- a/Master/texmf-dist/tex/latex/tools/layout.sty +++ b/Master/texmf-dist/tex/latex/tools/layout.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/longtable.sty b/Master/texmf-dist/tex/latex/tools/longtable.sty index db3ea1e06c3..9d9ab53fda3 100644 --- a/Master/texmf-dist/tex/latex/tools/longtable.sty +++ b/Master/texmf-dist/tex/latex/tools/longtable.sty @@ -12,7 +12,7 @@ %% reports for it can be opened at https://latex-project.org/bugs/ %% (but please observe conditions on bug reports sent to that address!) %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/multicol.sty b/Master/texmf-dist/tex/latex/tools/multicol.sty index 1041c6b0c5e..4b97a784f51 100644 --- a/Master/texmf-dist/tex/latex/tools/multicol.sty +++ b/Master/texmf-dist/tex/latex/tools/multicol.sty @@ -12,7 +12,7 @@ %% reports for it can be opened at https://latex-project.org/bugs/ %% (but please observe conditions on bug reports sent to that address!) %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -35,7 +35,7 @@ %% given in the file `manifest.txt'. %% %% Package `multicol' to use with LaTeX2e -%% Copyright 1989-2019 Frank Mittelbach +%% Copyright 1989-2023 Frank Mittelbach %% %% In addition to the terms of LPPL any distributed version %% (unchanged or modified) of multicol has to keep the statement @@ -108,7 +108,7 @@ \DeclareCurrentRelease{}{2021-11-15} \ProvidesPackage{multicol} - [2021/11/30 v1.9d multicolumn formatting (FMi)] + [2023/03/30 v1.9f multicolumn formatting (FMi)] %% \DeclareOption{twocolumn} {\PackageWarning{multicol}{May not work @@ -319,11 +319,13 @@ \kept@firstmark \return@nonemptymark{bot}% \kept@botmark - \page@sofar - \global\let\kept@firstmark - \l@kept@firstmark - \global\let\kept@botmark - \l@kept@botmark + \global\setbox\mc@boxedresult\vbox{% + \page@sofar + \global\let\kept@firstmark + \l@kept@firstmark + \global\let\kept@botmark + \l@kept@botmark + }% \mult@info\tw@ {Restore kept marks to\MessageBreak first: \meaning\kept@firstmark @@ -349,6 +351,7 @@ \endgroup \global\c@unbalance\z@ \if@boxedmulticols + \unvbox\mc@boxedresult \mc@col@status@write \else \reinsert@footnotes @@ -378,6 +381,7 @@ \newskip\multicolbaselineskip \newbox\partial@page \newbox\last@line +\newbox\mc@boxedresult \c@unbalance = 0 \c@collectmore = 0 \multicoltolerance = 9999 @@ -411,11 +415,11 @@ }% \ifvmode\else\errmessage{Multicol Error}\fi \nointerlineskip - \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@ + \setbox\z@\hbox{\multicolmindepthstring}\global\dimen\tw@\dp\z@ \moveright\multicol@leftmargin \hbox to\full@width{% \mc@align@columns - \rlap{\phantom p}% + \rlap{\phantom \multicolmindepthstring}% }% \prevdepth\z@ \kern-\dimen\tw@ @@ -425,6 +429,7 @@ Grid alignment might be broken}% \fi } +\def\multicolmindepthstring{p} \def\columnseprulecolor{\normalcolor} \def\reinsert@footnotes{\ifvoid\footins\else \insert\footins{}\fi} diff --git a/Master/texmf-dist/tex/latex/tools/q.tex b/Master/texmf-dist/tex/latex/tools/q.tex index af7c3a94cc7..6b478940cee 100644 --- a/Master/texmf-dist/tex/latex/tools/q.tex +++ b/Master/texmf-dist/tex/latex/tools/q.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/r.tex b/Master/texmf-dist/tex/latex/tools/r.tex index 8a040f2b163..cda1fb1951a 100644 --- a/Master/texmf-dist/tex/latex/tools/r.tex +++ b/Master/texmf-dist/tex/latex/tools/r.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/rawfonts.sty b/Master/texmf-dist/tex/latex/tools/rawfonts.sty index 2710569c05d..e0ae4dadd37 100644 --- a/Master/texmf-dist/tex/latex/tools/rawfonts.sty +++ b/Master/texmf-dist/tex/latex/tools/rawfonts.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/s.tex b/Master/texmf-dist/tex/latex/tools/s.tex index f833f3d49fd..30f05c6a854 100644 --- a/Master/texmf-dist/tex/latex/tools/s.tex +++ b/Master/texmf-dist/tex/latex/tools/s.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/shellesc.sty b/Master/texmf-dist/tex/latex/tools/shellesc.sty index 620bbc2fbd4..dfea3222973 100644 --- a/Master/texmf-dist/tex/latex/tools/shellesc.sty +++ b/Master/texmf-dist/tex/latex/tools/shellesc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -36,7 +36,7 @@ %% given in the file `manifest.txt'. %% %% Source File: shellesc.dtx -%% Copyright (C) 2015-2022 +%% Copyright (C) 2015-2023 %% %% The LaTeX Project and any individual authors listed elsewhere %% in this file. @@ -49,7 +49,7 @@ \ifx\PackageWarning\undefined\def\PackageWarning#1#2{\wlog{#1: #2}}\fi \expandafter\next\fi \ProvidesPackage{shellesc} - [2019/11/08 v1.0c unified shell escape interface for LaTeX] + [2023/04/15 v1.0d unified shell escape interface for LaTeX] \chardef\shellesc@quotecat\catcode`\" \chardef\shellesc@underscorecat\catcode`\_ \@makeother\" @@ -92,15 +92,15 @@ local status, msg = os.execute("\luaescapestring{#1}")% if status == nil then texio.write_nl("log",% "runsystem(" .. "\luaescapestring{#1}"% - .. ")...(" .. msg .. ")\string\n") + .. ")...(" .. msg .. ").\string\n") elseif status == 0 then texio.write_nl("log",% "runsystem(" .. "\luaescapestring{#1}"% - .. ")...executed\string\n") + .. ")...executed.\string\n") else texio.write_nl("log",% "runsystem(" .. "\luaescapestring{#1}"% - .. ")...failed " .. (msg or "") .. "\string\n") + .. ")...failed. " .. (msg or "") .. "\string\n") end }} \fi diff --git a/Master/texmf-dist/tex/latex/tools/showkeys.sty b/Master/texmf-dist/tex/latex/tools/showkeys.sty index 5accb46049a..236b135311b 100644 --- a/Master/texmf-dist/tex/latex/tools/showkeys.sty +++ b/Master/texmf-dist/tex/latex/tools/showkeys.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -46,7 +46,7 @@ \DeclareCurrentRelease{}{2022-06-01} \ProvidesPackage{showkeys} - [2022/04/12 v3.18 Show cite and label keys (DPC, MH)] + [2023/05/11 v3.19 Show cite and label keys (DPC, MH)] \DeclareOption{notref}{\let\SK@ref\@empty} \DeclareOption{notcite}{\let\SK@cite\@empty} \let\SK@refcolor\relax @@ -65,13 +65,15 @@ \let\SK@label\label \let\SK@bibitem\@bibitem \let\SK@lbibitem\@lbibitem -\def\label#1{% +\@ifl@t@r\fmtversion{2023-06-01} + {\AddToHookWithArguments{label}{\SK@\SK@@label{#1}}} + {\def\label#1{% \@bsphack \SK@\SK@@label{#1}% \begingroup \SK@label{#1}% \endgroup - \@esphack} + \@esphack}} \def\@bibitem#1{% \SK@bibitem{#1}\SK@\SK@@label{#1}\ignorespaces} \def\@lbibitem[#1]#2{% diff --git a/Master/texmf-dist/tex/latex/tools/somedefs.sty b/Master/texmf-dist/tex/latex/tools/somedefs.sty index 99bfe97ff38..d50478a051a 100644 --- a/Master/texmf-dist/tex/latex/tools/somedefs.sty +++ b/Master/texmf-dist/tex/latex/tools/somedefs.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/tabularx.sty b/Master/texmf-dist/tex/latex/tools/tabularx.sty index 19d970bb4b4..a084ff17cd4 100644 --- a/Master/texmf-dist/tex/latex/tools/tabularx.sty +++ b/Master/texmf-dist/tex/latex/tools/tabularx.sty @@ -12,7 +12,7 @@ %% reports for it can be opened at https://latex-project.org/bugs/ %% (but please observe conditions on bug reports sent to that address!) %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/thb.sty b/Master/texmf-dist/tex/latex/tools/thb.sty index 193bbd07f9f..56deb3cd976 100644 --- a/Master/texmf-dist/tex/latex/tools/thb.sty +++ b/Master/texmf-dist/tex/latex/tools/thb.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/thc.sty b/Master/texmf-dist/tex/latex/tools/thc.sty index a16e28d9123..79d85c49184 100644 --- a/Master/texmf-dist/tex/latex/tools/thc.sty +++ b/Master/texmf-dist/tex/latex/tools/thc.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/thcb.sty b/Master/texmf-dist/tex/latex/tools/thcb.sty index 3378c38fc03..39be6ed45a1 100644 --- a/Master/texmf-dist/tex/latex/tools/thcb.sty +++ b/Master/texmf-dist/tex/latex/tools/thcb.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/theorem.sty b/Master/texmf-dist/tex/latex/tools/theorem.sty index 743e3caa6d5..4304eff280e 100644 --- a/Master/texmf-dist/tex/latex/tools/theorem.sty +++ b/Master/texmf-dist/tex/latex/tools/theorem.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/thm.sty b/Master/texmf-dist/tex/latex/tools/thm.sty index 64d138479fc..f62e6b65c07 100644 --- a/Master/texmf-dist/tex/latex/tools/thm.sty +++ b/Master/texmf-dist/tex/latex/tools/thm.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/thmb.sty b/Master/texmf-dist/tex/latex/tools/thmb.sty index 00934d550de..167aaafe080 100644 --- a/Master/texmf-dist/tex/latex/tools/thmb.sty +++ b/Master/texmf-dist/tex/latex/tools/thmb.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/thp.sty b/Master/texmf-dist/tex/latex/tools/thp.sty index 7e9960bf086..ce803310b70 100644 --- a/Master/texmf-dist/tex/latex/tools/thp.sty +++ b/Master/texmf-dist/tex/latex/tools/thp.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/trace.sty b/Master/texmf-dist/tex/latex/tools/trace.sty index b63e51ba6d7..659039e7fee 100644 --- a/Master/texmf-dist/tex/latex/tools/trace.sty +++ b/Master/texmf-dist/tex/latex/tools/trace.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/varioref.sty b/Master/texmf-dist/tex/latex/tools/varioref.sty index 4e71fa1da50..5cf0a91c5ac 100644 --- a/Master/texmf-dist/tex/latex/tools/varioref.sty +++ b/Master/texmf-dist/tex/latex/tools/varioref.sty @@ -12,7 +12,7 @@ %% reports for it can be opened at https://latex-project.org/bugs/ %% (but please observe conditions on bug reports sent to that address!) %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/verbatim.sty b/Master/texmf-dist/tex/latex/tools/verbatim.sty index 48d13747019..79defc23c06 100644 --- a/Master/texmf-dist/tex/latex/tools/verbatim.sty +++ b/Master/texmf-dist/tex/latex/tools/verbatim.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/verbtest.tex b/Master/texmf-dist/tex/latex/tools/verbtest.tex index a578afeb34b..2bd3f6141fa 100644 --- a/Master/texmf-dist/tex/latex/tools/verbtest.tex +++ b/Master/texmf-dist/tex/latex/tools/verbtest.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/x.tex b/Master/texmf-dist/tex/latex/tools/x.tex index 3c4c1aeafcf..1e903a79953 100644 --- a/Master/texmf-dist/tex/latex/tools/x.tex +++ b/Master/texmf-dist/tex/latex/tools/x.tex @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/xr.sty b/Master/texmf-dist/tex/latex/tools/xr.sty index 37b7e019e96..8304f2ff866 100644 --- a/Master/texmf-dist/tex/latex/tools/xr.sty +++ b/Master/texmf-dist/tex/latex/tools/xr.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% diff --git a/Master/texmf-dist/tex/latex/tools/xspace.sty b/Master/texmf-dist/tex/latex/tools/xspace.sty index e9b9d20848f..e95d6a1b698 100644 --- a/Master/texmf-dist/tex/latex/tools/xspace.sty +++ b/Master/texmf-dist/tex/latex/tools/xspace.sty @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2022 +%% Copyright (C) 1993-2023 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% -- cgit v1.2.3