summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-23 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2024-01-23 03:00:53 +0000
commit208ecf90e1d5a239ff2a8cd506c077d194d348c0 (patch)
treee505248dddbb616aa6190340ab46f5f8b4b55803 /macros/latex
parent3bb554642b743cd7ca7aef2b3668604343bfe708 (diff)
CTAN sync 202401230300
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/acmart/README4
-rw-r--r--macros/latex/contrib/acmart/acm-jdslogo.pngbin19718 -> 0 bytes
-rw-r--r--macros/latex/contrib/acmart/acmart-changes.tex117
-rw-r--r--macros/latex/contrib/acmart/acmart-data.md114
-rw-r--r--macros/latex/contrib/acmart/acmart-ori.tex40
-rw-r--r--macros/latex/contrib/acmart/acmart.dtx25
-rw-r--r--macros/latex/contrib/acmart/acmart.pdfbin941096 -> 910813 bytes
-rw-r--r--macros/latex/contrib/acmart/acmguide.pdfbin438260 -> 438260 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmcp.pdfbin215120 -> 215115 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmengage.pdfbin400687 -> 400687 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmlarge.pdfbin611834 -> 611834 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdfbin634465 -> 634465 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdfbin1055841 -> 1056095 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdfbin624275 -> 624275 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmsmall.pdfbin621763 -> 621763 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-acmtog.pdfbin569338 -> 569338 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-authordraft.pdfbin1048884 -> 1048890 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-lualatex.pdfbin788111 -> 788111 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-manuscript.pdfbin624132 -> 624452 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdfbin621461 -> 621337 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdfbin1060387 -> 1060387 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigconf.pdfbin1045103 -> 1045103 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-sigplan.pdfbin1053568 -> 1053568 bytes
-rw-r--r--macros/latex/contrib/acmart/samples/sample-xelatex.pdfbin659287 -> 659284 bytes
-rw-r--r--macros/latex/contrib/fancyvrb/Changes2
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdfbin170570 -> 172333 bytes
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex13
-rw-r--r--macros/latex/contrib/fancyvrb/latex/fancyvrb-ex.sty2
-rw-r--r--macros/latex/contrib/fancyvrb/latex/fancyvrb.sty6
-rw-r--r--macros/latex/contrib/frenchmath/frenchmath.dtx77
-rw-r--r--macros/latex/contrib/frenchmath/frenchmath.ins4
-rw-r--r--macros/latex/contrib/frenchmath/frenchmath.pdfbin552642 -> 577443 bytes
-rw-r--r--macros/latex/contrib/l3kernel/CHANGELOG.md16
-rw-r--r--macros/latex/contrib/l3kernel/README.md2
-rw-r--r--macros/latex/contrib/l3kernel/expl3.dtx30
-rw-r--r--macros/latex/contrib/l3kernel/expl3.pdfbin623018 -> 623299 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.pdfbin1776647 -> 1776513 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3.ins1
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx9
-rw-r--r--macros/latex/contrib/l3kernel/l3bitset.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3bootstrap.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3box.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3candidates.dtx150
-rw-r--r--macros/latex/contrib/l3kernel/l3cctab.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3clist.dtx54
-rw-r--r--macros/latex/contrib/l3kernel/l3coffins.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3color.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3debug.dtx75
-rw-r--r--macros/latex/contrib/l3kernel/l3deprecation.dtx260
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.dtx50
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.pdfbin563777 -> 564281 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.pdfbin150985 -> 150985 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3file.dtx34
-rw-r--r--macros/latex/contrib/l3kernel/l3flag.dtx316
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-assign.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-aux.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-functions.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-logic.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-parse.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-random.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-round.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-symbolic.dtx12
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-traps.dtx30
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-trig.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-types.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3fp.dtx18
-rw-r--r--macros/latex/contrib/l3kernel/l3fparray.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3int.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3intarray.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3kernel-functions.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3keys.dtx161
-rw-r--r--macros/latex/contrib/l3kernel/l3legacy.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3luatex.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3msg.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3names.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3news.pdfbin396222 -> 396222 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news01.pdfbin122959 -> 122959 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news02.pdfbin150919 -> 150919 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news03.pdfbin148747 -> 148747 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news04.pdfbin114754 -> 114754 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news05.pdfbin112524 -> 112524 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news06.pdfbin151591 -> 151591 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news07.pdfbin128344 -> 128344 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news08.pdfbin163484 -> 163484 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news09.pdfbin250159 -> 250159 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news10.pdfbin150302 -> 150302 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news11.pdfbin170102 -> 170102 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news12.pdfbin205020 -> 205020 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3pdf.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.pdfbin82696 -> 82696 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prg.dtx11
-rw-r--r--macros/latex/contrib/l3kernel/l3prop.dtx14
-rw-r--r--macros/latex/contrib/l3kernel/l3quark.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3regex.dtx545
-rw-r--r--macros/latex/contrib/l3kernel/l3seq.dtx114
-rw-r--r--macros/latex/contrib/l3kernel/l3skip.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3sort.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3str-convert.dtx250
-rw-r--r--macros/latex/contrib/l3kernel/l3str.dtx24
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.pdfbin296516 -> 296657 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.pdfbin243162 -> 242421 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.tex4
-rw-r--r--macros/latex/contrib/l3kernel/l3sys.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.pdfbin218315 -> 218315 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3text-case.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-map.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3text.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/l3tl-analysis.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3tl-build.dtx16
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx141
-rw-r--r--macros/latex/contrib/l3kernel/l3token.dtx4
-rw-r--r--macros/latex/contrib/l3kernel/l3unicode.dtx2
-rw-r--r--macros/latex/contrib/l3kernel/source3.pdfbin7514579 -> 7488727 bytes
-rw-r--r--macros/latex/contrib/l3kernel/source3body.tex8
-rw-r--r--macros/latex/contrib/mcmthesis/figures/qrcodewechat.jpgbin0 -> 9444 bytes
-rw-r--r--macros/latex/contrib/mcmthesis/mcmthesis-demo.pdfbin176282 -> 157436 bytes
-rw-r--r--macros/latex/contrib/mcmthesis/mcmthesis.dtx270
-rw-r--r--macros/latex/contrib/mcmthesis/mcmthesis.pdfbin208261 -> 288643 bytes
-rw-r--r--macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdfbin9752363 -> 9742827 bytes
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCBonbon.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex16
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex88
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCompteBon.tex10
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCConversion.tex6
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCCritere.tex5
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex22
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex1
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFactorisation.tex13
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex1
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCGaram.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCKakuro.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCKenKen.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCLego.tex1
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMulJap.tex1
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex2
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCReperage.tex3
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex5
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex56
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRondeInfernaleold.tex474
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCRose.tex40
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCSerpent.tex9
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCStatistiques.tex20
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCThales.tex4
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty8
154 files changed, 2127 insertions, 1812 deletions
diff --git a/macros/latex/contrib/acmart/README b/macros/latex/contrib/acmart/README
index e6e3e8cbca..422452e721 100644
--- a/macros/latex/contrib/acmart/README
+++ b/macros/latex/contrib/acmart/README
@@ -12,6 +12,10 @@ The production version is the one on CTAN and ACM sites.
Changes
+Version 2.02. Documentation update.
+ Changes in TOG templates
+ Corrected typo in ACM/IMS journals
+
Version 2.01 \acmPrice now produces a warning.
Version 2.00 ACM switches to electronic only version.
diff --git a/macros/latex/contrib/acmart/acm-jdslogo.png b/macros/latex/contrib/acmart/acm-jdslogo.png
deleted file mode 100644
index 9772aed929..0000000000
--- a/macros/latex/contrib/acmart/acm-jdslogo.png
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/acmart/acmart-changes.tex b/macros/latex/contrib/acmart/acmart-changes.tex
deleted file mode 100644
index 4531b79533..0000000000
--- a/macros/latex/contrib/acmart/acmart-changes.tex
+++ /dev/null
@@ -1,117 +0,0 @@
-% !Mode:: "TeX:UTF-8:Main"
-% !Mode:: "TeX:UTF-8:Main"
-\DocumentMetadata{testphase={phase-III,firstaid}}
-
-% # store and restore section command:
-\makeatletter
-\let\ori@startsection\@startsection
-\let\ori@xsect\@xsect
-\let\ori@sect\@sect
-\let\ori@ssect\@ssect
-\documentclass[]{acmart}
-\let\@startsection\ori@startsection %acmart definition is like kernel, so tagging version should be ok
-\let\@xsect\ori@xsect %acmart definition is like kernel, so tagging version should be ok
-% everyone patches \@sect and @ssect, here we should change the internal nameref version ;-(
-\let\NR@ssect\ori@ssect %acmart definition is like kernel, so tagging version should be ok
-\let\NR@sect\ori@sect %TODO: must be checked! acmart definition is slightly different.
-
-
-% part is level 9??? It must be checked if this confuse the new tagging code.
-\renewcommand\part{\@startsection{part}{9}{\z@}%
- {-10\p@ \@plus -4\p@ \@minus -2\p@}%
- {4\p@}%
- {\ACM@NRadjust\@parfont}}
-\def\toclevel@part{9} %???
-
-% # tableofcontents. Insert hooks into \tocline (I hope arguments + placement are correct)
-\def\@tocline#1#2#3#4#5#6#7{\relax
- \ifnum #1>\c@tocdepth % then omit
- \else
- \par \addpenalty\@secpenalty\addvspace{#2}%
- \begingroup \hyphenpenalty\@M
- \@ifempty{#4}{%
- \@tempdima\csname r@tocindent\number#1\endcsname\relax
- }{%
- \@tempdima#4\relax
- }%
- \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
- \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth
- #5\leavevmode\hskip-\@tempdima
- \UseHookWithArguments{contentsline/text/before}{4}{#1}{#6}{#7}{\@contentsline@destination}%NEW
- #6%
- \UseHookWithArguments{contentsline/text/after}{4}{#1}{#6}{#7}{\@contentsline@destination}%NEW
- \nobreak\relax
- \hfil\hbox to\@pnumwidth{%
- \UseHookWithArguments{contentsline/page/before}{4}{#1}{#6}{#7}{\@contentsline@destination}%NEW
- \@tocpagenum{#7}
- \UseHookWithArguments{contentsline/page/after}{4}{#1}{#6}{#7}{\@contentsline@destination}%NEW
- }\par
- \nobreak
- \endgroup
- \fi}
-% add config points to starttoc
-% TODO: extend kernel version so that acmart no longer has to redefine it.
-\def\@starttoc#1#2{\begingroup\makeatletter
- \setTrue{#1}%
- \par\removelastskip\vskip\z@skip
- \@startsection{section}\@M\z@{\linespacing\@plus\linespacing}%
- {.5\linespacing}{\centering\contentsnamefont}{#2}%
- \@starttoc@cfgpoint@before{#1}%NEW<<<<<<<<<< (name will change)
- \@input{\jobname.#1}%
- \@starttoc@cfgpoint@after{#1}%NEW<<<<<<<<<<<< (name will change)
- \if@filesw
- \@xp\newwrite\csname tf@#1\endcsname
- \immediate\@xp\openout\csname tf@#1\endcsname \jobname.#1\relax
- \fi
- \global\@nobreakfalse \endgroup
- \addvspace{32\p@\@plus14\p@}%
-}
-
-
-
-% # maketitle is much too complex, so we stop all tagging for now
-\ExplSyntaxOn
-\AddToHook{cmd/maketitle/before}
- {\tagstructbegin{tag=Title}\tagmcbegin{} \tag_stop:}
-\AddToHook{cmd/maketitle/after}
- {\tag_start:\tagmcend\tagstructend }
-\ExplSyntaxOff
-
-% # TODO
-% \endminipage must be restored (acmart wants to remove the footnoterule.)
-% \@footnotetext is changed, but no in all variants
-
-\title{title}
-
-\usepackage{blindtext}
-
-\begin{document}
-
-\maketitle
-
-\tableofcontents
-
-\section{section}
-\subsection{sub}
-\subsubsection{subsub}
-
-\paragraph{paragraph} some text\footnote{xxxx}
-
-\subsection{sub}
-\subsubsection{subsub}
-
-\paragraph{paragraph} some text
-
-\begin{figure}
-a figure
-\caption{test caption figure}
-\end{figure}
-
-\begin{table}
-a table
-\caption{test caption table}
-\end{table}
-
-\blinddocument
-
-\end{document}
diff --git a/macros/latex/contrib/acmart/acmart-data.md b/macros/latex/contrib/acmart/acmart-data.md
deleted file mode 100644
index 7e7a5437c9..0000000000
--- a/macros/latex/contrib/acmart/acmart-data.md
+++ /dev/null
@@ -1,114 +0,0 @@
-## acmart.cls
-
-* class to typeset articles for the Association
- for Computing Machinery
-* around 3500 lines of code
-* bases on amsart.cls
-* support various journal styles
-
-## Packages
-
-* xkeyval: probably harmless
-* xstring: probably harmless
-* iftex: probably harmless
-* amsart.cls: ** must be checked**
-* amsmath: good
-* microtype: can be problematic, if needed disable patches
-* etoolbox: probably harmless
-* booktabs: table tagging is uncomplete anyway
-* refcount: probably harmless
-* ltxcmds: probably harmless
-* infwarerr: probably harmless
-* totpages: **?, should be checked**
-* everyshi: harmless (now wrapper to kernel hook)
-* environ: **probably harmless, but use should be checked**
-* trimspaces: probably harmless
-* setspace: probably harmless
-* textcase: harmless but unneeded in current latex
-* natbib: handled in latex-lab-bib
-* hyperxmp: **incompatible, but doesn't harm as it is ignored. It must be checked if XMP-data are missing**
-* kvoptions
-* various internal hyperref packages: hopefully all harmless
-* hyperref: explicitly handled by the latex-lab code
-* nameref: explicitly handled by the latex-lab code
-* graphicx: handled by the latex-lab code
-* (x)color: probably harmless
-* geometry: probably harmless
-* manyfoot: **must be checked, could affect footnote tagging**
-* nccfoots: **must be checked, could affect footnote tagging**
-* font packages: probably harmless (but math packages can affect later math tagging)
-* caption: **must be checked as latex-lab-floats redefines caption commands.**
-* float: **must be checked as latex-lab-floats redefines floats. Handling of H is unclear.**
-* comment: probably harmless
-* fancyhdr: **should work, but if must be checked if there is meaningful content in the header/footer as by default there are artifact**.
-* upquote: probably harmless
-
-Some packages are only loaded sometimes, e.g.
-
-* framed: probably problematic
-
-
-With lualatex result is similar, but probably unicode-math should be loaded.
-
-## Redefinitions of main LaTeX commands
-
-### sectioning
-
-* `\@startsection`: acmart definition is like kernel definition. Using new tagging definition should be fine.
-* `\@sect`: acmart definition slightly different. Reason must be checked.
-* `\@xsect`: acmart definition is like kernel definition. Using new tagging definition should be fine.
-* `\@seccntformat`: not changed by tagging code, so probably fine
-* `\@ssect`: acmart definition is like kernel definition. Using new tagging definition should be fine.
-* `\section` etc defined with `\@startsection`: OK
-* `\part` defined as level 9 command?? Does the tagging code handles that or gets it confused??
-
-### toc
-
-* `\@starttoc`: must be adjusted to the tagging code
-* `\l@section`, `\l@subsection`, `\l@subsubsection`: they use `\@tocline` (amsart), so that must be changed similar to `\@dottedtocline`
-
-
-### footnotes
-
-It must be checked if this harms!
-
-* `\@makefntext`
-* `\@footnotetext` (sometimes)
-* `\@mpfootnotetext`
-* `\@makefnmark`
-* `\footnoterule`
-
-### floats
-
-Must be checked.
-
-* `\@dblfloat`, `\end@dblfloat` sometimes
-
-### lists
-
-* `\@listI` etc
-* description
-
-
-### title
-
-lots of complicated box combinations
-
-* `\author`
-* `\maketitle`
-* `abstract`
-
-### other
-
-
-* `\endminipage`: will probably break minipage tagging.
-* `\theindex`
-
-
-## New commands and environments
-
-All their tagging must be checked!!
-
-*
-*
-*
diff --git a/macros/latex/contrib/acmart/acmart-ori.tex b/macros/latex/contrib/acmart/acmart-ori.tex
deleted file mode 100644
index aeecb28701..0000000000
--- a/macros/latex/contrib/acmart/acmart-ori.tex
+++ /dev/null
@@ -1,40 +0,0 @@
-% !Mode:: "TeX:UTF-8:Main"
-% !Mode:: "TeX:UTF-8:Main"
-\DocumentMetadata{testphase={phase-III,firstaid},pdfversion=2.0}
-
-\documentclass[]{acmart}
-
-\title{title}
-
-\usepackage{blindtext}
-
-\begin{document}
-
-\maketitle
-
-\tableofcontents
-
-\section{section}
-\subsection{sub}
-\subsubsection{subsub}
-
-\paragraph{paragraph} some text\footnote{xxxx}
-
-\subsection{sub}
-\subsubsection{subsub}
-
-\paragraph{paragraph} some text
-
-\begin{figure}
-a figure
-\caption{test caption figure}
-\end{figure}
-
-\begin{table}
-a table
-\caption{test caption table}
-\end{table}
-
-\blinddocument
-
-\end{document}
diff --git a/macros/latex/contrib/acmart/acmart.dtx b/macros/latex/contrib/acmart/acmart.dtx
index d20064d6b7..666e8d95b8 100644
--- a/macros/latex/contrib/acmart/acmart.dtx
+++ b/macros/latex/contrib/acmart/acmart.dtx
@@ -306,16 +306,16 @@
% acmsmall & Small single-column format. Used for ACMJCSS, CIE, CSUR,
% DLT, FAC, GAMES, JACM, JATS, JDIQ, JDS, JEA, JERIC,
% JETC, JRC, PACMCGIT, PACMHCI, PACMMOD, PACMNET,
-% PACMPL, PACMSE, TAAS, TACCESS, TACO,
+% PACMPL, PACMSE, POMACS, TAAS, TACCESS, TACO,
% TALG, TALLIP (formerly TALIP), TCPS, TDS,
% TEAC, TECS, TELO, THRI, TIIS, TIOT, TISSEC, TIST, TKDD, TMIS,
% TOCE, TOCHI, TOCL,
% TOCS, TOCT, TODAES, TODS, TOIS, TOIT, TOMACS, TOMM (formerly
% TOMCCAP), TOMPECS, TOMS, TOPC, TOPLAS, TOPML, TOPS, TORS
% TOS, TOSEM, TOSN, TQC, TRETS,
-% TSAS, TSC, TSLP and TWEB, including special issues. \\
+% TSAS, TSC, TSLP, and TWEB, including special issues. \\
% acmlarge & Large single-column format. Used for DTRAP, HEALTH,
-% IMWUT, JOCCH, POMACS and TAP, including special issues. \\
+% IMWUT, JOCCH, and TAP, including special issues. \\
% acmtog & Large double-column format. Used for
% TOG, including annual conference Technical Papers.\\
% sigconf & Proceedings format for most ACM
@@ -2266,7 +2266,7 @@
\ProvidesFile{acmart.dtx}
%</gobble>
%<class>\ProvidesClass{acmart}
-[2023/12/29 v2.01 Typesetting articles for the Association for Computing Machinery]
+[2024/01/21 v2.02 Typesetting articles for the Association for Computing Machinery]
% \end{macrocode}
%
% \changes{v1.00}{2016/04/14}{First released version}
@@ -2381,6 +2381,7 @@
% \changes{1.92}{2023/09/30}{Documentation update: use of `anonymous'
% throughout}
% \changes{v1.93}{2023/10/22}{Added PACMSE journal option}
+% \changes{v2.01}{2024/01/06}{Documentation update: POMACS uses acmsmall}
%
% And the driver code:
% \begin{macrocode}
@@ -4467,7 +4468,7 @@
\def\@journalNameShort{ACM J. Data Inform. Quality}%
\def\@permissionCodeOne{1936-1955}%
\or % JDS
- \def\@journalName{ACM/JMS Journal of Data Science}%
+ \def\@journalName{ACM/IMS Journal of Data Science}%
\def\@journalNameShort{ACM/IMS J. Data Sci.}%
\def\@permissionCodeOne{2831-3194}%
\def\@permissionCodeTwo{2831-3194}%
@@ -4750,6 +4751,8 @@
%
% \begin{macro}{\acmConference}
% \changes{v1.59}{2019/04/20}{Setting \cs{@ACM@journal@bibstrip}}
+% \changes{v2.02}{2024/01/06}{Moved here setting the conference title
+% for bibstrip}
% This is the conference command
% \begin{macrocode}
\newcommand\acmConference[4][]{%
@@ -4761,6 +4764,11 @@
\gdef\acmConference@shortname{#2}%
\fi
\global\@ACM@journal@bibstripfalse
+ \ifx\@acmBooktitle\@empty\relax
+ \acmBooktitle{Proceedings of \acmConference@name
+ \ifx\acmConference@name\acmConference@shortname\else
+ \ (\acmConference@shortname)\fi}%
+ \fi
}
\if@ACM@journal\else
\acmConference[Conference'17]{ACM Conference}{July 2017}{Washington,
@@ -4772,17 +4780,14 @@
%
% \begin{macro}{\acmBooktitle}
% \changes{v1.44}{2017/08/11}{Added macro}
+% \changes{v2.01}{2024/01/06}{Moved default conference title to
+% conference setting}
% \begin{macro}{\@acmBooktitle}
% \changes{v1.44}{2017/08/11}{Added macro}
% The book title of the conference:
% \begin{macrocode}
\def\acmBooktitle#1{\gdef\@acmBooktitle{#1}}
\acmBooktitle{}
-\ifx\acmConference@name\@undefined\else
-\acmBooktitle{Proceedings of \acmConference@name
- \ifx\acmConference@name\acmConference@shortname\else
- \ (\acmConference@shortname)\fi}
-\fi
% \end{macrocode}
%
% \end{macro}
diff --git a/macros/latex/contrib/acmart/acmart.pdf b/macros/latex/contrib/acmart/acmart.pdf
index 883a93e433..99124a2a6a 100644
--- a/macros/latex/contrib/acmart/acmart.pdf
+++ b/macros/latex/contrib/acmart/acmart.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/acmguide.pdf b/macros/latex/contrib/acmart/acmguide.pdf
index e721714333..33113f01f3 100644
--- a/macros/latex/contrib/acmart/acmguide.pdf
+++ b/macros/latex/contrib/acmart/acmguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf
index 9ad5e4d25a..9c8a2cd43f 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmcp.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmcp.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf
index 4ab1f05a07..f08de8857a 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmengage.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmengage.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
index b696cd8a5a..126257d291 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmlarge.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf
index 10d530f2a9..217d96569a 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-biblatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
index 9464e1934d..eefdee4e1d 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-conf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
index 66f8d534f9..d603f78523 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall-submission.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
index 5ea73019c6..8135247e54 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmsmall.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
index 0498ab6f6d..e9cd9155b1 100644
--- a/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-acmtog.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-authordraft.pdf b/macros/latex/contrib/acmart/samples/sample-authordraft.pdf
index ab45490859..754a97abf6 100644
--- a/macros/latex/contrib/acmart/samples/sample-authordraft.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-authordraft.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-lualatex.pdf b/macros/latex/contrib/acmart/samples/sample-lualatex.pdf
index 753ef18486..7e9c1dfa83 100644
--- a/macros/latex/contrib/acmart/samples/sample-lualatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-lualatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
index 152285569b..dd208add05 100644
--- a/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-manuscript.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf
index d065c3d548..e807837656 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf-biblatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf
index 69cb91907d..90b194e2af 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf-i13n.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
index c187371caa..0d3a653a5d 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigconf.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
index 51948655a3..0863941f81 100644
--- a/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-sigplan.pdf
Binary files differ
diff --git a/macros/latex/contrib/acmart/samples/sample-xelatex.pdf b/macros/latex/contrib/acmart/samples/sample-xelatex.pdf
index b2542da59e..222152317a 100644
--- a/macros/latex/contrib/acmart/samples/sample-xelatex.pdf
+++ b/macros/latex/contrib/acmart/samples/sample-xelatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/fancyvrb/Changes b/macros/latex/contrib/fancyvrb/Changes
index 123927ae33..0c90c3ba98 100644
--- a/macros/latex/contrib/fancyvrb/Changes
+++ b/macros/latex/contrib/fancyvrb/Changes
@@ -1,4 +1,6 @@
--- fancyvrb.sty
+4.5c 2024/01/20 - added info to the documentation for \Verb*
+ and \VerbatimInput*
4.5b 2023/11/06 - added info to the documentation for
the different behaviour in the \LaTeX kernel (hv)
4.5a 2023/01/19 - modified documentation (hv)
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
index 321082c642..655018d2df 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
index 7f7985d8ac..87fae37cfc 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
@@ -777,7 +777,7 @@ Verbatim line .
\end{Verbatim}
\end{SideBySideExample}
- In practice, all verbatim environments have a~\texttt{*} variant, which
+ In practice, all verbatim environments, \Verb|\VerbatimInput|, and \Verb/\Verb/ have a~\texttt{*} variant, which
sets \texttt{showspaces=true}:
\begin{SideBySideExample}[gobble=0]
@@ -786,6 +786,17 @@ Verbatim line .
\end{Verbatim*}
\end{SideBySideExample}
+\begin{SideBySideExample}[gobble=0]
+\begin{filecontents}
+ [noheader,force]{foo.txt}
+foo bar baz
+\end{filecontents}
+\Verb|Verbatim with tab .|
+\Verb*|Verbatim with tab .|
+
+\VerbatimInput*{foo.txt}
+\end{SideBySideExample}
+
There are also some parameters to determine the way tab characters are
interpreted (using tabs is in fact a rather old-fashioned style of coding):
diff --git a/macros/latex/contrib/fancyvrb/latex/fancyvrb-ex.sty b/macros/latex/contrib/fancyvrb/latex/fancyvrb-ex.sty
index 72c4d535d3..8ea1c96ade 100644
--- a/macros/latex/contrib/fancyvrb/latex/fancyvrb-ex.sty
+++ b/macros/latex/contrib/fancyvrb/latex/fancyvrb-ex.sty
@@ -82,7 +82,7 @@
\newcommand\Below@Example[1]{%
\VerbatimInput[gobble=0,commentchar=^^a3,commandchars=^^a7^^b5^^b6,numbersep=3pt]%
{\jobname.tmp}
-\catcode`\^^a3=9\relax%
+\catcode`\^^a3=9\relax
\NoHighlight@Attributes % To suppress possible highlighting
\ifFvrbEx@Grid\vspace{5pt}\fi
#1%
diff --git a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
index b8b1d8514d..ccd423a558 100644
--- a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
+++ b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
@@ -2,7 +2,7 @@
%% This is file `fancyvrb.sty',
%%
%% COPYRIGHT 1992-1999, by Timothy Van Zandt <tvz@zandtwerk.kellogg.nwu.edu>
-%% 2000-2023 ... , by Herbert Voss <hvoss@tug.org>
+%% 2000-2024 ... , by Herbert Voss <hvoss@tug.org>
%%
%% This package may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
@@ -13,8 +13,8 @@
%% verbatim environments and commands and extensive documentation.
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{4.5b}
-\def\filedate{2023/11/06}
+\def\fileversion{4.5c}
+\def\filedate{2024/01/20}
\ProvidesPackage{fancyvrb}[\filedate\space \fileversion\space verbatim text (tvz,hv)]
%\message{Style option: `fancyvrb' v\fileversion \space <\filedate> (tvz)}
\csname fancyvrb@loaded\endcsname
diff --git a/macros/latex/contrib/frenchmath/frenchmath.dtx b/macros/latex/contrib/frenchmath/frenchmath.dtx
index 30cd225d05..4e32e81e0a 100644
--- a/macros/latex/contrib/frenchmath/frenchmath.dtx
+++ b/macros/latex/contrib/frenchmath/frenchmath.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2019-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+% Copyright (C) 2019-2024 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%
% This file may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3 of this license
@@ -20,7 +20,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{frenchmath}
- [2023/12/15 v2.7 .dtx frenchmath file]
+ [2024/01/22 v2.8 .dtx frenchmath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -30,7 +30,7 @@
\usepackage{lmodern}
\usepackage[lgrmath]{frenchmath}
\usepackage[Euler]{upgreek}
-\usepackage{textalpha}
+\usepackage{textalpha}
\usepackage{metalogo} % pour les logos XeLaTeX et LuaLaTeX
\usepackage{sectsty}
\usepackage{xcolor}
@@ -87,31 +87,31 @@
% \changes{v0.1}{27/12/2011}{Version personnelle préliminaire}
%
% \changes{v1.0}{15/01/2019}{
-% - Première version publiée, création des fichiers dtx et ins}
+% - Première version publiée, création des fichiers dtx et ins.}
%
% \changes{v1.1}{07/04/2019}{
% - Nouvelles macros pour les repères (Oij, Oijk),
-% - ajouté ensuremath dans curs}
+% - ajouté ensuremath dans curs.}
% \changes{v1.1}{15/04/2019}{
-% - Changements mineurs dans la documentation}
+% - Changements mineurs dans la documentation.}
%
% \changes{v1.2}{25/04/2019}{
% - L'option capsrm fonctionne à présent avec beamer,
-% - ajouté Ouv, modifications du fichier README.md}
+% - ajouté Ouv, modifications du fichier README.md.}
% \changes{v1.2}{27/04/2019}{
-% - capsrm -> capsup}
+% - capsrm -> capsup.}
%
% \changes{v1.3}{15/05/2019}{
% - Intégration de icomma et psset{comma=true},
-% - changements dans la documentation}
+% - changements dans la documentation.}
%
% \changes{v1.4}{2019/05/22}{
% - Changement de la définition de fonte up -> operators,
-% car incompatibilité avec l'extension unicode-math}
+% car incompatibilité avec l'extension unicode-math.}
%
% \changes{v1.5}{2020/11/02}{
% - Ajout des macros étoilées pour les repères (O;i,j) et (O;i,j,k)
-% - ajout des macros pour les bases (i,j) et (i,j,k)}
+% - ajout des macros pour les bases (i,j) et (i,j,k).}
%
% \changes{v1.6}{2022/10/16}{
% - Remplacement de icomma par ncccomma, grâce à une proposition de J. F. Burnol,
@@ -122,28 +122,28 @@
% \changes{v2.0}{2022/10/24}{
% - Nouvelle option permettant de définir les lettres grecques minuscules en forme droite,
% - correction de bug avec la commande \bslash qui n'était pas définie,
-% - compatibilité avec mathdesign}
+% - compatibilité avec mathdesign.}
%
% \changes{v2.1}{11/11/2022}{
% - Reprise du doc pour les lettres grecques, les crochets et les références ;
% - nouvelle commande paral*,
-% - '\mathop{\operatorfont th}' remplacé par '\operatorname{th}'}
+% - '\mathop{\operatorfont th}' remplacé par '\operatorname{th}'.}
%
% \changes{v2.2}{15/11/2022}{
% - Quelques changements dans la doc, police Palatino avec mathpazo,
-% - commande paral redéfinie, la commande paral* devient inutile}
+% - commande paral redéfinie, la commande paral* devient inutile.}
%
% \changes{v2.3}{16/11/2022}{
-% - Bug corrigé dans la commande Vect}
+% - Bug corrigé dans la commande Vect.}
% \changes{v2.3}{20/11/2022}{
-% - Ajout dans la doc : frenchmath doit être chargé après babel}
+% - Ajout dans la doc : frenchmath doit être chargé après babel.}
% \changes{v2.3}{19/12/2022}{
% - Suppression des warnings systématiques,
-% - utilisation de \string à la place de \bslash}
+% - utilisation de \string à la place de \bslash.}
% \changes{v2.3}{25/12/2022}{
% - Nouvelle option lgrmath,
% - utilisation de l'extension ibrackets,
-% - définition de cosec et cosech}
+% - définition de cosec et cosech.}
%
% \changes{v2.4}{22/01/2023}{
% - Option noibrackets car incompatibilité avec DeclarePairedDelimiter,
@@ -153,28 +153,31 @@
% - Mention des macros MathUp et MathIt de mismath dans la doc,
% - remplacement des ifthenelse par des if... fi,
% - simplification du code pour la mise en majuscule,
-% - chargement conditionnel de dotlessj pour mathptmx}
+% - chargement conditionnel de dotlessj pour mathptmx.}
%
% \changes{v2.6}{08/03/2023}{
-% - La macro curs ne doit et ne peut plus être utilisée en mode texte}
+% - La macro curs ne doit et ne peut plus être utilisée en mode texte.}
%
% \changes{v2.7}{06/12/2023}{
-% - Nouveau package decimalcomma pour la virgule en mode math}
+% - Nouveau package decimalcomma pour la virgule en mode math.}
% \changes{v2.7}{08/12/2023}{
-% - Changements dans la doc : lettres grecques en dernier, retour à la police lmodern}
+% - Changements dans la doc : lettres grecques en dernier, retour à la police lmodern.}
% \changes{v2.7}{12/12/2023}{
% - upgreek charge l'option Symbol et non plus Euler,
% - sauvegarde des lettres grecques d'origine avec lgrmath comme pour upgreek,
% - réécriture de l'introduction, mention de unicode-math avec XeLaTeX ou LuaLaTeX,
% - PackageWarning remplacé par PackageInfo,
-% - optimisation du code pour les majuscules avec la macro apply}
+% - optimisation du code pour les majuscules avec la macro apply.}
+%
+% \changes{v2.8}{22/01/2024}{
+% - Prise en compte de l'extension mathalpha qui fournit d'autres lettres cursives.}
%
% \GetFileInfo{frenchmath.sty}
%
% \title{L'extension \textsf{frenchmath}\thanks{Ce document
-% correspond à \textsf{frenchmath}~\fileversion, dernière modification le 23/12/2023.}}
+% correspond à \textsf{frenchmath}~\fileversion, dernière modification le 22/01/2024.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{23 décembre 2023}
+% \date{22 janvier 2024}
% \maketitle
%
% \section{Introduction}
@@ -371,12 +374,19 @@
%
% \DescribeMacro{\curs}
% Les lettres cursives ($\curs{A}, \curs{B}, \curs{C}, \curs{D}\ldots$),
-% provenant de l'extension \textsf{mathrsfs}, chargée par \textsf{frenchmath}, sont composées
-% avec |\curs| et sont différentes de celles obtenues
-% avec |\mathcal|
+% sont composées avec |\mathscr|, ou son alias |\curs|,
+% et sont différentes de celles obtenues avec |\mathcal|
% \footnote{L'extension \textsf{calrsfs} fournit les mêmes cursives mais en redéfinissant
% la commande \texttt{\string\mathcal}.}
% ($\mathcal{A}, \mathcal{B}, \mathcal{C}, \mathcal{D}\ldots$).
+% En principe \textsf{frenchmath} charge l'extension \textsf{mathrsfs}
+% qui fournit ces lettres cursives,
+% sauf si la commande |\mathscr| est déjà définie par ailleurs,
+% en particulier si on utilise l'extension \textsf{mathdesign}~\cite{DESIGN}
+% ou l'option \texttt{scr} de \textsf{mathalpha}~\cite{MATAL}
+% \footnote{L'extension \textsf{mathalpha} de Michael Sharpe
+% permet d'accéder à différentes variantes élégantes de lettres calligraphiques,
+% par exemple avec les options \texttt{scr=boondox}, \texttt{scr=rsfso} ou \texttt{scr=kp}.}.
%
% \medskip
% \DescribeMacro{\infeg} \DescribeMacro{\supeg}
@@ -455,7 +465,6 @@
% et produit \th ;
% elle a été redéfinie, uniquement pour le mode mathématique.}.
%
-% \enlargethispage{1ex}
% \medskip
% \DescribeMacro{\cosec} \DescribeMacro{\cosech}
% La fonction cosécante (inverse du sinus) s'obtient avec la macro |\csc|, mais en français,
@@ -645,8 +654,8 @@
is loaded, \MessageBreak
I don't load mathrsfs and amssymb packages}
}{
- \RequirePackage{mathrsfs} % fournit les majuscules cursives
\RequirePackage{amssymb} % \leqslant, \geqslant, \varnothing
+ \@ifundefined{mathscr}{\RequirePackage{mathrsfs}}{}
}
}
\RequirePackage{amsopn} % fournit \DeclareMathOperator
@@ -668,7 +677,7 @@
\RequirePackage[Symbol]{upgreek}}
\fi
}
-\RequirePackage{xspace} % utile pour les commandes \curs, \ssi, \Oij
+\RequirePackage{xspace} % utile pour les commandes \ssi, \Oij
\ifnoibrackets\else\RequirePackage{ibrackets}\fi % intelligent brackets
\RequirePackage{decimalcomma} % depuis frenchmath 2.7
@@ -720,7 +729,7 @@
% \end{macrocode}
% Passons aux alias et identifiants de fonctions classiques.
% \begin{macrocode}
-\newcommand*\curs[1]{\mathscr{#1}}
+\newcommand\curs{\mathscr}
\newcommand\infeg{\leqslant}
\newcommand\supeg{\geqslant}
\newcommand\vide{\varnothing}
@@ -884,7 +893,7 @@
% \end{macrocode}
%
% \medskip
-% \begin{thebibliography}{28}
+% \begin{thebibliography}{29}
% \begin{raggedright}
% \bibitem{RTIN} \emph{Lexique des règles typographiques en usage à l’Imprimerie Nationale},
% édition du 26/08/2002.
@@ -937,6 +946,8 @@
% CTAN, v1.1 19/12/2023.
% \bibitem{BRACKETS} \emph{Intelligent brackets -- The \textsf{ibrackets} package},
% Antoine Missier, v1.1 26/12/2022.
+% \bibitem{MATAL} \emph{The \textsf{mathalpha}, \textsc{aka} \textsf{mathalfa} package},
+% Michael Sharpe, CTAN, v1.143 18/11/2021.
% \bibitem{DLJ} \emph{\textsf{dotlessj}}, David Carlisle, CTAN, v0.03 09/12/1998.
% \bibitem{KPF} \emph{\textsf{Kp-Fonts} -- The Johannes Kepler project},
% Christophe Caignaert, CTAN, v3.34 20/09/2022.
diff --git a/macros/latex/contrib/frenchmath/frenchmath.ins b/macros/latex/contrib/frenchmath/frenchmath.ins
index 8e0901845e..c07fa0f3f4 100644
--- a/macros/latex/contrib/frenchmath/frenchmath.ins
+++ b/macros/latex/contrib/frenchmath/frenchmath.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2019-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+%% Copyright (C) 2019-2024 by Antoine Missier <antoine.missier@ac-toulouse.fr>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3 of this license
@@ -21,7 +21,7 @@
This is a generated file.
-Copyright (C) 2019-2023 by Antoine Missier <antoine.missier@ac-toulouse.fr>
+Copyright (C) 2019-2024 by Antoine Missier <antoine.missier@ac-toulouse.fr>
This file may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3 of this license
diff --git a/macros/latex/contrib/frenchmath/frenchmath.pdf b/macros/latex/contrib/frenchmath/frenchmath.pdf
index 4c30510e1b..d32e4471da 100644
--- a/macros/latex/contrib/frenchmath/frenchmath.pdf
+++ b/macros/latex/contrib/frenchmath/frenchmath.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md
index 0c9d02efe4..a8e4cb8d77 100644
--- a/macros/latex/contrib/l3kernel/CHANGELOG.md
+++ b/macros/latex/contrib/l3kernel/CHANGELOG.md
@@ -7,6 +7,19 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2024-01-22]
+
+### Added
+- `\keys_set_exclude_groups:nnn(nN)` to replace `\keys_set_filter:nnn(nN)`
+- Flags with N-type names, like other variable types
+
+### Changed
+- Set `l3doc` option `kernel` off as-standard (issue \#1403)
+- Moved `\seq_set_filter:NNn` to stable
+
+### Deprecated
+- `\keys_set_filter:nnn(nN)` in favor of `\keys_set_exclude_groups:nnn(nN)`
+
## [2024-01-04]
### Added
@@ -1635,7 +1648,8 @@ this project uses date-based 'snapshot' version identifiers.
- Step functions have been added for dim variables,
e.g. `\dim_step_inline:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2024-01-04...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2024-01-22...HEAD
+[2024-01-22]: https://github.com/latex3/latex3/compare/2024-01-04...2024-01-22
[2024-01-04]: https://github.com/latex3/latex3/compare/2023-12-11...2024-01-04
[2023-12-11]: https://github.com/latex3/latex3/compare/2023-12-08...2023-12-11
[2023-12-08]: https://github.com/latex3/latex3/compare/2023-11-09...2023-12-08
diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md
index 1173d3966f..96b7e958f9 100644
--- a/macros/latex/contrib/l3kernel/README.md
+++ b/macros/latex/contrib/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2024-01-04
+Release 2024-01-22
Overview
--------
diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx
index c62a81f8ad..8fbb777dcb 100644
--- a/macros/latex/contrib/l3kernel/expl3.dtx
+++ b/macros/latex/contrib/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2024-01-04}%
+\def\ExplFileDate{2024-01-22}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -425,11 +425,14 @@
% type for carrying out |box| alignment operations;
% \item[dim] \enquote{rigid} lengths;
% \item[fp] floating-point values;
+% \item[fparray] fixed-size vector of floating-point values;
+% \item[int] integer-valued count register;
+% \item[intarray] fixed-size vector of integer values;
% \item[ior] an input stream (for reading from a file);
% \item[iow] an output stream (for writing to a file);
-% \item[int] integer-valued count register;
% \item[muskip] math mode \enquote{rubber} lengths;
% \item[prop] property list;
+% \item[regex] regular expression;
% \item[seq] sequence: a data-type used to implement lists (with
% access at both ends) and stacks;
% \item[skip] \enquote{rubber} lengths;
@@ -437,6 +440,7 @@
% characters have category \enquote{other} (catcode~$12$),
% other than spaces which are category \enquote{space}
% (catcode~$10$);
+% \item[token] equal to a single arbitrary token;
% \item[tl] \enquote{token list variables}: placeholders for token lists.
% \end{description}
% When the \meta{type} and \meta{module} are identical (as often happens in
@@ -819,22 +823,22 @@
%
% The distribution of \pkg{expl3} is split up into three packages on
% CTAN: \pkg{l3kernel}, \pkg{l3packages} and \pkg{l3experimental}.
-% For historical reasons,
+% The core programming layer provided by \pkg{l3kernel} has been loaded
+% as part of the \LaTeX{} since 2020-02-02. For historical reasons, in
+% older kernel releases
% \begin{verbatim}
% \RequirePackage{expl3}
% \end{verbatim}
-% loads the code now distributed as \pkg{l3kernel}. This monolithic
+% loads the code distributed as \pkg{l3kernel}. This monolithic
% package contains all of the modules regarded by the team as stable,
% and any changes in this code are very limited. This material is
% therefore suitable for use in third-party packages without concern
% about changes in support. All of this code is documented in
-% \texttt{interface3.pdf}. With an up-to-date \LaTeXe{} kernel, this
-% code is built into the format file and therefore can be used
-% without any further steps.
+% \texttt{interface3.pdf}.
%
-% The material in \pkg{l3packages} is also stable, but is not always
-% at a programming level: most notably, \pkg{xparse} is stable and
-% suitable for wider use.
+% The material in \pkg{l3packages} is also stable; this bundle provides
+% user-level commands, some of which have been integrated in the
+% \LaTeX{} kernel.
%
% Finally, \pkg{l3experimental} contains modules ready for public use
% but not yet integrated into \pkg{l3kernel}. These modules have to
@@ -856,8 +860,8 @@
% For example, you may well need \tn{IfPackageLoadedTF}, as there
% is currently no native \pkg{expl3} package loading module.
% \item User level macros should be generated using the mechanism
-% available in the \pkg{xparse} package, which is part of the
-% \texttt{l3package} bundle.
+% available in the \pkg{ltcmd} module, which is part of the
+% the \LaTeX{} kernel since 2020-10-01.
% \item At an internal level, most functions should be generated
% \tn{long} (using \cs{cs_new:Npn}) rather than \enquote{short} (using
% \cs{cs_new_nopar:Npn}).
diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf
index 123d474f9b..8f722bc6b4 100644
--- a/macros/latex/contrib/l3kernel/expl3.pdf
+++ b/macros/latex/contrib/l3kernel/expl3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf
index 3144931ce4..7b5ffdc3e9 100644
--- a/macros/latex/contrib/l3kernel/interface3.pdf
+++ b/macros/latex/contrib/l3kernel/interface3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3.ins b/macros/latex/contrib/l3kernel/l3.ins
index 776e777c46..2940230505 100644
--- a/macros/latex/contrib/l3kernel/l3.ins
+++ b/macros/latex/contrib/l3kernel/l3.ins
@@ -113,7 +113,6 @@ and all files in that bundle must be distributed together.
\from{l3text-case.dtx} {package}
\from{l3text-map.dtx} {package}
\from{l3text-purify.dtx}{package}
- \from{l3candidates.dtx} {package}
\from{l3legacy.dtx} {package}
\from{l3deprecation.dtx}{package}
}
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index 761aa46a79..0be8bdc8b2 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -2824,17 +2824,18 @@
% The \texttt{c} variant is careful not to add the control sequence
% to the hash table if it isn't there yet, and it also avoids nesting
% \TeX{} conditionals in case |#1| is unbalanced in this matter.
+% We optimize the case where the command exists by reducing as much as
+% possible the tokens in the conditional.
% \begin{macrocode}
\cs_new_protected:Npn \cs_undefine:N #1
{ \cs_gset_eq:NN #1 \tex_undefined:D }
\cs_new_protected:Npn \cs_undefine:c #1
{
\if_cs_exist:w #1 \cs_end:
- \exp_after:wN \use:n
\else:
- \exp_after:wN \use_none:n
+ \use_i:nnnn
\fi:
- { \cs_gset_eq:cN {#1} \tex_undefined:D }
+ \exp_args:Nc \cs_undefine:N {#1}
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3bitset.dtx b/macros/latex/contrib/l3kernel/l3bitset.dtx
index d362d59adb..498e9954cc 100644
--- a/macros/latex/contrib/l3kernel/l3bitset.dtx
+++ b/macros/latex/contrib/l3kernel/l3bitset.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
index 1e8af0f79e..c1fb85f8c0 100644
--- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx
index 82041737ef..ae3bc283c2 100644
--- a/macros/latex/contrib/l3kernel/l3box.dtx
+++ b/macros/latex/contrib/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx
deleted file mode 100644
index 05e3fdc23a..0000000000
--- a/macros/latex/contrib/l3kernel/l3candidates.dtx
+++ /dev/null
@@ -1,150 +0,0 @@
-% \iffalse meta-comment
-%
-%% File: l3candidates.dtx
-%
-% Copyright (C) 2012-2024 The LaTeX Project
-%
-% It may be distributed and/or modified under the conditions of the
-% LaTeX Project Public License (LPPL), either version 1.3c of this
-% license or (at your option) any later version. The latest version
-% of this license is in the file
-%
-% https://www.latex-project.org/lppl.txt
-%
-% This file is part of the "l3kernel bundle" (The Work in LPPL)
-% and all files in that bundle must be distributed together.
-%
-% -----------------------------------------------------------------------
-%
-% The development version of the bundle can be found at
-%
-% https://github.com/latex3/latex3
-%
-% for those people who are interested.
-%
-%<*driver>
-\documentclass[full,kernel]{l3doc}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \title{^^A
-% The \pkg{l3candidates} module\\ Experimental additions to
-% \pkg{l3kernel}^^A
-% }
-%
-% \author{^^A
-% The \LaTeX{} Project\thanks
-% {^^A
-% E-mail:
-% \href{mailto:latex-team@latex-project.org}
-% {latex-team@latex-project.org}^^A
-% }^^A
-% }
-%
-% \date{Released 2024-01-04}
-%
-% \maketitle
-%
-% \begin{documentation}
-%
-% \section{Important notice}
-%
-% This module provides a space in which functions can be added to
-% \pkg{l3kernel} (\pkg{expl3}) while still being experimental.
-% \begin{quote}
-% \bfseries
-% As such, the
-% functions here may not remain in their current form, or indeed at all,
-% in \pkg{l3kernel} in the future.
-% \end{quote}
-% In contrast to the material in
-% \pkg{l3experimental}, the functions here are all \emph{small} additions to
-% the kernel. We encourage programmers to test them out and report back on
-% the \texttt{LaTeX-L} mailing list.
-%
-% \medskip
-%
-% Thus, if you intend to use any of these functions from the candidate module in a public package
-% offered to others for productive use (e.g., being placed on CTAN) please consider the following points carefully:
-% \begin{itemize}
-% \item Be prepared that your public packages might require updating when such functions
-% are being finalized.
-% \item Consider informing us that you use a particular function in your public package, e.g., by
-% discussing this on the \texttt{LaTeX-L}
-% mailing list. This way it becomes easier to coordinate any updates necessary without issues
-% for the users of your package.
-% \item Discussing and understanding use cases for a particular addition or concept also helps to
-% ensure that we provide the right interfaces in the final version so please give us feedback
-% if you consider a certain candidate function useful (or not).
-% \end{itemize}
-% We only add functions in this space if we consider them being serious candidates for a final inclusion
-% into the kernel. However, real use sometimes leads to better ideas, so functions from this module are
-% \textbf{not necessarily stable} and we may have to adjust them!
-%
-% \section{Additions to \pkg{l3seq}}
-%
-% \begin{function}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{syntax}
-% \cs{seq_set_filter:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline boolexpr}
-% \end{syntax}
-% Evaluates the \meta{inline boolexpr} for every \meta{item} stored
-% within the \meta{sequence_2}. The \meta{inline boolexpr}
-% receives the \meta{item} as |#1|. The sequence of all \meta{items}
-% for which the \meta{inline boolexpr} evaluated to \texttt{true}
-% is assigned to \meta{sequence_1}.
-% \begin{texnote}
-% Contrarily to other mapping functions, \cs{seq_map_break:} cannot
-% be used in this function, and would lead to low-level \TeX{} errors.
-% \end{texnote}
-% \end{function}
-%
-% \end{documentation}
-%
-% \begin{implementation}
-%
-% \section{\pkg{l3candidates} implementation}
-%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% \subsection{Additions to \pkg{l3seq}}
-%
-% \begin{macrocode}
-%<@@=seq>
-% \end{macrocode}
-%
-% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{macro}{\@@_set_filter:NNNn}
-% Similar to \cs{seq_map_inline:Nn}, without a
-% \cs{prg_break_point:} because the user's code
-% is performed within the evaluation of a boolean expression,
-% and skipping out of that would break horribly.
-% The \cs{@@_wrap_item:n} function inserts the relevant
-% \cs{@@_item:n} without expansion in the input stream,
-% hence in the \texttt{e}-expanding assignment.
-% \begin{macrocode}
-\cs_new_protected:Npn \seq_set_filter:NNn
- { \@@_set_filter:NNNn \__kernel_tl_set:Ne }
-\cs_new_protected:Npn \seq_gset_filter:NNn
- { \@@_set_filter:NNNn \__kernel_tl_gset:Ne }
-\cs_new_protected:Npn \@@_set_filter:NNNn #1#2#3#4
- {
- \@@_push_item_def:n { \bool_if:nT {#4} { \@@_wrap_item:n {##1} } }
- #1 #2 { #3 }
- \@@_pop_item_def:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \end{implementation}
-%
-% \PrintIndex
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx
index 325d4616df..e3285d9bd9 100644
--- a/macros/latex/contrib/l3kernel/l3cctab.dtx
+++ b/macros/latex/contrib/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx
index 7b64db9863..a8e24c2a30 100644
--- a/macros/latex/contrib/l3kernel/l3clist.dtx
+++ b/macros/latex/contrib/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -165,10 +165,10 @@
% \clist_gset_eq:Nc, \clist_gset_eq:cc
% }
% \begin{syntax}
-% \cs{clist_set_eq:NN} \meta{comma list_1} \meta{comma list_2}
+% \cs{clist_set_eq:NN} \meta{clist~var_1} \meta{clist~var_2}
% \end{syntax}
-% Sets the content of \meta{comma list_1} equal to that of
-% \meta{comma list_2}. To set a token list variable equal to a comma
+% Sets the content of \meta{clist~var_1} equal to that of
+% \meta{clist~var_2}. To set a token list variable equal to a comma
% list variable, use \cs{tl_set_eq:NN}. Conversely, setting a comma
% list variable to a token list is unadvisable unless one checks
% space-trimming and related issues.
@@ -182,10 +182,10 @@
% \clist_gset_from_seq:Nc, \clist_gset_from_seq:cc
% }
% \begin{syntax}
-% \cs{clist_set_from_seq:NN} \meta{clist~var} \meta{sequence}
+% \cs{clist_set_from_seq:NN} \meta{clist~var} \meta{seq~var}
% \end{syntax}
-% Converts the data in the \meta{sequence} into a \meta{clist~var}:
-% the original \meta{sequence} is unchanged.
+% Converts the data in the \meta{seq~var} into a \meta{clist~var}:
+% the original \meta{seq~var} is unchanged.
% Items which contain either spaces or commas are surrounded by braces.
% \end{function}
%
@@ -195,11 +195,11 @@
% \clist_gconcat:NNN, \clist_gconcat:ccc
% }
% \begin{syntax}
-% \cs{clist_concat:NNN} \meta{comma list_1} \meta{comma list_2} \meta{comma list_3}
+% \cs{clist_concat:NNN} \meta{clist~var_1} \meta{clist~var_2} \meta{clist~var_3}
% \end{syntax}
-% Concatenates the content of \meta{comma list_2} and \meta{comma list_3}
-% together and saves the result in \meta{comma list_1}. The items in
-% \meta{comma list_2} are placed at the left side of the new comma list.
+% Concatenates the content of \meta{clist~var_2} and \meta{clist~var_3}
+% together and saves the result in \meta{clist~var_1}. The items in
+% \meta{clist~var_2} are placed at the left side of the new comma list.
% \end{function}
%
% \begin{function}[EXP, pTF, added=2012-03-03]
@@ -475,8 +475,8 @@
% (token list) \meta{variable} and applies the \meta{code}. The
% \meta{code} will usually make use of the \meta{variable}, but this
% is not enforced. The assignments to the \meta{variable} are local.
-% Its value after the loop is the last \meta{item} in the \meta{comma
-% list}, or its original value if there were no \meta{item}. The
+% Its value after the loop is the last \meta{item} in the \meta{clist~var},
+% or its original value if there were no \meta{item}. The
% \meta{items} are returned from left to right.
% \end{function}
%
@@ -1067,9 +1067,9 @@
% in the case of an empty comma-list.
% \begin{macrocode}
\cs_new_protected:Npn \clist_set_from_seq:NN
- { \@@_set_from_seq:NNNN \clist_clear:N \__kernel_tl_set:Ne }
+ { \@@_set_from_seq:NNNN \clist_clear:N \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gset_from_seq:NN
- { \@@_set_from_seq:NNNN \clist_gclear:N \__kernel_tl_gset:Ne }
+ { \@@_set_from_seq:NNNN \clist_gclear:N \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_set_from_seq:NNNN #1#2#3#4
{
\seq_if_empty:NTF #4
@@ -1108,9 +1108,9 @@
% a little work to do.
% \begin{macrocode}
\cs_new_protected:Npn \clist_concat:NNN
- { \@@_concat:NNNN \__kernel_tl_set:Ne }
+ { \@@_concat:NNNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gconcat:NNN
- { \@@_concat:NNNN \__kernel_tl_gset:Ne }
+ { \@@_concat:NNNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_concat:NNNN #1#2#3#4
{
#1 #2
@@ -1155,9 +1155,9 @@
% }
% \begin{macrocode}
\cs_new_protected:Npn \clist_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \@@_sanitize:n {#2} } }
+ { \__kernel_tl_set:Nx #1 { \@@_sanitize:n {#2} } }
\cs_new_protected:Npn \clist_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \@@_sanitize:n {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \@@_sanitize:n {#2} } }
\cs_generate_variant:Nn \clist_set:Nn { NV , Ne , c , cV , ce }
\cs_generate_variant:Nn \clist_set:Nn { No , Nx , co , cx }
\cs_generate_variant:Nn \clist_gset:Nn { NV , Ne , c , cV , ce }
@@ -1295,9 +1295,9 @@
% result can safely be an empty comma list.
% \begin{macrocode}
\cs_new_protected:Npn \clist_pop:NN
- { \@@_pop:NNN \__kernel_tl_set:Ne }
+ { \@@_pop:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gpop:NN
- { \@@_pop:NNN \__kernel_tl_gset:Ne }
+ { \@@_pop:NNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_pop:NNN #1#2#3
{
\if_meaning:w #2 \c_empty_clist
@@ -1342,9 +1342,9 @@
}
\prg_generate_conditional_variant:Nnn \clist_get:NN { c } { T , F , TF }
\prg_new_protected_conditional:Npnn \clist_pop:NN #1#2 { T , F , TF }
- { \@@_pop_TF:NNN \__kernel_tl_set:Ne #1 #2 }
+ { \@@_pop_TF:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \clist_gpop:NN #1#2 { T , F , TF }
- { \@@_pop_TF:NNN \__kernel_tl_gset:Ne #1 #2 }
+ { \@@_pop_TF:NNN \__kernel_tl_gset:Nx #1 #2 }
\cs_new_protected:Npn \@@_pop_TF:NNN #1#2#3
{
\if_meaning:w #2 \c_empty_clist
@@ -1473,9 +1473,9 @@
% the second step removes it.
% \begin{macrocode}
\cs_new_protected:Npn \clist_remove_all:Nn
- { \@@_remove_all:NNNn \clist_set_from_seq:NN \__kernel_tl_set:Ne }
+ { \@@_remove_all:NNNn \clist_set_from_seq:NN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \clist_gremove_all:Nn
- { \@@_remove_all:NNNn \clist_gset_from_seq:NN \__kernel_tl_gset:Ne }
+ { \@@_remove_all:NNNn \clist_gset_from_seq:NN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_remove_all:NNNn #1#2#3#4
{
\@@_if_wrap:nTF {#4}
@@ -1529,9 +1529,9 @@
% \texttt{N}-type comma lists, but the slow-down is not too bad.
% \begin{macrocode}
\cs_new_protected:Npn \clist_reverse:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \clist_reverse:n {#1} } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \clist_reverse:n {#1} } }
\cs_new_protected:Npn \clist_greverse:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \clist_reverse:n {#1} } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \clist_reverse:n {#1} } }
\cs_generate_variant:Nn \clist_reverse:N { c }
\cs_generate_variant:Nn \clist_greverse:N { c }
% \end{macrocode}
diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx
index e3d23ea537..c6882fe5b3 100644
--- a/macros/latex/contrib/l3kernel/l3coffins.dtx
+++ b/macros/latex/contrib/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx
index 7f9e36e6df..950bf3d6be 100644
--- a/macros/latex/contrib/l3kernel/l3color.dtx
+++ b/macros/latex/contrib/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx
index 423ffd5577..e8f577a4bb 100644
--- a/macros/latex/contrib/l3kernel/l3debug.dtx
+++ b/macros/latex/contrib/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -99,13 +99,16 @@
% different.
% \end{function}
%
-% \begin{function}[EXP]{\__kernel_chk_flag_exist:n}
+% \begin{function}[EXP]{\__kernel_chk_flag_exist:NN}
% \begin{syntax}
-% \cs{__kernel_chk_flag_exist:n} \Arg{flag}
+% \cs{__kernel_chk_flag_exist:NN}
+% \meta{function} \meta{flag}
% \end{syntax}
% This function is only created if debugging is enabled. It checks
% that the \meta{flag} is defined according to the criterion for
-% \cs{flag_if_exist_p:n}, and if not raises a kernel-level error.
+% \cs{flag_if_exist_p:N}, and if not raises a kernel-level error and
+% calls the function with the argument \cs{l_tmpa_flag} to proceed
+% somehow without producing too many errors.
% \end{function}
%
% \begin{function}{\__kernel_debug_log:e}
@@ -128,7 +131,7 @@
%
% Standard file identification.
% \begin{macrocode}
-\ProvidesExplFile{l3debug.def}{2024-01-04}{}{L3 Debugging support}
+\ProvidesExplFile{l3debug.def}{2024-01-22}{}{L3 Debugging support}
% \end{macrocode}
%
% \begin{variable}{\s_@@_stop}
@@ -220,7 +223,7 @@
}
\cs_set_protected:Npn \debug_resume:
{
- \__kernel_tl_set:Ne \l_@@_suspended_tl
+ \__kernel_tl_set:Nx \l_@@_suspended_tl
{ \tl_tail:N \l_@@_suspended_tl }
\tl_if_empty:NT \l_@@_suspended_tl
{
@@ -241,7 +244,7 @@
% \__kernel_chk_cs_exist:N,
% \__kernel_chk_cs_exist:c
% }
-% \begin{macro}[EXP]{\__kernel_chk_flag_exist:n}
+% \begin{macro}[EXP]{\__kernel_chk_flag_exist:NN}
% \begin{macro}{\__kernel_chk_var_local:N, \__kernel_chk_var_global:N}
% \begin{macro}{\__kernel_chk_var_scope:NN}
% When debugging is enabled these two functions set up functions that
@@ -258,7 +261,7 @@
\cs_new_protected:Npn \__kernel_chk_var_exist:N #1 { }
\cs_new_protected:Npn \__kernel_chk_cs_exist:N #1 { }
\cs_generate_variant:Nn \__kernel_chk_cs_exist:N { c }
-\cs_new:Npn \__kernel_chk_flag_exist:n #1 { }
+\cs_new:Npn \__kernel_chk_flag_exist:NN { }
\cs_new_protected:Npn \__kernel_chk_var_local:N #1 { }
\cs_new_protected:Npn \__kernel_chk_var_global:N #1 { }
\cs_new_protected:Npn \__kernel_chk_var_scope:NN #1#2 { }
@@ -282,13 +285,14 @@
{ \token_to_str:N ##1 }
}
}
- \cs_set:Npn \__kernel_chk_flag_exist:n ##1
+ \cs_set:Npn \__kernel_chk_flag_exist:NN ##1##2
{
- \@@_suspended:T \use_none:nnn
- \flag_if_exist:nF {##1}
+ \@@_suspended:T \use_iii:nnnn
+ \flag_if_exist:NTF ##2
+ { ##1 ##2 }
{
- \msg_expandable_error:nnn
- { kernel } { bad-variable } { flag~##1~ }
+ \msg_expandable_error:nnn { kernel } { bad-variable } {##2}
+ ##1 \l_tmpa_flag
}
}
\cs_set_protected:Npn \__kernel_chk_var_scope:NN
@@ -313,7 +317,7 @@
{
\cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
- \cs_set:Npn \__kernel_chk_flag_exist:N ##1 { }
+ \cs_set:Npn \__kernel_chk_flag_exist:NN { }
\cs_set_protected:Npn \__kernel_chk_var_local:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_global:N ##1 { }
\cs_set_protected:Npn \__kernel_chk_var_scope:NN ##1##2 { }
@@ -510,11 +514,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_generate_parameter_list:NNN #1#2#3
{
- \__kernel_tl_set:Ne \l_@@_internal_tl
+ \__kernel_tl_set:Nx \l_@@_internal_tl
{ \exp_last_unbraced:Nf \use_ii:nnn \cs_split_function:N #1 }
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \exp_args:NV \@@_build_parm_text:n \l_@@_internal_tl }
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
{ \exp_args:NV \@@_build_arg_list:n \l_@@_internal_tl }
}
\cs_new:Npn \@@_build_parm_text:n #1
@@ -790,8 +794,8 @@
%
%
% \begin{macrocode}
-\cs_gset_protected:Npn \__kernel_tl_set:Ne { \cs_set_nopar:Npe }
-\cs_gset_protected:Npn \__kernel_tl_gset:Ne { \cs_gset_nopar:Npe }
+\cs_gset_protected:Npn \__kernel_tl_set:Nx { \cs_set_nopar:Npe }
+\cs_gset_protected:Npn \__kernel_tl_gset:Nx { \cs_gset_nopar:Npe }
% \end{macrocode}
%
% Patching where the first argument to a function needs scope-checking:
@@ -842,7 +846,7 @@
\str_set_eq:NN
\str_put_left:Nn
\str_put_right:Nn
- \__kernel_tl_set:Ne
+ \__kernel_tl_set:Nx
\tl_clear:N
\tl_set_eq:NN
\tl_put_left:Nn
@@ -911,7 +915,7 @@
\str_gset_eq:NN
\str_gput_left:Nn
\str_gput_right:Nn
- \__kernel_tl_gset:Ne
+ \__kernel_tl_gset:Nx
\tl_gclear:N
\tl_gset_eq:NN
\tl_gput_left:Nn
@@ -957,16 +961,16 @@
% Flag functions.
% \begin{macrocode}
\__kernel_patch:nnn
- { \__kernel_chk_flag_exist:n {#1} }
+ { \__kernel_chk_flag_exist:NN }
{ }
{
- \flag_if_raised:nT
- \flag_if_raised:nF
- \flag_if_raised:nTF
- \flag_if_raised_p:n
- \flag_height:n
- \flag_ensure_raised:n
- \flag_clear:n
+ \flag_ensure_raised:N
+ \flag_height:N
+ \flag_if_raised:NT
+ \flag_if_raised:NF
+ \flag_if_raised:NTF
+ \flag_if_raised_p:N
+ \flag_raise:N
}
% \end{macrocode}
%
@@ -981,6 +985,17 @@
{ }
{ \cctab_new:N }
\__kernel_patch:nnn
+ { \__kernel_chk_var_scope:NN l #1 }
+ { }
+ { \flag_new:N }
+ \__kernel_patch:nnn
+ {
+ \__kernel_chk_var_scope:NN l #1
+ \__kernel_chk_flag_exist:NN
+ }
+ { }
+ { \flag_clear:N }
+ \__kernel_patch:nnn
{ \__kernel_chk_var_scope:NN g #1 }
{ }
{ \intarray_new:Nn }
@@ -1069,7 +1084,7 @@
{
\@@_trace_push:nnN { regex } { 1 } \@@_escape_use:nnnn
\group_begin:
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{ \@@_trace_pop:nnN { regex } { 1 } \@@_escape_use:nnnn }
\use_none:nnn
}
diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx
index 59007c6725..99b52ec961 100644
--- a/macros/latex/contrib/l3kernel/l3deprecation.dtx
+++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -209,229 +209,6 @@
}
% \end{macrocode}
%
-% \subsection{Removed functions}
-%
-% \begin{macro}{\@@_old_protected:Nnn, \@@_old:Nnn}
-% Short-hands for old commands whose definition does not matter
-% any more as they were removed.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_old_protected:Nnn #1#2#3
- {
- \__kernel_patch_deprecation:nnNNpn {#3} {#2}
- \cs_gset_protected:Npn #1 { }
- }
-\cs_new_protected:Npn \@@_old:Nnn #1#2#3
- {
- \__kernel_patch_deprecation:nnNNpn {#3} {#2}
- \cs_gset:Npn #1 { }
- }
-\@@_old_protected:Nnn \box_gset_eq_clear:NN
- { \box_gset_eq_drop:NN } { 2021-07-01 }
-\@@_old_protected:Nnn \box_set_eq_clear:NN
- { \box_set_eq_drop:NN } { 2021-07-01 }
-\@@_old_protected:Nnn \box_resize:Nnn
- { \box_resize_to_wd_and_ht_plus_dp:Nnn } { 2019-01-01 }
-\@@_old_protected:Nnn \box_use_clear:N
- { \box_use_drop:N } { 2019-01-01 }
-\@@_old:Nnn \c_job_name_tl
- { \c_sys_jobname_str } { 2017-01-01 }
-\@@_old:Nnn \c_minus_one
- { -1 } { 2019-01-01 }
-\@@_old:Nnn \c_zero
- { 0 } { 2020-01-01 }
-\@@_old:Nnn \c_one
- { 1 } { 2020-01-01 }
-\@@_old:Nnn \c_two
- { 2 } { 2020-01-01 }
-\@@_old:Nnn \c_three
- { 3 } { 2020-01-01 }
-\@@_old:Nnn \c_four
- { 4 } { 2020-01-01 }
-\@@_old:Nnn \c_five
- { 5 } { 2020-01-01 }
-\@@_old:Nnn \c_six
- { 6 } { 2020-01-01 }
-\@@_old:Nnn \c_seven
- { 7 } { 2020-01-01 }
-\@@_old:Nnn \c_eight
- { 8 } { 2020-01-01 }
-\@@_old:Nnn \c_nine
- { 9 } { 2020-01-01 }
-\@@_old:Nnn \c_ten
- { 10 } { 2020-01-01 }
-\@@_old:Nnn \c_eleven
- { 11 } { 2020-01-01 }
-\@@_old:Nnn \c_twelve
- { 12 } { 2020-01-01 }
-\@@_old:Nnn \c_thirteen
- { 13 } { 2020-01-01 }
-\@@_old:Nnn \c_fourteen
- { 14 } { 2020-01-01 }
-\@@_old:Nnn \c_fifteen
- { 15 } { 2020-01-01 }
-\@@_old:Nnn \c_sixteen
- { 16 } { 2020-01-01 }
-\@@_old:Nnn \c_thirty_two
- { 32 } { 2020-01-01 }
-\@@_old:Nnn \c_one_hundred
- { 100 } { 2020-01-01 }
-\@@_old:Nnn \c_two_hundred_fifty_five
- { 255 } { 2020-01-01 }
-\@@_old:Nnn \c_two_hundred_fifty_six
- { 256 } { 2020-01-01 }
-\@@_old:Nnn \c_one_thousand
- { 1000 } { 2020-01-01 }
-\@@_old:Nnn \c_ten_thousand
- { 10000 } { 2020-01-01 }
-\@@_old:Nnn \c_term_ior
- { -1 } { 2021-07-01 }
-\@@_old:Nnn \dim_case:nnn
- { \dim_case:nnF } { 2015-07-14 }
-\@@_old_protected:Nnn \file_add_path:nN
- { \file_get_full_name:nN } { 2019-01-01 }
-\@@_old_protected:Nnn \file_if_exist_input:nT
- { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
-\@@_old_protected:Nnn \file_if_exist_input:nTF
- { \file_if_exist:nT and~ \file_input:n } { 2018-03-05 }
-\@@_old_protected:Nnn \file_list:
- { \file_log_list: } { 2019-01-01 }
-\@@_old:Nnn \file_path_include:n
- { \seq_put_right:Nn \l_file_search_path_seq } { 2019-01-01 }
-\@@_old_protected:Nnn \file_path_remove:n
- { \seq_remove_all:Nn \l_file_search_path_seq } { 2019-01-01 }
-\@@_old:Nnn \g_file_current_name_tl
- { \g_file_curr_name_str } { 2019-01-01 }
-\@@_old_protected:Nnn \hbox_unpack_clear:N
- { \hbox_unpack_drop:N } { 2021-07-01 }
-\@@_old:Nnn \int_case:nnn
- { \int_case:nnF } { 2015-07-14 }
-\@@_old:Nnn \int_from_binary:n
- { \int_from_bin:n } { 2016-01-05 }
-\@@_old:Nnn \int_from_hexadecimal:n
- { \int_from_hex:n } { 2016-01-05 }
-\@@_old:Nnn \int_from_octal:n
- { \int_from_oct:n } { 2016-01-05 }
-\@@_old:Nnn \int_to_binary:n
- { \int_to_bin:n } { 2016-01-05 }
-\@@_old:Nnn \int_to_hexadecimal:n
- { \int_to_hex:n } { 2016-01-05 }
-\@@_old:Nnn \int_to_octal:n
- { \int_to_oct:n } { 2016-01-05 }
-\@@_old_protected:Nnn \ior_get_str:NN
- { \ior_str_get:NN } { 2018-03-05 }
-\@@_old_protected:Nnn \ior_list_streams:
- { \ior_show_list: } { 2019-01-01 }
-\@@_old_protected:Nnn \ior_log_streams:
- { \ior_log_list: } { 2019-01-01 }
-\@@_old_protected:Nnn \iow_list_streams:
- { \iow_show_list: } { 2019-01-01 }
-\@@_old_protected:Nnn \iow_log_streams:
- { \iow_log_list: } { 2019-01-01 }
-\@@_old:Nnn \lua_escape_x:n
- { \lua_escape:e } { 2020-01-01 }
-\@@_old:Nnn \lua_now_x:n
- { \lua_now:e } { 2020-01-01 }
-\@@_old_protected:Nnn \lua_shipout_x:n
- { \lua_shipout_e:n } { 2020-01-01 }
-\@@_old:Nnn \luatex_if_engine_p:
- { \sys_if_engine_luatex_p: } { 2017-01-01 }
-\@@_old:Nnn \luatex_if_engine:F
- { \sys_if_engine_luatex:F } { 2017-01-01 }
-\@@_old:Nnn \luatex_if_engine:T
- { \sys_if_engine_luatex:T } { 2017-01-01 }
-\@@_old:Nnn \luatex_if_engine:TF
- { \sys_if_engine_luatex:TF } { 2017-01-01 }
-\@@_old_protected:Nnn \msg_interrupt:nnn
- { [Defined~error~message] } { 2020-01-01 }
-\@@_old_protected:Nnn \msg_log:n
- { \iow_log:n } { 2020-01-01 }
-\@@_old_protected:Nnn \msg_term:n
- { \iow_term:n } { 2020-01-01 }
-\@@_old:Nnn \pdftex_if_engine_p:
- { \sys_if_engine_pdftex_p: } { 2017-01-01 }
-\@@_old:Nnn \pdftex_if_engine:F
- { \sys_if_engine_pdftex:F } { 2017-01-01 }
-\@@_old:Nnn \pdftex_if_engine:T
- { \sys_if_engine_pdftex:T } { 2017-01-01 }
-\@@_old:Nnn \pdftex_if_engine:TF
- { \sys_if_engine_pdftex:TF } { 2017-01-01 }
-\@@_old:Nnn \prop_get:cn
- { \prop_item:cn } { 2016-01-05 }
-\@@_old:Nnn \prop_get:Nn
- { \prop_item:Nn } { 2016-01-05 }
-\@@_old:Nnn \quark_if_recursion_tail_break:N
- { } { 2015-07-14 }
-\@@_old:Nnn \quark_if_recursion_tail_break:n
- { } { 2015-07-14 }
-\@@_old:Nnn \scan_align_safe_stop:
- { protected~commands } { 2017-01-01 }
-\@@_old:Nnn \sort_ordered:
- { \sort_return_same: } { 2019-01-01 }
-\@@_old:Nnn \sort_reversed:
- { \sort_return_swapped: } { 2019-01-01 }
-\@@_old:Nnn \str_case:nnn
- { \str_case:nnF } { 2015-07-14 }
-\@@_old:Nnn \str_case:onn
- { \str_case:onF } { 2015-07-14 }
-\@@_old:Nnn \str_case_x:nn
- { \str_case_e:nn } { 2020-01-01 }
-\@@_old:Nnn \str_case_x:nnn
- { \str_case_e:nnF } { 2015-07-14 }
-\@@_old:Nnn \str_case_x:nnT
- { \str_case_e:nnT } { 2020-01-01 }
-\@@_old:Nnn \str_case_x:nnTF
- { \str_case_e:nnTF } { 2020-01-01 }
-\@@_old:Nnn \str_case_x:nnF
- { \str_case_e:nnF } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x_p:nn
- { \str_if_eq_p:ee } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x:nnT
- { \str_if_eq:eeT } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x:nnF
- { \str_if_eq:eeF } { 2020-01-01 }
-\@@_old:Nnn \str_if_eq_x:nnTF
- { \str_if_eq:eeTF } { 2020-01-01 }
-\@@_old_protected:Nnn \tl_show_analysis:N
- { \tl_analysis_show:N } { 2020-01-01 }
-\@@_old_protected:Nnn \tl_show_analysis:n
- { \tl_analysis_show:n } { 2020-01-01 }
-\@@_old:Nnn \tl_case:cnn
- { \exp_args:Nc \token_case_meaning:NnF } { 2015-07-14 }
-\@@_old:Nnn \tl_case:Nnn
- { \token_case_meaning:NnF } { 2015-07-14 }
-\@@_old_protected:Nnn \tl_gset_from_file:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_gset_from_file_x:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_set_from_file:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_set_from_file_x:Nnn
- { \file_get:nnN } { 2021-07-01 }
-\@@_old_protected:Nnn \tl_to_lowercase:n
- { \tex_lowercase:D } { 2018-03-05 }
-\@@_old_protected:Nnn \tl_to_uppercase:n
- { \tex_uppercase:D } { 2018-03-05 }
-\@@_old:Nnn \token_get_arg_spec:N
- { \cs_argument_spec:N } { 2021-07-01 }
-\@@_old:Nnn \token_get_prefix_spec:N
- { \cs_prefix_spec:N } { 2021-07-01 }
-\@@_old:Nnn \token_get_replacement_spec:N
- { \cs_replacement_spec:N } { 2021-07-01 }
-\@@_old_protected:Nnn \token_new:Nn
- { \cs_new_eq:NN } { 2019-01-01 }
-\@@_old_protected:Nnn \vbox_unpack_clear:N
- { \vbox_unpack_drop:N } { 2021-07-01 }
-\@@_old:Nnn \xetex_if_engine_p:
- { \sys_if_engine_xetex_p: } { 2017-01-01 }
-\@@_old:Nnn \xetex_if_engine:F
- { \sys_if_engine_xetex:F } { 2017-01-01 }
-\@@_old:Nnn \xetex_if_engine:T
- { \sys_if_engine_xetex:T } { 2017-01-01 }
-\@@_old:Nnn \xetex_if_engine:TF
- { \sys_if_engine_xetex:TF } { 2017-01-01 }
-% \end{macrocode}
-% \end{macro}
-%
% \subsection{Deprecated \pkg{l3basics} functions}
%
% \begin{macrocode}
@@ -503,6 +280,39 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}[deprecated]
+% {
+% \keys_set_filter:nnnN, \keys_set_filter:nnVN,
+% \keys_set_filter:nnvN, \keys_set_filter:nnoN
+% }
+% \begin{macro}[deprecated]
+% {
+% \keys_set_filter:nnnnN, \keys_set_filter:nnVnN,
+% \keys_set_filter:nnvnN, \keys_set_filter:nnonN
+% }
+% \begin{macro}[deprecated]
+% {
+% \keys_set_filter:nnn, \keys_set_filter:nnV,
+% \keys_set_filter:nnv, \keys_set_filter:nno
+% }
+% We need a transition here so for the present this is commented out:
+% only needed for \texttt{latex-lab} code so this should not last for
+% too long.
+% \begin{macrocode}
+%\__kernel_patch_deprecation:nnNNpn { 2024-01-10 } { \keys_set_exclude_groups:nnn }
+\cs_set_protected:Npn \keys_set_filter:nnn { \keys_set_exclude_groups:nnn }
+\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
+%\__kernel_patch_deprecation:nnNNpn { 2024-01-10 } { \keys_set_exclude_groups:nnnN }
+\cs_set_protected:Npn \keys_set_filter:nnnN { \keys_set_exclude_groups:nnnN }
+\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
+%\__kernel_patch_deprecation:nnNNpn { 2024-01-10 } { \keys_set_exclude_groups:nnnnN }
+\cs_set_protected:Npn \keys_set_filter:nnnnN { \keys_set_exclude_groups:nnnnN }
+\cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Deprecated \pkg{l3pdf} functions}
%
% \begin{macrocode}
@@ -729,7 +539,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tl_build_get:NN}
+% \begin{macro}[deprecated]{\tl_build_get:NN}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2023-10-25 } { \tl_build_get_intermediate:NN }
\cs_new_protected:Npn \tl_build_get:NN { \tl_build_get_intermediate:NN }
diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx
index d24fcce4f8..fde5ddd103 100644
--- a/macros/latex/contrib/l3kernel/l3doc.dtx
+++ b/macros/latex/contrib/l3kernel/l3doc.dtx
@@ -71,7 +71,7 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2024-01-04}{}
+\ProvidesExplClass{l3doc}{2024-01-22}{}
{L3 Experimental documentation class}
%</class>
% \fi
@@ -84,7 +84,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
% \maketitle
% \tableofcontents
%
@@ -237,8 +237,10 @@ and all files in that bundle must be distributed together.
% encoding (the standard setting) or leaves the font setup unchanged.
%
% \DescribeOption{kernel}
-% Determines whether \pkg{l3doc} treats |\__kernel_| commands and
-% |\(c|g|l)__kernel_| variables as allowable in code. In general,
+% Determines whether \pkg{l3doc} treats internal functions and variables
+% belonging to |kernel| module as allowable in code, for instance
+% \cs{__kernel_tl_to_str:w}, \cs{c__kernel_expl_date_tl}, and
+% \cs{l__kernel_expl_bool}. In general,
% \emph{no} internal material from outside the current module is allowed.
% However, for bootstrapping the \pkg{expl3} kernel, a small number of
% cross-module functions are needed. To suppress the error message that
@@ -270,6 +272,12 @@ and all files in that bundle must be distributed together.
% class option. To disable hyphenation of control sequences entirely, use
% \texttt{cs-break = false}.
%
+% By default, class options
+% \begin{verbatim}
+% full , check = false , checktest = false , lm-default
+% \end{verbatim}
+% are set.
+%
% \subsection{Partitioning documentation and implementation}
%
% \pkg{doc} uses the \cs{OnlyDocumentation}/\cs{AlsoImplementation}
@@ -322,7 +330,7 @@ and all files in that bundle must be distributed together.
% it doesn't rely on catcodes being \enquote{correct} and is therefore
% recommended.
%
-% These commands are aware of the |@@| \pkg{l3docstrip} syntax and
+% These commands are aware of the |@@| \pkg{DocStrip} syntax and
% replace such instances correctly in the typeset documentation.
% This only happens after a |%<@@=|\meta{module}|>| declaration.
%
@@ -343,7 +351,7 @@ and all files in that bundle must be distributed together.
% main index. By default, the \meta{module} is deduced
% automatically from the command name.
% \item |replace| is a boolean key (\texttt{true} by default) which
-% indicates whether to replace |@@| as \pkg{l3docstrip} does.
+% indicates whether to replace |@@| as \pkg{DocStrip} does.
% \end{itemize}
% These commands allow hyphenation of control sequences after (most) underscores.
% By default, a hyphen is used to mark the hyphenation, but this can be changed with
@@ -1046,7 +1054,7 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_trim_right:Nn #1#2
{
\cs_set:Npn \@@_tmp:w ##1 #2 ##2 \q_stop { \exp_not:n {##1} }
- \__kernel_tl_set:Ne #1 { \exp_after:wN \@@_tmp:w #1 #2 \q_stop }
+ \__kernel_tl_set:Nx #1 { \exp_after:wN \@@_tmp:w #1 #2 \q_stop }
}
\cs_generate_variant:Nn \@@_trim_right:Nn { No }
% \end{macrocode}
@@ -1266,14 +1274,14 @@ and all files in that bundle must be distributed together.
\@@_if_almost_str:nTF {#1}
{
\@@_key_get_base_TF:nN {#1} \l_@@_tmpa_tl
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \@@_split_function_do:on \l_@@_tmpa_tl { \@@_base_form_aux:nnN } }
}
{ \tl_set:Nn #2 {#1} }
}
\cs_new:Npe \@@_key_get_base_TF:nN #1#2
{
- \__kernel_tl_set:Ne #2 { \exp_not:N \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx #2 { \exp_not:N \tl_to_str:n {#1} }
\tl_if_in:NoF #2 { \tl_to_str:n {:} }
{ \exp_not:N \prg_break: }
\tl_if_in:onT { #2 z } { \tl_to_str:n {TF} z }
@@ -1464,7 +1472,7 @@ and all files in that bundle must be distributed together.
\DeclareUnknownKeyHandler [ l3doc / options ]
{ \PassOptionsToClass { \CurrentOption } { article } }
\SetKeys [ l3doc / options ]
- { full , kernel , check = false , checktest = false , lm-default }
+ { full , check = false , checktest = false , lm-default }
\PassOptionsToClass { a4paper } { article }
% \end{macrocode}
%
@@ -1998,7 +2006,7 @@ and all files in that bundle must be distributed together.
\verbatim@font
\@@_if_almost_str:VT \l_@@_cmd_tl
{
- \__kernel_tl_set:Ne \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl }
+ \__kernel_tl_set:Nx \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl }
\bool_if:NT \g_@@_cs_break_bool
{
\regex_replace_all:nnN
@@ -2020,13 +2028,13 @@ and all files in that bundle must be distributed together.
{
\quark_if_no_value:NF \l_@@_cmd_index_tl
{
- \__kernel_tl_set:Ne \l_@@_cmd_tl
+ \__kernel_tl_set:Nx \l_@@_cmd_tl
{ \c_backslash_str \exp_not:o { \l_@@_cmd_index_tl } }
}
\exp_args:No \@@_key_get:n { \l_@@_cmd_tl }
\quark_if_no_value:NF \l_@@_cmd_module_tl
{
- \__kernel_tl_set:Ne \l_@@_index_module_tl
+ \__kernel_tl_set:Nx \l_@@_index_module_tl
{ \tl_to_str:N \l_@@_cmd_module_tl }
}
\@@_special_index_module:ooonN
@@ -2142,7 +2150,7 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_get_hyper_target:nN #1#2
{
- \__kernel_tl_set:Ne #2 { \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx #2 { \tl_to_str:n {#1} }
\tl_replace_all:NVn #2 \c_underscore_str { / }
\tl_remove_all:NV #2 \c_backslash_str
\tl_put_left:Nn #2 { doc/function// }
@@ -2165,7 +2173,7 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_names_get_seq:nN #1#2
{
- \__kernel_tl_set:Ne \l_@@_tmpa_tl { \tl_to_str:n {#1} }
+ \__kernel_tl_set:Nx \l_@@_tmpa_tl { \tl_to_str:n {#1} }
\bool_if:NTF \l_@@_names_verb_bool
{
\seq_clear:N #2
@@ -3051,7 +3059,7 @@ and all files in that bundle must be distributed together.
\l_@@_macro_do_not_index_tl
\exp_args:NNV \seq_set_from_clist:Nn
\l_@@_tmpa_seq \l_@@_macro_do_not_index_tl
- \__kernel_tl_set:Ne \l_@@_macro_do_not_index_tl
+ \__kernel_tl_set:Nx \l_@@_macro_do_not_index_tl
{ \seq_use:Nn \l_@@_tmpa_seq { , } }
\exp_args:NV \DoNotIndex \l_@@_macro_do_not_index_tl
}
@@ -4367,7 +4375,7 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_special_index_set:Nn #1#2
{
- \__kernel_tl_set:Ne #1 { \tl_to_str:n {#2} }
+ \__kernel_tl_set:Nx #1 { \tl_to_str:n {#2} }
\@@_if_almost_str:nTF {#2}
{
\tl_replace_all:Nen #1 { \tl_to_str:n { __ } }
@@ -4385,7 +4393,7 @@ and all files in that bundle must be distributed together.
\token_to_str:N \verb * \verbatimchar
}
}
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\token_to_str:N \verb * \verbatimchar
#1 \verbatimchar
@@ -4436,7 +4444,7 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npe \@@_key_get:n #1
{
\exp_not:N \@@_key_get_base:nN {#1} \exp_not:N \l_@@_index_macro_tl
- \__kernel_tl_set:Ne \exp_not:N \l_@@_index_key_tl
+ \__kernel_tl_set:Nx \exp_not:N \l_@@_index_key_tl
{ \exp_not:N \tl_to_str:N \exp_not:N \l_@@_index_macro_tl }
\tl_clear:N \exp_not:N \l_@@_index_module_tl
\tl_if_in:NnTF \exp_not:N \l_@@_index_key_tl { \tl_to_str:n { __ } }
@@ -4458,7 +4466,7 @@ and all files in that bundle must be distributed together.
}
\cs_new_protected:Npn \@@_key_pop:
{
- \__kernel_tl_set:Ne \l_@@_index_key_tl
+ \__kernel_tl_set:Nx \l_@@_index_key_tl
{ \tl_tail:N \l_@@_index_key_tl }
}
% \end{macrocode}
@@ -4473,7 +4481,7 @@ and all files in that bundle must be distributed together.
{
\cs_set:Npn \@@_tmpa:w ##1 #1 ##2 \q_stop
{ \exp_not:n {##1} }
- \__kernel_tl_set:Ne \l_@@_index_module_tl
+ \__kernel_tl_set:Nx \l_@@_index_module_tl
{ \exp_after:wN \@@_tmpa:w \l_@@_index_module_tl #1 \q_stop }
}
\cs_new_protected:Npn \@@_key_drop_underscores:
diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf
index 9201da42ef..352082c2ab 100644
--- a/macros/latex/contrib/l3kernel/l3doc.pdf
+++ b/macros/latex/contrib/l3kernel/l3doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx
index 9e28f867c2..9034fb7176 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.dtx
+++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf
index cb2d544930..2098a2ce21 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.pdf
+++ b/macros/latex/contrib/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx
index dd682a37d8..5ea58b75d5 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx
index c715b4da65..cc14b48980 100644
--- a/macros/latex/contrib/l3kernel/l3file.dtx
+++ b/macros/latex/contrib/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -1212,7 +1212,7 @@
{ \@@_open_stream:Nn #1 {#2} }
{
\@@_new:N #1
- \__kernel_tl_set:Ne \l_@@_stream_tl { \int_eval:n {#1} }
+ \__kernel_tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:Nn #1 {#2}
}
}
@@ -1687,14 +1687,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_open:Nn #1#2
{
- \__kernel_tl_set:Ne \l_@@_file_name_tl
+ \__kernel_tl_set:Nx \l_@@_file_name_tl
{ \__kernel_file_name_sanitize:n {#2} }
\iow_close:N #1
\seq_gpop:NNTF \g_@@_streams_seq \l_@@_stream_tl
{ \@@_open_stream:NV #1 \l_@@_file_name_tl }
{
\@@_new:N #1
- \__kernel_tl_set:Ne \l_@@_stream_tl { \int_eval:n {#1} }
+ \__kernel_tl_set:Nx \l_@@_stream_tl { \int_eval:n {#1} }
\@@_open_stream:NV #1 \l_@@_file_name_tl
}
}
@@ -1966,7 +1966,7 @@
\cs_new:Npn \@@_unindent:w { }
\cs_new_protected:Npn \@@_set_indent:n #1
{
- \__kernel_tl_set:Ne \l_@@_one_indent_tl
+ \__kernel_tl_set:Nx \l_@@_one_indent_tl
{ \exp_args:No \__kernel_str_to_other_fast:n { \tl_to_str:n {#1} } }
\int_set:Nn \l_@@_one_indent_int
{ \str_count:N \l_@@_one_indent_tl }
@@ -2143,7 +2143,7 @@
% \cs{iow_wrap:nnnN}.
% \begin{macrocode}
\cs_set_eq:NN \protect \token_to_str:N
- \__kernel_tl_set:Ne \l_@@_wrap_tl {#1}
+ \__kernel_tl_set:Nx \l_@@_wrap_tl {#1}
\cs_set_eq:NN \iow_wrap_allow_break: \@@_wrap_allow_break_error:
\cs_set_eq:NN \iow_indent:n \@@_indent_error:n
% \end{macrocode}
@@ -2151,8 +2151,8 @@
% then convert to a string) and initialize the target count for lines
% (the first line has target count \cs{l_iow_line_count_int} instead).
% \begin{macrocode}
- \__kernel_tl_set:Ne \l_@@_newline_tl { \iow_newline: #2 }
- \__kernel_tl_set:Ne \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl }
+ \__kernel_tl_set:Nx \l_@@_newline_tl { \iow_newline: #2 }
+ \__kernel_tl_set:Nx \l_@@_newline_tl { \tl_to_str:N \l_@@_newline_tl }
\int_set:Nn \l_@@_line_target_int
{ \l_iow_line_count_int - \str_count:N \l_@@_newline_tl + 1 }
% \end{macrocode}
@@ -2192,12 +2192,12 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_wrap_do:
{
- \__kernel_tl_set:Ne \l_@@_wrap_tl
+ \__kernel_tl_set:Nx \l_@@_wrap_tl
{
\exp_args:No \__kernel_str_to_other_fast:n \l_@@_wrap_tl
\c_@@_wrap_end_marker_tl
}
- \__kernel_tl_set:Ne \l_@@_wrap_tl
+ \__kernel_tl_set:Nx \l_@@_wrap_tl
{
\exp_after:wN \@@_wrap_fix_newline:w \l_@@_wrap_tl
^^J \q_@@_nil ^^J \s_@@_stop
@@ -2461,7 +2461,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_wrap_allow_break:n #1
{
- \__kernel_tl_set:Ne \l_@@_line_tl
+ \__kernel_tl_set:Nx \l_@@_line_tl
{ \l_@@_line_tl \@@_wrap_trim:N \l_@@_line_part_tl }
\bool_set_false:N \l_@@_line_break_bool
\tl_if_empty:NTF \l_@@_line_part_tl
@@ -2492,7 +2492,7 @@
\tl_put_right:Ne \l_@@_line_tl { \l_@@_line_part_tl }
\bool_set_false:N \l_@@_line_break_bool
\int_sub:Nn \l_@@_indent_int { \l_@@_one_indent_int }
- \__kernel_tl_set:Ne \l_@@_indent_tl
+ \__kernel_tl_set:Nx \l_@@_indent_tl
{ \exp_after:wN \@@_unindent:w \l_@@_indent_tl }
\@@_wrap_chunk:nw {#1}
}
@@ -2531,9 +2531,9 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_wrap_store_do:n #1
{
- \__kernel_tl_set:Ne \l_@@_line_tl
+ \__kernel_tl_set:Nx \l_@@_line_tl
{ \l_@@_line_tl \l_@@_line_part_tl }
- \__kernel_tl_set:Ne \l_@@_wrap_tl
+ \__kernel_tl_set:Nx \l_@@_wrap_tl
{
\l_@@_wrap_tl
\l_@@_newline_tl
@@ -3132,7 +3132,7 @@
\cs_generate_variant:Nn \file_get_full_name:nN { V }
\prg_new_protected_conditional:Npnn \file_get_full_name:nN #1#2 { T , F , TF }
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{ \file_full_name:n {#1} }
\tl_if_empty:NTF #2
{ \prg_return_false: }
@@ -3312,7 +3312,7 @@
{ V } { T , F , TF }
\cs_new_protected:Npn \@@_get_details:nnN #1#2#3
{
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
{ \use:c { file_ #2 :n } {#1} }
\tl_if_empty:NTF #3
{ \prg_return_false: }
@@ -3334,7 +3334,7 @@
\prg_new_protected_conditional:Npnn \file_get_hex_dump:nnnN #1#2#3#4
{ T , F , TF }
{
- \__kernel_tl_set:Ne #4
+ \__kernel_tl_set:Nx #4
{ \file_hex_dump:nnn {#1} {#2} {#3} }
\tl_if_empty:NTF #4
{ \prg_return_false: }
diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx
index 05768ae069..b0a586d48b 100644
--- a/macros/latex/contrib/l3kernel/l3flag.dtx
+++ b/macros/latex/contrib/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -54,16 +54,13 @@
% cases, booleans or integers should be preferred to flags because they
% are very significantly faster.
%
-% A flag can hold any non-negative value, which we call its
+% A flag can hold any (small) non-negative value, which we call its
% \meta{height}. In expansion-only contexts, a flag can only be
% \enquote{raised}: this increases the \meta{height} by $1$. The \meta{height}
% can also be queried expandably. However, decreasing it, or setting it
% to zero requires non-expandable assignments.
%
-% Flag variables are always local. They are referenced by a \meta{flag
-% name} such as \texttt{fp_overflow}. The \meta{flag name} is used as
-% part of \cs{use:c} constructions hence is expanded at point of use.
-% It must expand to character tokens only, with no spaces.
+% Flag variables are always local.
%
% A typical use case of flags would be to keep track of whether an
% exceptional condition has occurred during expandable processing, and
@@ -74,94 +71,111 @@
% error message describing incorrect inputs that were encountered.
%
% Flags should not be used without carefully considering the fact that
-% raising a flag takes a time and memory proportional to its height.
-% Flags should not be used unless unavoidable.
+% raising a flag takes a time and memory proportional to its height and
+% that the memory cannot be reclaimed even if the flag is cleared.
+% Flags should not be used unless it is unavoidable.
+%
+% In earlier versions, flags were referenced by an \texttt{n}-type
+% \meta{flag name} such as \texttt{fp_overflow}, used as part of
+% \cs{use:c} constructions. All of the commands described below have
+% \texttt{n}-type analogues that can still appear in old code, but the
+% \texttt{N}-type commands are to be preferred moving forward. The
+% \texttt{n}-type \meta{flag name} is simply mapped to
+% \cs[no-index]{l_\meta{flag name}_flag}, which makes it easier for
+% packages using public flags (such as \pkg{l3fp}) to retain backwards
+% compatibility.
%
% \section{Setting up flags}
%
-% \begin{function}{\flag_new:n}
+% \begin{function}[added = 2024-01-12]{\flag_new:N, \flag_new:c}
% \begin{syntax}
-% \cs{flag_new:n} \Arg{flag name}
+% \cs{flag_new:N} \meta{flag~var}
% \end{syntax}
-% Creates a new flag with a name given by \meta{flag name}, or raises
-% an error if the name is already taken. The \meta{flag name} may not
-% contain spaces. The declaration is global, but flags are always
-% local variables. The \meta{flag} initially has zero height.
+% Creates a new \meta{flag~var}, or raises an error if the name is
+% already taken. The declaration is global, but flags are always local
+% variables. The \meta{flag~var} initially has zero height.
% \end{function}
%
-% \begin{function}{\flag_clear:n}
+% \begin{function}[added = 2024-01-12]{\flag_clear:N, \flag_clear:c}
% \begin{syntax}
-% \cs{flag_clear:n} \Arg{flag name}
+% \cs{flag_clear:N} \meta{flag~var}
% \end{syntax}
-% The \meta{flag}'s height is set to zero. The assignment is local.
+% Sets the height of the \meta{flag~var} to zero. The assignment is local.
% \end{function}
%
-% \begin{function}{\flag_clear_new:n}
+% \begin{function}[added = 2024-01-12]{\flag_clear_new:N, \flag_clear_new:c}
% \begin{syntax}
-% \cs{flag_clear_new:n} \Arg{flag name}
+% \cs{flag_clear_new:N} \meta{flag~var}
% \end{syntax}
-% Ensures that the \meta{flag} exists globally by applying
-% \cs{flag_new:n} if necessary, then applies \cs{flag_clear:n}, setting
+% Ensures that the \meta{flag~var} exists globally by applying
+% \cs{flag_new:N} if necessary, then applies \cs{flag_clear:N}, setting
% the height to zero locally.
% \end{function}
%
-% \begin{function}{\flag_show:n}
+% \begin{function}[added = 2024-01-12]{\flag_show:N, \flag_show:c}
% \begin{syntax}
-% \cs{flag_show:n} \Arg{flag name}
+% \cs{flag_show:N} \meta{flag~var}
% \end{syntax}
-% Displays the \meta{flag}'s height in the terminal.
+% Displays the height of the \meta{flag~var} in the terminal.
% \end{function}
%
-% \begin{function}{\flag_log:n}
+% \begin{function}[added = 2024-01-12]{\flag_log:N, \flag_log:c}
% \begin{syntax}
-% \cs{flag_log:n} \Arg{flag name}
+% \cs{flag_log:N} \meta{flag~var}
% \end{syntax}
-% Writes the \meta{flag}'s height to the log file.
+% Writes the height of the \meta{flag~var} in the log file.
% \end{function}
%
% \section{Expandable flag commands}
%
-% \begin{function}[EXP,pTF]{\flag_if_exist:n}
+% \begin{function}[EXP, pTF, added = 2024-01-12]{\flag_if_exist:N, \flag_if_exist:c}
% \begin{syntax}
-% \cs{flag_if_exist_p:n} \Arg{flag name}
-% \cs{flag_if_exist:nTF} \Arg{flag name} \Arg{true code} \Arg{false code}
+% \cs{flag_if_exist_p:N} \meta{flag~var}
+% \cs{flag_if_exist:NTF} \meta{flag~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% This function returns \texttt{true} if the \meta{flag name}
-% references a flag that has been defined previously, and
-% \texttt{false} otherwise.
+% This function returns \texttt{true} if the \meta{flag~var} is
+% currently defined, and \texttt{false} otherwise. This does not check
+% that the \meta{flag~var} really is a flag variable.
% \end{function}
%
-% \begin{function}[EXP,pTF]{\flag_if_raised:n}
+% \begin{function}[EXP, pTF, added = 2024-01-12]{\flag_if_raised:N, \flag_if_raised:c}
% \begin{syntax}
-% \cs{flag_if_raised_p:n} \Arg{flag name}
-% \cs{flag_if_raised:nTF} \Arg{flag name} \Arg{true code} \Arg{false code}
+% \cs{flag_if_raised_p:N} \meta{flag~var}
+% \cs{flag_if_raised:NTF} \meta{flag~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% This function returns \texttt{true} if the \meta{flag} has non-zero
-% height, and \texttt{false} if the \meta{flag} has zero height.
+% This function returns \texttt{true} if the \meta{flag~var} has non-zero
+% height, and \texttt{false} if the \meta{flag~var} has zero height.
% \end{function}
%
-% \begin{function}[EXP]{\flag_height:n}
+% \begin{function}[EXP, added = 2024-01-12]{\flag_height:N, \flag_height:c}
% \begin{syntax}
-% \cs{flag_height:n} \Arg{flag name}
+% \cs{flag_height:N} \meta{flag~var}
% \end{syntax}
-% Expands to the height of the \meta{flag} as an integer denotation.
+% Expands to the height of the \meta{flag~var} as an integer denotation.
% \end{function}
%
-% \begin{function}[EXP]{\flag_raise:n}
+% \begin{function}[EXP, added = 2024-01-12]{\flag_raise:N, \flag_raise:c}
% \begin{syntax}
-% \cs{flag_raise:n} \Arg{flag name}
+% \cs{flag_raise:N} \meta{flag~var}
% \end{syntax}
-% The \meta{flag}'s height is increased by $1$ locally.
+% The height of \meta{flag~var} is increased by $1$ locally.
% \end{function}
%
-% \begin{function}[EXP, added = 2023-04-25]{\flag_ensure_raised:n}
+% \begin{function}[EXP, added = 2024-01-12]{\flag_ensure_raised:N, \flag_ensure_raised:c}
% \begin{syntax}
-% \cs{flag_ensure_raised:n} \Arg{flag name}
+% \cs{flag_ensure_raised:N} \meta{flag~var}
% \end{syntax}
-% Ensures the \meta{flag} is raised by making its height at least~$1$,
+% Ensures the \meta{flag~var} is raised by making its height at least~$1$,
% locally.
% \end{function}
%
+% \begin{variable}[added = 2024-01-12]{\l_tmpa_flag, \l_tmpb_flag}
+% Scratch flag for local assignment. These are never used by
+% the kernel code, and so are safe for use with any \LaTeX3-defined
+% function. However, they may be overwritten by other non-kernel
+% code and so should only be used for short-term storage.
+% \end{variable}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -178,149 +192,197 @@
%
% \TestFiles{m3flag001}
%
-% \subsection{Non-expandable flag commands}
+% \subsection{Protected flag commands}
%
-% The height $h$ of a flag (initially zero) is stored by setting control
-% sequences of the form \cs[no-index]{flag \meta{name} \meta{integer}}
-% to \tn{relax} for $0\leq\meta{integer}<h$. When a flag is raised, a
-% \enquote{trap} function \cs[no-index]{flag \meta{name}} is called.
-% The existence of this function is also used to test for the existence
-% of a flag.
+% The height $h$ of a flag (which is initially zero) is stored by
+% setting control sequences of the form \cs[no-index]{\meta{flag
+% name}\meta{integer}} to \tn{relax} for $0\leq\meta{integer}<h$. These
+% control sequences are produced by \cs{cs:w} \meta{flag~var}
+% \meta{integer} \cs{cs_end:}, namely the \meta{flag~var} is actually a
+% (protected) macro expanding to its own csname.
%
-% \begin{macro}{\flag_new:n}
-% For each flag, we define a \enquote{trap} function, which by default
-% simply increases the flag by $1$ by letting the appropriate control
-% sequence to \tn{relax}. This can be done expandably!
+% \begin{macro}{\flag_new:N, \flag_new:c}
+% Evaluate the csname of~|#1| for use in constructing the various
+% indexed macros.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_new:n #1
- {
- \cs_new:cpn { flag~#1 } ##1 ;
- { \exp_after:wN \use_none:n \cs:w flag~#1~##1 \cs_end: }
- }
+\cs_new_protected:Npn \flag_new:N #1
+ { \cs_new_protected:Npe #1 { \cs_to_str:N #1 } }
+\cs_generate_variant:Nn \flag_new:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\flag_clear:n}
-% \begin{macro}{\@@_clear:wn}
+% \begin{variable}{\l_tmpa_flag, \l_tmpb_flag}
+% Two flag variables for scratch use.
+% \begin{macrocode}
+\flag_new:N \l_tmpa_flag
+\flag_new:N \l_tmpb_flag
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\flag_clear:N, \flag_clear:c}
+% \begin{macro}{\@@_clear:wN}
% Undefine control sequences, starting from the |0| flag, upwards,
% until reaching an undefined control sequence. We don't use
% \cs{cs_undefine:c} because that would act globally.
-% When the option \texttt{check-declarations} is used, check for the
-% function defined by \cs{flag_new:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_clear:n #1 { \@@_clear:wn 0 ; {#1} }
-\cs_new_protected:Npn \@@_clear:wn #1 ; #2
+\cs_new_protected:Npn \flag_clear:N #1
{
- \if_cs_exist:w flag~#2~#1 \cs_end:
- \cs_set_eq:cN { flag~#2~#1 } \tex_undefined:D
- \exp_after:wN \@@_clear:wn
- \int_value:w \int_eval:w 1 + #1
- \else:
- \use_i:nnn
+ \@@_clear:wN 0 ; #1
+ \prg_break_point:
+ }
+\cs_generate_variant:Nn \flag_clear:N { c }
+\cs_new_protected:Npn \@@_clear:wN #1 ; #2
+ {
+ \if_cs_exist:w #2 #1 \cs_end: \else:
+ \prg_break:n
\fi:
- ; {#2}
+ \cs_set_eq:cN { #2 #1 } \tex_undefined:D
+ \exp_after:wN \@@_clear:wN
+ \int_value:w \int_eval:w \c_one_int + #1 ; #2
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\flag_clear_new:n}
-% As for other datatypes, clear the \meta{flag} or create a new one,
+% \begin{macro}{\flag_clear_new:N, \flag_clear_new:c}
+% As for other datatypes, clear the \meta{flag~var} or create a new one,
% as appropriate.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_clear_new:n #1
- { \flag_if_exist:nTF {#1} { \flag_clear:n } { \flag_new:n } {#1} }
+\cs_new_protected:Npn \flag_clear_new:N #1
+ { \flag_if_exist:NTF #1 { \flag_clear:N } { \flag_new:N } #1 }
+\cs_generate_variant:Nn \flag_clear_new:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\flag_show:n, \flag_log:n, \@@_show:Nn}
+% \begin{macro}{\flag_show:N, \flag_show:c, \flag_log:N, \flag_log:c, \@@_show:NN}
% Show the height (terminal or log file) using appropriate \pkg{l3msg}
% auxiliaries.
% \begin{macrocode}
-\cs_new_protected:Npn \flag_show:n { \@@_show:Nn \tl_show:n }
-\cs_new_protected:Npn \flag_log:n { \@@_show:Nn \tl_log:n }
-\cs_new_protected:Npn \@@_show:Nn #1#2
+\cs_new_protected:Npn \flag_show:N { \@@_show:NN \tl_show:n }
+\cs_generate_variant:Nn \flag_show:N { c }
+\cs_new_protected:Npn \flag_log:N { \@@_show:NN \tl_log:n }
+\cs_generate_variant:Nn \flag_log:N { c }
+\cs_new_protected:Npn \@@_show:NN #1#2
{
- \exp_args:Nc \__kernel_chk_defined:NT { flag~#2 }
- {
- \exp_args:Ne #1
- { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
- }
+ \__kernel_chk_defined:NT #2
+ { \exp_args:Ne #1 { \tl_to_str:n { #2 height } = \flag_height:N #2 } }
}
% \end{macrocode}
% \end{macro}
%
% \subsection{Expandable flag commands}
%
-% \begin{macro}[EXP, pTF]{\flag_if_exist:n}
-% A flag exist if the corresponding trap \cs[no-index]{flag \meta{flag
-% name}:n} is defined.
+% \begin{macro}[EXP, pTF]{\flag_if_exist:N, \flag_if_exist:c}
+% Copies of the \texttt{cs} functions defined in \pkg{l3basics}.
% \begin{macrocode}
-\prg_new_conditional:Npnn \flag_if_exist:n #1 { p , T , F , TF }
- {
- \cs_if_exist:cTF { flag~#1 }
- { \prg_return_true: } { \prg_return_false: }
- }
+\prg_new_eq_conditional:NNn \flag_if_exist:N \cs_if_exist:N
+ { TF , T , F , p }
+\prg_new_eq_conditional:NNn \flag_if_exist:c \cs_if_exist:c
+ { TF , T , F , p }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP, pTF]{\flag_if_raised:n}
+% \begin{macro}[EXP, pTF]{\flag_if_raised:N, \flag_if_raised:c}
% Test if the flag has a non-zero height, by checking the |0| control sequence.
% \begin{macrocode}
-\prg_new_conditional:Npnn \flag_if_raised:n #1 { p , T , F , TF }
+\prg_new_conditional:Npnn \flag_if_raised:N #1 { p , T , F , TF }
{
- \if_cs_exist:w flag~#1~0 \cs_end:
+ \if_cs_exist:w #1 0 \cs_end:
\prg_return_true:
\else:
\prg_return_false:
\fi:
}
+\prg_generate_conditional_variant:Nnn \flag_if_raised:N
+ { c } { p , T , F , TF }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\flag_height:n}
-% \begin{macro}[EXP]{\@@_height_loop:wn, \@@_height_end:wn}
+% \begin{macro}[EXP]{\flag_height:N, \flag_height:c}
+% \begin{macro}[EXP]{\@@_height_loop:wN, \@@_height_end:wN}
% Extract the value of the flag by going through all of the
% control sequences starting from |0|.
% \begin{macrocode}
-\cs_new:Npn \flag_height:n #1 { \@@_height_loop:wn 0; {#1} }
-\cs_new:Npn \@@_height_loop:wn #1 ; #2
+\cs_new:Npn \flag_height:N #1 { \@@_height_loop:wN 0; #1 }
+\cs_new:Npn \@@_height_loop:wN #1 ; #2
{
- \if_cs_exist:w flag~#2~#1 \cs_end:
- \exp_after:wN \@@_height_loop:wn \int_value:w \int_eval:w 1 +
- \else:
- \exp_after:wN \@@_height_end:wn
+ \if_cs_exist:w #2 #1 \cs_end: \else:
+ \exp_after:wN \@@_height_end:wN
\fi:
- #1 ; {#2}
+ \exp_after:wN \@@_height_loop:wN
+ \int_value:w \int_eval:w \c_one_int + #1 ; #2
}
-\cs_new:Npn \@@_height_end:wn #1 ; #2 {#1}
+\cs_new:Npn \@@_height_end:wN #1 + #2 ; #3 {#2}
+\cs_generate_variant:Nn \flag_height:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}[EXP]{\flag_raise:n}
-% Simply apply the trap to the height, after expanding the latter.
+% \begin{macro}[EXP]{\flag_raise:N, \flag_raise:c}
+% Change the appropriate control sequence to \tn{relax} by expanding a
+% \cs{cs:w} \ldots{} \cs{cs_end:} construction, then pass it to
+% \cs{use_none:n} to avoid leaving anything in the input stream.
% \begin{macrocode}
-\cs_new:Npn \flag_raise:n #1
- {
- \cs:w flag~#1 \exp_after:wN \cs_end:
- \int_value:w \flag_height:n {#1} ;
- }
+\cs_new:Npn \flag_raise:N #1
+ { \exp_after:wN \use_none:n \cs:w #1 \flag_height:N #1 \cs_end: }
+\cs_generate_variant:Nn \flag_raise:N { c }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\flag_ensure_raised:n}
-% It might be faster to just call the \enquote{trap} function in all
-% cases but conceptually the function name suggests we should only run
-% it if the flag is zero in case the \enquote{trap} made customizable
-% in the future.
+% \begin{macro}[EXP]{\flag_ensure_raised:N, \flag_ensure_raised:c}
+% Pass the control sequence with name \meta{flag name}\texttt{0} to
+% \cs{use_none:n}. Constructing the control sequence ensures that it
+% changes from being undefined (if it was so) to being \tn{relax}.
% \begin{macrocode}
-\cs_new:Npn \flag_ensure_raised:n #1
+\cs_new:Npn \flag_ensure_raised:N #1
+ { \exp_after:wN \use_none:n \cs:w #1 0 \cs_end: }
+\cs_generate_variant:Nn \flag_ensure_raised:N { c }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Old \texttt{n}-type flag commands}
+%
+% Here we keep the old flag commands since our policy is to no longer
+% delete deprecated functions. The idea is to simply map \meta{flag
+% name} to \cs[no-index]{l_\meta{flag name}_flag}. When the debugging
+% code is activated, it checks existence of the \texttt{N}-type flag
+% variables that result.
+%
+% \begin{macro}{\flag_new:n, \flag_clear:n, \flag_clear_new:n}
+% \begin{macro}[EXP, pTF]{\flag_if_exist:n, \flag_if_raised:n}
+% \begin{macro}[EXP]{\flag_height:n, \flag_raise:n, \flag_ensure_raised:n}
+% \begin{macrocode}
+\cs_new_protected:Npn \flag_new:n #1 { \flag_new:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear:n #1 { \flag_clear:c { l_#1_flag } }
+\cs_new_protected:Npn \flag_clear_new:n #1 { \flag_clear_new:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist_p:n #1 { \flag_if_exist_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nT #1 { \flag_if_exist:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nF #1 { \flag_if_exist:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_exist:nTF #1 { \flag_if_exist:cTF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised_p:n #1 { \flag_if_raised_p:c { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nT #1 { \flag_if_raised:cT { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nF #1 { \flag_if_raised:cF { l_#1_flag } }
+\cs_new:Npn \flag_if_raised:nTF #1 { \flag_if_raised:cTF { l_#1_flag } }
+\cs_new:Npn \flag_height:n #1 { \flag_height:c { l_#1_flag } }
+\cs_new:Npn \flag_raise:n #1 { \flag_raise:c { l_#1_flag } }
+\cs_new:Npn \flag_ensure_raised:n #1 { \flag_ensure_raised:c { l_#1_flag } }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\flag_show:n, \flag_log:n, \@@_show:Nn}
+% To avoid changing the output here we mostly keep the old code.
+% \begin{macrocode}
+\cs_new_protected:Npn \flag_show:n { \@@_show:Nn \tl_show:n }
+\cs_new_protected:Npn \flag_log:n { \@@_show:Nn \tl_log:n }
+\cs_new_protected:Npn \@@_show:Nn #1#2
{
- \if_cs_exist:w flag~#1~0 \cs_end:
- \else:
- \cs:w flag~#1 \cs_end: 0 ;
- \fi:
+ \exp_args:Nc \__kernel_chk_defined:NT { l_#2_flag }
+ {
+ \exp_args:Ne #1
+ { \tl_to_str:n { flag~#2~height } = \flag_height:n {#2} }
+ }
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
index 5784537889..e2e9937c2c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
% \maketitle
%
% \begin{documentation}
@@ -82,9 +82,9 @@
% assignments.
% \begin{macrocode}
\cs_new_protected:Npn \fp_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
+ { \__kernel_tl_set:Nx #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_new_protected:Npn \fp_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
+ { \__kernel_tl_gset:Nx #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_new_protected:Npn \fp_const:Nn #1#2
{ \tl_const:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_generate_variant:Nn \fp_set:Nn {c}
diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
index 1efa9da7cb..cc54b7e02b 100644
--- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
index f50bded4d4..ed13beb5fd 100644
--- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
index 30cff3bb38..d5b73e7d97 100644
--- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
index 3a7616d3b9..2c86293101 100644
--- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
index d65b1a1160..0e4e48a0a9 100644
--- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-functions.dtx b/macros/latex/contrib/l3kernel/l3fp-functions.dtx
index d140af6758..3e423c0908 100644
--- a/macros/latex/contrib/l3kernel/l3fp-functions.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-functions.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
index 31cd180c39..13eeed8888 100644
--- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
index a4d2979c1e..ef6c2ad392 100644
--- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx
index 95671bce21..8c68289d60 100644
--- a/macros/latex/contrib/l3kernel/l3fp-random.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx
index 8061147f0a..a01b9505da 100644
--- a/macros/latex/contrib/l3kernel/l3fp-round.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx b/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx
index 22b9585e5d..01e883f136 100644
--- a/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -599,7 +599,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{variable}{@@_symbolic}
+% \begin{variable}{\l_@@_symbolic_flag}
% \begin{macro}{\fp_set_variable:nn, \@@_set_variable:nn}
% Refuse invalid identifiers. If the variable does not exist yet,
% define it just as in \cs{fp_new_variable:n} (but without unnecessary
@@ -615,7 +615,7 @@
% raised, |#1|~was present in \cs{l_@@_symbolic_fp}. In all cases,
% the |#1|-free result ends up in |\l__fp_variable_#1_fp|.
% \begin{macrocode}
-\flag_new:n { @@_symbolic }
+\flag_new:N \l_@@_symbolic_flag
\cs_new_protected:Npn \fp_set_variable:nn #1
{
\exp_args:No \@@_set_variable:nn { \tl_to_str:n {#1} }
@@ -628,10 +628,10 @@
\@@_variable_set_parsing:Nn \cs_set_eq:NN {#1}
\fp_set:Nn \l_@@_symbolic_fp {#2}
\cs_set_nopar:cpn { l_@@_variable_#1_fp }
- { \flag_ensure_raised:n { @@_symbolic } \c_nan_fp }
- \flag_clear:n { @@_symbolic }
+ { \flag_ensure_raised:N \l_@@_symbolic_flag \c_nan_fp }
+ \flag_clear:N \l_@@_symbolic_flag
\fp_set:cn { l_@@_variable_#1_fp } { \l_@@_symbolic_fp }
- \flag_if_raised:nT { @@_symbolic }
+ \flag_if_raised:NT \l_@@_symbolic_flag
{
\msg_error:nneee { fp } { id-loop }
{ #1 }
diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
index 983fb91171..6212ff731c 100644
--- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
% \maketitle
%
% \begin{documentation}
@@ -74,17 +74,17 @@
%
% \begin{variable}[module = fp]
% {
-% fp_invalid_operation,
-% fp_division_by_zero,
-% fp_overflow,
-% fp_underflow
+% \l_fp_invalid_operation_flag,
+% \l_fp_division_by_zero_flag,
+% \l_fp_overflow_flag,
+% \l_fp_underflow_flag
% }
% Flags to denote exceptions.
% \begin{macrocode}
-\flag_new:n { fp_invalid_operation }
-\flag_new:n { fp_division_by_zero }
-\flag_new:n { fp_overflow }
-\flag_new:n { fp_underflow }
+\flag_new:N \l_fp_invalid_operation_flag
+\flag_new:N \l_fp_division_by_zero_flag
+\flag_new:N \l_fp_overflow_flag
+\flag_new:N \l_fp_underflow_flag
% \end{macrocode}
% \end{variable}
%
@@ -167,7 +167,7 @@
{
#1
\@@_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3; } } { }
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
##1
}
\exp_args:Nno \use:n
@@ -176,7 +176,7 @@
#1
\@@_error:nffn { invalid-ii }
{ \fp_to_tl:n { ##2; } } { \fp_to_tl:n { ##3; } } {##1}
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
\exp_after:wN \c_nan_fp
}
\exp_args:Nno \use:n
@@ -184,7 +184,7 @@
{
#1
\@@_error:nffn { invalid } {##1} {##2} { }
- \flag_ensure_raised:n { fp_invalid_operation }
+ \flag_ensure_raised:N \l_fp_invalid_operation_flag
\exp_after:wN \c_nan_fp
}
}
@@ -217,7 +217,7 @@
{
#1
\@@_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3; } } { }
- \flag_ensure_raised:n { fp_division_by_zero }
+ \flag_ensure_raised:N \l_fp_division_by_zero_flag
\exp_after:wN ##1
}
\exp_args:Nno \use:n
@@ -226,7 +226,7 @@
#1
\@@_error:nffn { zero-div-ii }
{ \fp_to_tl:n { ##3; } } { \fp_to_tl:n { ##4; } } {##2}
- \flag_ensure_raised:n { fp_division_by_zero }
+ \flag_ensure_raised:N \l_fp_division_by_zero_flag
\exp_after:wN ##1
}
}
@@ -289,7 +289,7 @@
{ \fp_to_tl:n { \s_@@ \@@_chk:w ##1##2##3; } }
{ \token_if_eq_meaning:NNF 0 ##2 { - } #4 }
{#2}
- \flag_ensure_raised:n { fp_#2 }
+ \flag_ensure_raised:c { l_fp_#2_flag }
#3 ##2
}
}
diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
index 78e1403da0..5cf22fd7e9 100644
--- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-types.dtx b/macros/latex/contrib/l3kernel/l3fp-types.dtx
index cf76b2747b..fc6a34f6a1 100644
--- a/macros/latex/contrib/l3kernel/l3fp-types.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-types.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index 4f4fee8af6..bdc1d3fae3 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -874,9 +874,9 @@
% a computation is not exact, in other words, almost always. At the
% moment, this exception is entirely ignored in \LaTeX3.
% \end{itemize}
-% To each exception we associate a \enquote{flag}: \texttt{fp_overflow},
-% \texttt{fp_underflow}, \texttt{fp_invalid_operation} and
-% \texttt{fp_division_by_zero}. The state of these flags can be tested
+% To each exception we associate a \enquote{flag}: \cs{l_fp_overflow_flag},
+% \cs{l_fp_underflow_flag}, \cs{l_fp_invalid_operation_flag} and
+% \cs{l_fp_division_by_zero_flag}. The state of these flags can be tested
% and modified with commands from \pkg{l3flag}
%
% By default, the \enquote{invalid operation} exception triggers an
@@ -907,12 +907,12 @@
% \emph{This function is experimental, and may be altered or removed.}
% \end{function}
%
-% \begin{variable}[module = fp]
+% \begin{variable}
% {
-% fp_overflow,
-% fp_underflow,
-% fp_invalid_operation,
-% fp_division_by_zero
+% \l_fp_overflow_flag,
+% \l_fp_underflow_flag,
+% \l_fp_invalid_operation_flag,
+% \l_fp_division_by_zero_flag
% }
% Flags denoting the occurrence of various floating-point exceptions.
% \end{variable}
diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx
index 6f8e1c4c0e..2d8cd62f14 100644
--- a/macros/latex/contrib/l3kernel/l3fparray.dtx
+++ b/macros/latex/contrib/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index e0be12a51e..4d5f91cf53 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx
index c29930bd79..118e44ff3b 100644
--- a/macros/latex/contrib/l3kernel/l3intarray.dtx
+++ b/macros/latex/contrib/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -770,7 +770,7 @@ luacmd('@@_gset_range:w', function()
% \end{macro}
%
% \begin{macro}[EXP]{\intarray_item:Nn, \intarray_item:cn, \__kernel_intarray_item:Nn}
-% \begin{macro}{\@@_item:Nn}
+% \begin{macro}{\@@_item:Nw}
% Get the appropriate \tn{fontdimen} and perform bound checks. The
% \cs{__kernel_intarray_item:Nn} function omits bound checks and omits
% \cs{int_eval:n}, namely its argument must be a \TeX{} integer
diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
index 509abeedd6..6b3db5fd7d 100644
--- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -498,9 +498,9 @@
% only a single expansion.
% \end{function}
%
-% \begin{function}{\__kernel_tl_set:Ne, \__kernel_tl_gset:Ne}
+% \begin{function}{\__kernel_tl_set:Nx, \__kernel_tl_gset:Nx}
% \begin{syntax}
-% \cs{__kernel_tl_set:Ne} \meta{tl~var} \Arg{tokens}
+% \cs{__kernel_tl_set:Nx} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Fully expands \meta{tokens} and assigns the result to \meta{tl~var}.
% \meta{tokens} must be given in braces and there must be no token between
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index 9919abfd86..54155d6d4e 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -109,8 +109,8 @@
% Key names may contain any tokens, as they are handled internally
% using \cs{tl_to_str:n}. As discussed in
% section~\ref{sec:l3keys:subdivision}, it is suggested that the character
-% |/| is reserved for sub-division of keys into logical
-% groups. Functions and variables are \emph{not} expanded when creating
+% |/| is reserved for sub-division of keys into different subsets.
+% Functions and variables are \emph{not} expanded when creating
% key names, and so
% \begin{verbatim}
% \tl_set:Nn \l_mymodule_tmp_tl { key }
@@ -323,9 +323,15 @@
% \begin{syntax}
% \meta{key} .groups:n = \Arg{groups}
% \end{syntax}
-% Defines \meta{key} as belonging to the \meta{groups} declared. Groups
+% Defines \meta{key} as belonging to the \meta{groups} (a
+% comma-separated list). Groups
% provide a \enquote{secondary axis} for selectively setting keys, and are
% described in Section~\ref{sec:l3keys:selective}.
+% \begin{texnote}
+% The \meta{groups} argument is turned into a string then
+% interpreted as a comma-separated list, so group names cannot
+% contain commas nor start or end with a space character.
+% \end{texnote}
% \end{function}
%
% \begin{function}[added = 2016-11-22]{.inherit:n}
@@ -334,7 +340,7 @@
% \end{syntax}
% Specifies that the \meta{key} path should inherit the keys listed
% as any of the \meta{parents} (a comma list), which can be a module
-% or a subgroup. For example, after setting
+% or a sub-division thereof. For example, after setting
% \begin{verbatim}
% \keys_define:nn { foo } { test .code:n = \tl_show:n {#1} }
% \keys_define:nn { } { bar .inherit:n = foo }
@@ -541,21 +547,21 @@
% \label{sec:l3keys:subdivision}
%
% When creating large numbers of keys, it may be desirable to divide
-% them into several sub-groups for a given module. This can be achieved
+% them into several subsets for a given module. This can be achieved
% either by adding a sub-division to the module name:
% \begin{verbatim}
-% \keys_define:nn { mymodule / subgroup }
+% \keys_define:nn { mymodule / subset }
% { key .code:n = code }
% \end{verbatim}
% or to the key name:
% \begin{verbatim}
% \keys_define:nn { mymodule }
-% { subgroup / key .code:n = code }
+% { subset / key .code:n = code }
% \end{verbatim}
% As illustrated, the best choice of token for sub-dividing keys in
% this way is |/|. This is because of the method that is
% used to represent keys internally. Both of the above code fragments
-% set the same key, which has full name \texttt{mymodule/subgroup/key}.
+% set the same key, which has full name \texttt{mymodule/subset/key}.
%
% As illustrated in the next section, this subdivision is
% particularly relevant to making multiple choices.
@@ -856,29 +862,29 @@
% groups to be made \enquote{active}, or by marking one or more groups to
% be ignored in key setting.
%
-% \begin{function}[added = 2013-07-14, updated = 2019-01-29]
+% \begin{function}[added = 2024-01-10]
% {
-% \keys_set_filter:nnn, \keys_set_filter:nnV,
-% \keys_set_filter:nnv, \keys_set_filter:nno,
-% \keys_set_filter:nnnN, \keys_set_filter:nnVN,
-% \keys_set_filter:nnvN, \keys_set_filter:nnoN,
-% \keys_set_filter:nnnnN, \keys_set_filter:nnVnN,
-% \keys_set_filter:nnvnN, \keys_set_filter:nnonN,
+% \keys_set_exclude_groups:nnn, \keys_set_exclude_groups:nnV,
+% \keys_set_exclude_groups:nnv, \keys_set_exclude_groups:nno,
+% \keys_set_exclude_groups:nnnN, \keys_set_exclude_groups:nnVN,
+% \keys_set_exclude_groups:nnvN, \keys_set_exclude_groups:nnoN,
+% \keys_set_exclude_groups:nnnnN, \keys_set_exclude_groups:nnVnN,
+% \keys_set_exclude_groups:nnvnN, \keys_set_exclude_groups:nnonN,
% }
% \begin{syntax}
-% \cs{keys_set_filter:nnn} \Arg{module} \Arg{groups} \Arg{keyval list}
-% \cs{keys_set_filter:nnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{tl}
-% \cs{keys_set_filter:nnnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{root} \meta{tl}
+% \cs{keys_set_exclude_groups:nnn} \Arg{module} \Arg{groups} \Arg{keyval list}
+% \cs{keys_set_exclude_groups:nnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{tl}
+% \cs{keys_set_exclude_groups:nnnnN} \Arg{module} \Arg{groups} \Arg{keyval list} \meta{root} \meta{tl}
% \end{syntax}
-% Activates key filtering in an \enquote{opt-out} sense: keys assigned to any
-% of the \meta{groups} specified are ignored. The \meta{groups} are
+% Sets keys by excluding those in the specificied \meta{groups}.
+% The \meta{groups} are
% given as a comma-separated list. Unknown keys are not assigned to any
% group and are thus always set. The key--value pairs for each
% key which is filtered out are stored in the \meta{tl} in a
% comma-separated form (\emph{i.e.}~an edited version of the \meta{keyval
-% list}). The \cs{keys_set_filter:nnn} version skips this stage.
+% list}). The \cs{keys_set_exclude_groups:nnn} version skips this stage.
%
-% Use of \cs{keys_set_filter:nnnN} can be nested, with the correct residual
+% Use of \cs{keys_set_exclude_groups:nnnN} can be nested, with the correct residual
% \meta{keyval list} returned at each stage. In the version which takes
% a \meta{root} argument, the key list is returned relative to that point
% in the key tree. In the cases without a \meta{root} argument, only
@@ -1662,7 +1668,7 @@
% \end{variable}
%
% \begin{variable}{\l_@@_selective_bool, \l_@@_filtered_bool}
-% Two flags for using key groups: one to indicate that \enquote{selective}
+% Two booleans for using key groups: one to indicate that \enquote{selective}
% setting is active, a second to specify which type (\enquote{opt-in}
% or \enquote{opt-out}).
% \begin{macrocode}
@@ -1755,6 +1761,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_cs_undefine:c}
+% Local version of \cs{cs_undefine:c} to avoid sprinkling
+% \cs{tex_undefined:D} everywhere.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cs_undefine:c #1
+ {
+ \if_cs_exist:w #1 \cs_end:
+ \else:
+ \use_i:nnnn
+ \fi:
+ \cs_set_eq:cN {#1} \tex_undefined:D
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{The key defining mechanism}
%
% \begin{macro}{\keys_define:nn, \keys_define:ne, \keys_define:nx}
@@ -2061,9 +2082,8 @@
{
\tl_if_empty:nTF {#1}
{
- \cs_set_eq:cN
+ \@@_cs_undefine:c
{ \c_@@_default_root_str \l_keys_path_str }
- \tex_undefined:D
}
{
\cs_set_nopar:cpe
@@ -2084,11 +2104,11 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_groups_set:n #1
{
- \clist_set:Nn \l_@@_groups_clist {#1}
+ \clist_set:Ne \l_@@_groups_clist { \tl_to_str:n {#1} }
\clist_if_empty:NTF \l_@@_groups_clist
{
- \cs_set_eq:cN { \c_@@_groups_root_str \l_keys_path_str }
- \tex_undefined:D
+ \@@_cs_undefine:c
+ { \c_@@_groups_root_str \l_keys_path_str }
}
{
\cs_set_eq:cN { \c_@@_groups_root_str \l_keys_path_str }
@@ -2222,9 +2242,8 @@
\clist_map_inline:nn
{ code , default , groups , inherit , type , check }
{
- \cs_set_eq:cN
+ \@@_cs_undefine:c
{ \tl_use:c { c_@@_ ##1 _root_str } \l_keys_path_str }
- \tex_undefined:D
}
}
% \end{macrocode}
@@ -2254,9 +2273,8 @@
{ \c_@@_check_root_str \l_keys_path_str }
{ @@_check_ #1 : }
{
- \cs_set_eq:cN
+ \@@_cs_undefine:c
{ \c_@@_check_root_str \l_keys_path_str }
- \tex_undefined:D
}
}
}
@@ -2831,7 +2849,7 @@
% \keys_set_known:no
% }
% \begin{macro}{\@@_set_known:nnn}
-% Setting known keys simply means setting the appropriate flag, then
+% Setting known keys simply means setting the appropriate boolean, then
% running the standard code. To allow for nested setting, any existing
% value of \cs{l_@@_unused_clist} is saved on the stack and reset
% afterwards. Note that for speed/simplicity reasons we use a \texttt{tl}
@@ -2853,8 +2871,8 @@
{
\clist_clear:N \l_@@_unused_clist
\@@_set_known:nnn {#2} {#3} {#4}
- \__kernel_tl_set:Ne #5 { \exp_not:o \l_@@_unused_clist }
- \__kernel_tl_set:Ne \l_@@_unused_clist { \exp_not:n {#1} }
+ \__kernel_tl_set:Nx #5 { \exp_not:o \l_@@_unused_clist }
+ \__kernel_tl_set:Nx \l_@@_unused_clist { \exp_not:n {#1} }
}
\cs_new_protected:Npn \keys_set_known:nn #1#2
{ \@@_set_known:nnn \q_@@_no_value {#1} {#2} }
@@ -2887,21 +2905,21 @@
%
% \begin{macro}
% {
-% \keys_set_filter:nnnN, \keys_set_filter:nnVN, \keys_set_filter:nnvN,
-% \keys_set_filter:nnoN
+% \keys_set_exclude_groups:nnnN, \keys_set_exclude_groups:nnVN,
+% \keys_set_exclude_groups:nnvN, \keys_set_exclude_groups:nnoN
% }
% \begin{macro}
% {
-% \keys_set_filter:nnnnN, \keys_set_filter:nnVnN,
-% \keys_set_filter:nnvnN, \keys_set_filter:nnonN
+% \keys_set_exclude_groups:nnnnN, \keys_set_exclude_groups:nnVnN,
+% \keys_set_exclude_groups:nnvnN, \keys_set_exclude_groups:nnonN
% }
-% \begin{macro}{\@@_set_filter:nnnnnN}
+% \begin{macro}{\@@_set_exclude_groups:nnnnnN}
% \begin{macro}
% {
-% \keys_set_filter:nnn, \keys_set_filter:nnV, \keys_set_filter:nnv,
-% \keys_set_filter:nno
+% \keys_set_exclude_groups:nnn, \keys_set_exclude_groups:nnV,
+% \keys_set_exclude_groups:nnv, \keys_set_exclude_groups:nno
% }
-% \begin{macro}{\@@_set_filter:nnnn}
+% \begin{macro}{\@@_set_exclude_groups:nnnn}
% \begin{macro}
% {
% \keys_set_groups:nnn, \keys_set_groups:nnV, \keys_set_groups:nnv,
@@ -2909,35 +2927,35 @@
% }
% \begin{macro}{\@@_set_selective:nnn}
% \begin{macro}{\@@_set_selective:nnnn}
-% The idea of setting keys in a selective manner again uses flags
+% The idea of setting keys in a selective manner again uses booleans
% wrapped around the basic code. The comments on \cs{keys_set_known:nnN}
% also apply here. We have a bit more shuffling to do to keep everything
% nestable.
% \begin{macrocode}
-\cs_new_protected:Npn \keys_set_filter:nnnN #1#2#3#4
+\cs_new_protected:Npn \keys_set_exclude_groups:nnnN #1#2#3#4
{
- \exp_args:No \@@_set_filter:nnnnnN
+ \exp_args:No \@@_set_exclude_groups:nnnnnN
\l_@@_unused_clist
\q_@@_no_value {#1} {#2} {#3} #4
}
-\cs_generate_variant:Nn \keys_set_filter:nnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \keys_set_filter:nnnnN #1#2#3#4#5
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \keys_set_exclude_groups:nnnnN #1#2#3#4#5
{
- \exp_args:No \@@_set_filter:nnnnnN
+ \exp_args:No \@@_set_exclude_groups:nnnnnN
\l_@@_unused_clist {#4} {#1} {#2} {#3} #5
}
-\cs_generate_variant:Nn \keys_set_filter:nnnnN { nnV , nnv , nno }
-\cs_new_protected:Npn \@@_set_filter:nnnnnN #1#2#3#4#5#6
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnnnN { nnV , nnv , nno }
+\cs_new_protected:Npn \@@_set_exclude_groups:nnnnnN #1#2#3#4#5#6
{
\clist_clear:N \l_@@_unused_clist
- \@@_set_filter:nnnn {#2} {#3} {#4} {#5}
- \__kernel_tl_set:Ne #6 { \exp_not:o \l_@@_unused_clist }
- \__kernel_tl_set:Ne \l_@@_unused_clist { \exp_not:n {#1} }
+ \@@_set_exclude_groups:nnnn {#2} {#3} {#4} {#5}
+ \__kernel_tl_set:Nx #6 { \exp_not:o \l_@@_unused_clist }
+ \__kernel_tl_set:Nx \l_@@_unused_clist { \exp_not:n {#1} }
}
-\cs_new_protected:Npn \keys_set_filter:nnn #1#2#3
- {\@@_set_filter:nnnn \q_@@_no_value {#1} {#2} {#3} }
-\cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno }
-\cs_new_protected:Npn \@@_set_filter:nnnn #1#2#3#4
+\cs_new_protected:Npn \keys_set_exclude_groups:nnn #1#2#3
+ {\@@_set_exclude_groups:nnnn \q_@@_no_value {#1} {#2} {#3} }
+\cs_generate_variant:Nn \keys_set_exclude_groups:nnn { nnV , nnv , nno }
+\cs_new_protected:Npn \@@_set_exclude_groups:nnnn #1#2#3#4
{
\use:e
{
@@ -2981,7 +2999,8 @@
{ \exp_args:No \@@_set_selective:nnnn \l_@@_selective_seq }
\cs_new_protected:Npn \@@_set_selective:nnnn #1#2#3#4
{
- \seq_set_from_clist:Nn \l_@@_selective_seq {#3}
+ \exp_args:NNe \seq_set_from_clist:Nn
+ \l_@@_selective_seq { \tl_to_str:n {#3} }
\@@_set:nn {#2} {#4}
\tl_set:Nn \l_@@_selective_seq {#1}
}
@@ -3044,7 +3063,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_set_keyval:nnn #1#2#3
{
- \__kernel_tl_set:Ne \l_keys_path_str
+ \__kernel_tl_set:Nx \l_keys_path_str
{
\tl_if_blank:nF {#1}
{ #1 / }
@@ -3118,23 +3137,21 @@
% of groups which apply to a key with the list of those which have been
% set active. That requires two mappings, and again a different outcome
% depending on whether opt-in or opt-out is set.
-% We cannot replace the clist mapping by \cs{clist_if_in:NnTF} because
-% catcodes may not be the same; they cannot be normalized easily in the
-% clist because of the remote possibility that some items need braces
-% if they involve commas or leading/trailing spaces.
+% It is safe to use \cs{clist_if_in:NnTF} because
+% both \cs{l_@@_selective_seq} and \cs{l_@@_groups_clist} contain the
+% groups as strings, without leading/trailing spaces in any item,
+% since the \pkg{l3clist} functions were applied to the result of
+% applying \cs{tl_to_str:n}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_check_groups:
{
\bool_set_false:N \l_@@_tmp_bool
\seq_map_inline:Nn \l_@@_selective_seq
{
- \clist_map_inline:Nn \l_@@_groups_clist
+ \clist_if_in:NnT \l_@@_groups_clist {##1}
{
- \str_if_eq:nnT {##1} {####1}
- {
- \bool_set_true:N \l_@@_tmp_bool
- \clist_map_break:n \seq_map_break:
- }
+ \bool_set_true:N \l_@@_tmp_bool
+ \seq_map_break:
}
}
\bool_if:NTF \l_@@_tmp_bool
@@ -3325,7 +3342,7 @@
}
\cs_new_protected:Npn \@@_store_unused_aux:
{
- \__kernel_tl_set:Ne \l_@@_relative_tl
+ \__kernel_tl_set:Nx \l_@@_relative_tl
{ \exp_args:No \@@_trim_spaces:n \l_@@_relative_tl }
\use:e
{
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx
index 8f72634dc5..f8846e7cb8 100644
--- a/macros/latex/contrib/l3kernel/l3legacy.dtx
+++ b/macros/latex/contrib/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx
index 59e49857e7..55f33b80a5 100644
--- a/macros/latex/contrib/l3kernel/l3luatex.dtx
+++ b/macros/latex/contrib/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx
index b504e402f7..dced50e37f 100644
--- a/macros/latex/contrib/l3kernel/l3msg.dtx
+++ b/macros/latex/contrib/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -634,7 +634,7 @@
% \cs{msg_expandable_error:nnnnnn} \Arg{module} \Arg{message} \Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four}
% \end{syntax}
% Issues an \enquote{Undefined error} message from \TeX{} itself
-% using the undefined control sequence \cs{::error} then prints
+% using the undefined control sequence \cs{???} then prints
% \enquote{! \meta{module}: }\meta{error message}, which should be
% short. With default settings, anything beyond approximately $60$
% characters long (or bytes in some engines) is cropped. A leading
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx
index 58c7828ac9..66e4056a05 100644
--- a/macros/latex/contrib/l3kernel/l3names.dtx
+++ b/macros/latex/contrib/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf
index 0a5bc3794d..4719901866 100644
--- a/macros/latex/contrib/l3kernel/l3news.pdf
+++ b/macros/latex/contrib/l3kernel/l3news.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf
index ca854aca2d..155535a4fd 100644
--- a/macros/latex/contrib/l3kernel/l3news01.pdf
+++ b/macros/latex/contrib/l3kernel/l3news01.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf
index abc710c5e8..678d28fe51 100644
--- a/macros/latex/contrib/l3kernel/l3news02.pdf
+++ b/macros/latex/contrib/l3kernel/l3news02.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf
index 67c3c65908..c4d3285b7e 100644
--- a/macros/latex/contrib/l3kernel/l3news03.pdf
+++ b/macros/latex/contrib/l3kernel/l3news03.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf
index aeae2e688f..996d2face0 100644
--- a/macros/latex/contrib/l3kernel/l3news04.pdf
+++ b/macros/latex/contrib/l3kernel/l3news04.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf
index 33026d2cdc..daea9c248a 100644
--- a/macros/latex/contrib/l3kernel/l3news05.pdf
+++ b/macros/latex/contrib/l3kernel/l3news05.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf
index cab5c11273..8193ffab13 100644
--- a/macros/latex/contrib/l3kernel/l3news06.pdf
+++ b/macros/latex/contrib/l3kernel/l3news06.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf
index c5a3d300a5..9492361a4a 100644
--- a/macros/latex/contrib/l3kernel/l3news07.pdf
+++ b/macros/latex/contrib/l3kernel/l3news07.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf
index 5a5517c002..62d965b72f 100644
--- a/macros/latex/contrib/l3kernel/l3news08.pdf
+++ b/macros/latex/contrib/l3kernel/l3news08.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf
index 95f1aa0ee5..988790dadf 100644
--- a/macros/latex/contrib/l3kernel/l3news09.pdf
+++ b/macros/latex/contrib/l3kernel/l3news09.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf
index 1b8dc9af29..6c13a5cbb1 100644
--- a/macros/latex/contrib/l3kernel/l3news10.pdf
+++ b/macros/latex/contrib/l3kernel/l3news10.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf
index bfb59818be..d78d434fa7 100644
--- a/macros/latex/contrib/l3kernel/l3news11.pdf
+++ b/macros/latex/contrib/l3kernel/l3news11.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf
index eddbad6dca..6f9eac3b37 100644
--- a/macros/latex/contrib/l3kernel/l3news12.pdf
+++ b/macros/latex/contrib/l3kernel/l3news12.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx
index 863d3681c3..d1e2a7e185 100644
--- a/macros/latex/contrib/l3kernel/l3pdf.dtx
+++ b/macros/latex/contrib/l3kernel/l3pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -275,7 +275,7 @@
% \end{variable}
%
% \begin{variable}{\g_@@_init_bool}
-% A flag so we have some chance of avoiding setting things we are not
+% A boolean so we have some chance of avoiding setting things we are not
% allowed to. As we are potentially early in the format, we have to work
% a bit harder than ideal.
% \begin{macrocode}
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf
index 4a23b2563d..ea2bf15903 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.pdf
+++ b/macros/latex/contrib/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx
index 866537f904..0b134d713f 100644
--- a/macros/latex/contrib/l3kernel/l3prg.dtx
+++ b/macros/latex/contrib/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -171,6 +171,10 @@
% state. There must be a return statement for each branch; failing to do
% so will result in erroneous output if that branch is executed.
%
+% The special case where the code of a conditional ends with
+% \cs{prg_return_true:} \cs{else:} \cs{prg_return_false:} \cs{fi:} is
+% optimized.
+%
% \begin{function}[updated = 2023-05-26]
% {
% \prg_new_eq_conditional:NNn,
@@ -1789,9 +1793,10 @@
\tex_catcode:D `\^^@ = 2 \exp_stop_f:
\cs_new:Npn \group_align_safe_begin:
{ \exp:w \if_false: { \fi: `^^@ \exp_stop_f: }
-\group_end:
+\tex_catcode:D `\^^@ = 1 \exp_stop_f:
\cs_new:Npn \group_align_safe_end:
- { \if_int_compare:w `{ = \c_zero_int } \fi: }
+ { \exp:w `^^@ \if_false: } \fi: \exp_stop_f: }
+\group_end:
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index f8bb23e765..f6190ebee7 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -43,16 +43,16 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
% \begin{documentation}
%
-% \pkg{expl3} implements a \meta{property list} data type, which contain
+% \pkg{expl3} implements a property list data type, which contain
% an unordered list of entries each of which consists of a \meta{key} and
% an associated \meta{value}. The \meta{key} and \meta{value} may both
-% be any \meta{balanced text}, the \meta{key} is processed using
+% be any balanced text, and the \meta{key} is processed using
% \cs{tl_to_str:n}, meaning that category codes are ignored. It is possible to
% map functions to property lists such that the function is applied to every
% key--value pair within the list.
@@ -1266,8 +1266,8 @@
% updated entry is placed at the same spot as the original \meta{key}
% in the property list, preserving the order of entries.
% \begin{macrocode}
-\cs_new_protected:Npn \prop_put:Nnn { \@@_put:NNnn \__kernel_tl_set:Ne }
-\cs_new_protected:Npn \prop_gput:Nnn { \@@_put:NNnn \__kernel_tl_gset:Ne }
+\cs_new_protected:Npn \prop_put:Nnn { \@@_put:NNnn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \prop_gput:Nnn { \@@_put:NNnn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_put:NNnn #1#2#3#4
{
\tl_set:Nn \l_@@_internal_tl
@@ -1329,9 +1329,9 @@
% convert the key to a string using \cs{tl_to_str:n}.
% \begin{macrocode}
\cs_new_protected:Npn \prop_put_if_new:Nnn
- { \@@_put_if_new:NNnn \__kernel_tl_set:Ne }
+ { \@@_put_if_new:NNnn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \prop_gput_if_new:Nnn
- { \@@_put_if_new:NNnn \__kernel_tl_gset:Ne }
+ { \@@_put_if_new:NNnn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_put_if_new:NNnn #1#2#3#4
{
\tl_set:Nn \l_@@_internal_tl
diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx
index 80b953353f..281b8453ad 100644
--- a/macros/latex/contrib/l3kernel/l3quark.dtx
+++ b/macros/latex/contrib/l3kernel/l3quark.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -970,7 +970,7 @@
% Can't use \cs{scan_new:N} yet because \pkg{l3tl} isn't loaded,
% so define \cs{s_stop} by hand and add it to \cs{g_@@_marks_tl}.
% We also add the scan marks declared earlier to the pool here.
-% Since they lives in a different namespace, a little \pkg{l3docstrip}
+% Since they lives in a different namespace, a little \pkg{DocStrip}
% cheating is necessary.
% \begin{macrocode}
\cs_new_eq:NN \s_stop \scan_stop:
diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx
index 37245cb0b9..952c115d29 100644
--- a/macros/latex/contrib/l3kernel/l3regex.dtx
+++ b/macros/latex/contrib/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -228,7 +228,7 @@
% Matches any of the specified tokens.
% \item[{[\char`\^\ldots{}]}] Negative character class.
% Matches any token other than the specified characters.
-% \item[{x-y}] Within a character class, this denotes a range (can be
+% \item[{[x-y]}] Within a character class, this denotes a range (can be
% used with escaped characters).
% \item[{[:\meta{name}:]}] Within a character class (one more set of
% brackets), this denotes the \textsc{posix} character class
@@ -928,9 +928,6 @@
% \item Does |\K| really need a new state for itself?
% \item When compiling, use a boolean \texttt{in_cs} and less magic
% numbers.
-% \item Instead of checking whether the character is special or
-% alphanumeric using its character code, check if it is special in
-% regexes with \cs[no-index]{cs_if_exist} tests.
% \end{itemize}
%
% The following features are likely to be implemented at some point
@@ -1135,10 +1132,10 @@
% Empty a \tn{toks} or set it to a value, given its number.
% \begin{macrocode}
\cs_new_protected:Npn \@@_toks_clear:N #1
- { \@@_toks_set:Nn #1 { } }
+ { \tex_toks:D #1 = { } }
\cs_new_eq:NN \@@_toks_set:Nn \tex_toks:D
\cs_new_protected:Npn \@@_toks_set:No #1
- { \tex_toks:D #1 \exp_after:wN }
+ { \tex_toks:D #1 = \exp_after:wN }
% \end{macrocode}
% \end{macro}
%
@@ -1167,20 +1164,24 @@
% \cs{@@_toks_put_right:Ne} is provided because it is more
% efficient than \texttt{e}-expanding with \cs{exp_not:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_toks_put_left:Ne #1#2
+\cs_if_exist:NTF \tex_etokspre:D
+ { \cs_new_eq:NN \@@_toks_put_left:Ne \tex_etokspre:D }
{
- \cs_set_nopar:Npe \@@_tmp:w { #2 }
- \tex_toks:D #1 \exp_after:wN \exp_after:wN \exp_after:wN
- { \exp_after:wN \@@_tmp:w \tex_the:D \tex_toks:D #1 }
+ \cs_new_protected:Npn \@@_toks_put_left:Ne #1#2
+ { \tex_toks:D #1 = \tex_expanded:D {{ #2 \tex_the:D \tex_toks:D #1 }} }
}
-\cs_new_protected:Npn \@@_toks_put_right:Ne #1#2
+\cs_if_exist:NTF \tex_etoksapp:D
+ { \cs_new_eq:NN \@@_toks_put_right:Ne \tex_etoksapp:D }
{
- \cs_set_nopar:Npe \@@_tmp:w {#2}
- \tex_toks:D #1 \exp_after:wN
- { \tex_the:D \tex_toks:D \exp_after:wN #1 \@@_tmp:w }
+ \cs_new_protected:Npn \@@_toks_put_right:Ne #1#2
+ { \tex_toks:D #1 = \tex_expanded:D {{ \tex_the:D \tex_toks:D #1 #2 }} }
+ }
+\cs_if_exist:NTF \tex_toksapp:D
+ { \cs_new_eq:NN \@@_toks_put_right:Nn \tex_toksapp:D }
+ {
+ \cs_new_protected:Npn \@@_toks_put_right:Nn #1#2
+ { \tex_toks:D #1 = \exp_after:wN { \tex_the:D \tex_toks:D #1 #2 } }
}
-\cs_new_protected:Npn \@@_toks_put_right:Nn #1#2
- { \tex_toks:D #1 \exp_after:wN { \tex_the:D \tex_toks:D #1 #2 } }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1203,15 +1204,13 @@
% Item of intarray, with a default value.
% \begin{macrocode}
\cs_new:Npn \@@_intarray_item:NnF #1#2
- { \exp_args:Nf \@@_intarray_item_aux:nNF { \int_eval:n {#2} } #1 }
+ { \exp_args:No \@@_intarray_item_aux:nNF { \tex_the:D \@@_int_eval:w #2 } #1 }
\cs_new:Npn \@@_intarray_item_aux:nNF #1#2
{
\if_int_compare:w #1 > \c_zero_int
- \exp_after:wN \use_i:nn
- \else:
- \exp_after:wN \use_ii:nn
+ \exp_after:wN \use_ii:nnn
\fi:
- { \__kernel_intarray_item:Nn #2 {#1} }
+ \use_ii:nn { \__kernel_intarray_item:Nn #2 {#1} }
}
% \end{macrocode}
% \end{macro}
@@ -1465,14 +1464,12 @@
\if_int_compare:w \l_@@_curr_char_int > `Z \exp_stop_f:
\if_int_compare:w \l_@@_curr_char_int > `z \exp_stop_f: \else:
\if_int_compare:w \l_@@_curr_char_int < `a \exp_stop_f: \else:
- \int_sub:Nn \l_@@_case_changed_char_int
- { \c_@@_ascii_lower_int }
+ \int_sub:Nn \l_@@_case_changed_char_int \c_@@_ascii_lower_int
\fi:
\fi:
\else:
\if_int_compare:w \l_@@_curr_char_int < `A \exp_stop_f: \else:
- \int_add:Nn \l_@@_case_changed_char_int
- { \c_@@_ascii_lower_int }
+ \int_add:Nn \l_@@_case_changed_char_int \c_@@_ascii_lower_int
\fi:
\fi:
\cs_set_eq:NN \@@_maybe_compute_ccc: \prg_do_nothing:
@@ -1510,12 +1507,12 @@
\or: 1000000 \or: 4000000 \else: 1*0
\fi:
}
-\cs_new_protected:Npn \@@_item_catcode:nT #1
+\prg_new_protected_conditional:Npnn \@@_item_catcode:n #1 { T }
{
- \if_int_odd:w \int_eval:n { #1 / \@@_item_catcode: } \exp_stop_f:
- \exp_after:wN \use:n
+ \if_int_odd:w \@@_int_eval:w #1 / \@@_item_catcode: \scan_stop:
+ \prg_return_true:
\else:
- \exp_after:wN \use_none:n
+ \prg_return_false:
\fi:
}
\cs_new_protected:Npn \@@_item_catcode_reverse:nT #1#2
@@ -1539,9 +1536,9 @@
}
\cs_new_protected:Npn \@@_item_exact_cs:n #1
{
- \int_compare:nNnTF \l_@@_curr_catcode_int = 0
+ \int_compare:nNnTF \l_@@_curr_catcode_int = \c_zero_int
{
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{ \scan_stop: \@@_curr_cs_to_str: \scan_stop: }
\tl_if_in:noTF { \scan_stop: #1 \scan_stop: }
\l_@@_internal_a_tl
@@ -1560,7 +1557,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_item_cs:n #1
{
- \int_compare:nNnT \l_@@_curr_catcode_int = 0
+ \int_compare:nNnT \l_@@_curr_catcode_int = \c_zero_int
{
\group_begin:
\@@_single_match:
@@ -1729,7 +1726,7 @@
\cs_set:Npn \@@_escape_escaped:N ##1 { #2 }
\cs_set:Npn \@@_escape_raw:N ##1 { #3 }
\@@_standard_escapechar:
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{ \__kernel_str_to_other_fast:n {#4} }
\tl_put_right:Ne \l_@@_internal_a_tl
{
@@ -1936,13 +1933,13 @@
% lowercase letters, which we need to detect and replace by their
% uppercase counterpart.
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_hexadecimal_use:N #1 { TF }
+\cs_new:Npn \@@_hexadecimal_use:NTF #1
{
- \if_int_compare:w 1 < "1 \token_to_str:N #1 \exp_stop_f:
- #1 \prg_return_true:
+ \if_int_compare:w \c_one_int < "1 \token_to_str:N #1 \exp_stop_f:
+ #1
\else:
\if_case:w
- \int_eval:n { \exp_after:wN ` \token_to_str:N #1 - `a }
+ \@@_int_eval:w \exp_after:wN ` \token_to_str:N #1 - `a \scan_stop:
A
\or: B
\or: C
@@ -1950,11 +1947,10 @@
\or: E
\or: F
\else:
- \prg_return_false:
- \exp_after:wN \use_none:n
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
- \prg_return_true:
\fi:
+ \use_i:nn
}
% \end{macrocode}
% \end{macro}
@@ -1986,43 +1982,57 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_char_if_special:N #1 { TF }
{
- \if_int_compare:w `#1 > `Z \exp_stop_f:
- \if_int_compare:w `#1 > `z \exp_stop_f:
- \if_int_compare:w `#1 < \c_@@_ascii_max_int
- \prg_return_true: \else: \prg_return_false: \fi:
- \else:
- \if_int_compare:w `#1 < `a \exp_stop_f:
- \prg_return_true: \else: \prg_return_false: \fi:
- \fi:
+ \if:w
+ T
+ \if_int_compare:w `#1 > `Z \exp_stop_f:
+ \if_int_compare:w `#1 > `z \exp_stop_f:
+ \if_int_compare:w `#1 < \c_@@_ascii_max_int
+ \else: F \fi:
+ \else:
+ \if_int_compare:w `#1 < `a \exp_stop_f:
+ \else: F \fi:
+ \fi:
+ \else:
+ \if_int_compare:w `#1 > `9 \exp_stop_f:
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ \else: F \fi:
+ \else:
+ \if_int_compare:w `#1 < `0 \exp_stop_f:
+ \if_int_compare:w `#1 < `\ \exp_stop_f:
+ F \fi:
+ \else: F \fi:
+ \fi:
+ \fi:
+ T
+ \prg_return_true:
\else:
- \if_int_compare:w `#1 > `9 \exp_stop_f:
- \if_int_compare:w `#1 < `A \exp_stop_f:
- \prg_return_true: \else: \prg_return_false: \fi:
- \else:
- \if_int_compare:w `#1 < `0 \exp_stop_f:
- \if_int_compare:w `#1 < `\ \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \else: \prg_return_false: \fi:
- \fi:
+ \prg_return_false:
\fi:
}
\prg_new_conditional:Npnn \@@_char_if_alphanumeric:N #1 { TF }
{
- \if_int_compare:w `#1 > `Z \exp_stop_f:
- \if_int_compare:w `#1 > `z \exp_stop_f:
- \prg_return_false:
- \else:
- \if_int_compare:w `#1 < `a \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \fi:
+ \if:w
+ T
+ \if_int_compare:w `#1 > `Z \exp_stop_f:
+ \if_int_compare:w `#1 > `z \exp_stop_f:
+ F
+ \else:
+ \if_int_compare:w `#1 < `a \exp_stop_f:
+ F \fi:
+ \fi:
+ \else:
+ \if_int_compare:w `#1 > `9 \exp_stop_f:
+ \if_int_compare:w `#1 < `A \exp_stop_f:
+ F \fi:
+ \else:
+ \if_int_compare:w `#1 < `0 \exp_stop_f:
+ F \fi:
+ \fi:
+ \fi:
+ T
+ \prg_return_true:
\else:
- \if_int_compare:w `#1 > `9 \exp_stop_f:
- \if_int_compare:w `#1 < `A \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \else:
- \if_int_compare:w `#1 < `0 \exp_stop_f:
- \prg_return_false: \else: \prg_return_true: \fi:
- \fi:
+ \prg_return_false:
\fi:
}
% \end{macrocode}
@@ -2179,17 +2189,14 @@
% Besides, the expanding behaviour of \cs{if:w} is very useful as that
% means we can use \cs{c_left_brace_str} and the like.
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_two_if_eq:NNNN #1#2#3#4 { TF }
+\cs_new:Npn \@@_two_if_eq:NNNNTF #1#2#3#4
{
\if_meaning:w #1 #3
\if:w #2 #4
- \prg_return_true:
- \else:
- \prg_return_false:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
- \else:
- \prg_return_false:
\fi:
+ \use_ii:nn
}
% \end{macrocode}
% \end{macro}
@@ -2220,17 +2227,14 @@
% Test used when grabbing digits for the |{m,n}| quantifier.
% It only accepts non-escaped digits.
% \begin{macrocode}
-\prg_new_conditional:Npnn \@@_if_raw_digit:NN #1#2 { TF }
+\cs_new:Npn \@@_if_raw_digit:NNTF #1#2
{
\if_meaning:w \@@_compile_raw:N #1
- \if_int_compare:w 1 < 1 #2 \exp_stop_f:
- \prg_return_true:
- \else:
- \prg_return_false:
+ \if_int_compare:w \c_one_int < 1 #2 \exp_stop_f:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
- \else:
- \prg_return_false:
\fi:
+ \use_ii:nn
}
% \end{macrocode}
% \end{macro}
@@ -2284,12 +2288,12 @@
% and special characters are normal. Also, for every raw character, we
% must look ahead for a possible raw dash.
% \begin{macrocode}
-\cs_new:Npn \@@_if_in_class:TF
+\prg_new_conditional:Npnn \@@_if_in_class: { TF }
{
\if_int_odd:w \l_@@_mode_int
- \exp_after:wN \use_i:nn
+ \prg_return_true:
\else:
- \exp_after:wN \use_ii:nn
+ \prg_return_false:
\fi:
}
% \end{macrocode}
@@ -2302,14 +2306,12 @@
\cs_new:Npn \@@_if_in_cs:TF
{
\if_int_odd:w \l_@@_mode_int
- \exp_after:wN \use_ii:nn
\else:
\if_int_compare:w \l_@@_mode_int < \c_@@_outer_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
- \else:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nnn
\fi:
\fi:
+ \use_ii:nn
}
% \end{macrocode}
% \end{macro}
@@ -2321,14 +2323,13 @@
\cs_new:Npn \@@_if_in_class_or_catcode:TF
{
\if_int_odd:w \l_@@_mode_int
- \exp_after:wN \use_i:nn
\else:
\if_int_compare:w \l_@@_mode_int > \c_@@_outer_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nn
\else:
- \exp_after:wN \exp_after:wN \exp_after:wN \use_ii:nn
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
\fi:
+ \use_i:nn
}
% \end{macrocode}
% \end{macro}
@@ -2339,12 +2340,12 @@
% it applies (modes $23$ and $63$). This is used to tweak how left
% brackets behave in modes $2$ and $6$.
% \begin{macrocode}
-\cs_new:Npn \@@_if_within_catcode:TF
+\prg_new_conditional:Npnn \@@_if_within_catcode: { TF }
{
\if_int_compare:w \l_@@_mode_int > \c_@@_outer_mode_int
- \exp_after:wN \use_i:nn
+ \prg_return_true:
\else:
- \exp_after:wN \use_ii:nn
+ \prg_return_false:
\fi:
}
% \end{macrocode}
@@ -2357,15 +2358,14 @@
\cs_new_protected:Npn \@@_chk_c_allowed:T
{
\if_int_compare:w \l_@@_mode_int = \c_@@_outer_mode_int
- \exp_after:wN \use:n
\else:
\if_int_compare:w \l_@@_mode_int = \c_@@_class_mode_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use:n
\else:
\msg_error:nn { regex } { c-bad-mode }
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n
+ \exp_after:wN \use_i:nnn
\fi:
\fi:
+ \use:n
}
% \end{macrocode}
% \end{macro}
@@ -2424,7 +2424,7 @@
\msg_error:nne { regex } { missing-rparen }
{ \int_use:N \l_@@_group_level_int }
\prg_replicate:nn
- { \l_@@_group_level_int }
+ \l_@@_group_level_int
{
\tl_build_put_right:Nn \l_@@_build_tl
{
@@ -2712,7 +2712,7 @@
{ \@@_compile_special:N \c_right_brace_str }
{
\exp_args:No \@@_compile_quantifier_lazyness:nnNN
- { \int_use:N \l_@@_internal_a_int } { 0 }
+ { \int_use:N \l_@@_internal_a_int } 0
}
{ \@@_compile_special:N , }
{
@@ -2818,21 +2818,19 @@
% raw character; any special character, except a right bracket. In
% particular, escaped characters are forbidden.
% \begin{macrocode}
-\prg_new_protected_conditional:Npnn \@@_if_end_range:NN #1#2 { TF }
+\cs_new_protected:Npn \@@_if_end_range:NNTF #1#2
{
\if_meaning:w \@@_compile_raw:N #1
- \prg_return_true:
\else:
\if_meaning:w \@@_compile_special:N #1
\if_charcode:w ] #2
- \prg_return_false:
- \else:
- \prg_return_true:
+ \use_i:nn
\fi:
\else:
- \prg_return_false:
+ \exp_after:wN \exp_after:wN \exp_after:wN \use_iii:nnn
\fi:
\fi:
+ \use_i:nn
}
\cs_new_protected:Npn \@@_compile_range:Nw #1#2#3
{
@@ -3133,12 +3131,12 @@
\@@_two_if_eq:NNNNTF #5 #6 \@@_compile_special:N ^
{
\bool_set_false:N \l_@@_internal_bool
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \if_false: } \fi:
\@@_compile_class_posix_loop:w
}
{
\bool_set_true:N \l_@@_internal_bool
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \if_false: } \fi:
\@@_compile_class_posix_loop:w #5 #6
}
}
@@ -3460,7 +3458,7 @@
}
\cs_new_protected:Npn \@@_compile_c_lbrack_add:N #1
{
- \if_int_odd:w \int_eval:n { \l_@@_catcodes_int / #1 } \exp_stop_f:
+ \if_int_odd:w \@@_int_eval:w \l_@@_catcodes_int / #1 \scan_stop:
\else:
\int_add:Nn \l_@@_catcodes_int {#1}
\fi:
@@ -3510,7 +3508,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{@@_cs}
+% \begin{variable}{\l_@@_cs_flag}
% \begin{macro}+\@@_compile_}:+
% \begin{macro}{\@@_compile_end_cs:}
% \begin{macro}[EXP]{\@@_compile_cs_aux:Nn, \@@_compile_cs_aux:NNnnnN}
@@ -3524,7 +3522,7 @@
% \cs{@@_item_exact_cs:n} with an argument consisting of all
% possibilities separated by \cs{scan_stop:}.
% \begin{macrocode}
-\flag_new:n { @@_cs }
+\flag_new:N \l_@@_cs_flag
\cs_new_protected:cpn { @@_compile_ \c_right_brace_str : }
{
\@@_if_in_cs:TF
@@ -3534,15 +3532,15 @@
\cs_new_protected:Npn \@@_compile_end_cs:
{
\@@_compile_end:
- \flag_clear:n { @@_cs }
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \flag_clear:N \l_@@_cs_flag
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{
\exp_after:wN \@@_compile_cs_aux:Nn \l_@@_internal_regex
\q_@@_nil \q_@@_nil \q_@@_recursion_stop
}
\exp_args:Ne \@@_compile_one:n
{
- \flag_if_raised:nTF { @@_cs }
+ \flag_if_raised:NTF \l_@@_cs_flag
{ \@@_item_cs:n { \exp_not:o \l_@@_internal_regex } }
{
\@@_item_exact_cs:n
@@ -3561,7 +3559,7 @@
\@@_compile_cs_aux:Nn
}
{
- \@@_quark_if_nil:NF #1 { \flag_ensure_raised:n { @@_cs } }
+ \@@_quark_if_nil:NF #1 { \flag_ensure_raised:N \l_@@_cs_flag }
\@@_use_none_delimit_by_q_recursion_stop:w
}
}
@@ -3573,7 +3571,7 @@
{#2}
{ \tl_if_head_eq_meaning_p:nN {#3} \@@_item_caseful_equal:n }
{ \int_compare_p:nNn { \tl_count:n {#3} } = { 2 } }
- { \int_compare_p:nNn {#5} = { 0 } }
+ { \int_compare_p:nNn {#5} = \c_zero_int }
}
{
\prg_replicate:nn {#4}
@@ -3583,7 +3581,7 @@
{
\@@_quark_if_nil:NF #1
{
- \flag_ensure_raised:n { @@_cs }
+ \flag_ensure_raised:N \l_@@_cs_flag
\@@_use_i_delimit_by_q_recursion_stop:nw
}
\@@_use_none_delimit_by_q_recursion_stop:w
@@ -3624,7 +3622,7 @@
\@@_two_if_eq:NNNNTF #2 #3 \@@_compile_special:N \c_left_brace_str
{
\tl_set:Nn \l_@@_internal_b_tl {#1}
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \if_false: } \fi:
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \if_false: } \fi:
\@@_compile_u_loop:NN
}
{
@@ -3758,7 +3756,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_compile_u_in_cs:
{
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
\exp_args:No \__kernel_str_to_other_fast:n
{ \l_@@_internal_a_tl }
@@ -3857,10 +3855,10 @@
}
\cs_new:Npn \@@_clean_int_aux:N #1
{
- \if_int_compare:w 1 < 1 #1 ~
+ \if_int_compare:w \c_one_int < 1 #1 ~
#1
\else:
- \exp_after:wN \str_map_break:
+ \str_map_break:n
\fi:
}
\cs_new:Npn \@@_clean_regex:n #1
@@ -3881,7 +3879,7 @@
}
\cs_new:Npn \@@_clean_branch_loop:n #1
{
- \tl_if_single:nF {#1} { \prg_break: }
+ \tl_if_single:nF {#1} \prg_break:
\token_case_meaning:NnF #1
{
\@@_command_K: { #1 \@@_clean_branch_loop:n }
@@ -3891,7 +3889,7 @@
\@@_group_no_capture:nnnN { #1 \@@_clean_group:nnnN }
\@@_group_resetting:nnnN { #1 \@@_clean_group:nnnN }
}
- { \prg_break: }
+ \prg_break:
}
\cs_new:Npn \@@_clean_assertion:Nn #1#2
{
@@ -3912,16 +3910,16 @@
{
\@@_clean_bool:n {#1}
{ \@@_clean_class:n {#2} }
- { \int_max:nn { 0 } { \@@_clean_int:n {#3} } }
- { \int_max:nn { -1 } { \@@_clean_int:n {#4} } }
+ { \int_max:nn \c_zero_int { \@@_clean_int:n {#3} } }
+ { \int_max:nn { -\c_one_int } { \@@_clean_int:n {#4} } }
\@@_clean_bool:n {#5}
\@@_clean_branch_loop:n
}
\cs_new:Npn \@@_clean_group:nnnN #1#2#3#4
{
{ \@@_clean_regex:n {#1} }
- { \int_max:nn { 0 } { \@@_clean_int:n {#2} } }
- { \int_max:nn { -1 } { \@@_clean_int:n {#3} } }
+ { \int_max:nn \c_zero_int { \@@_clean_int:n {#2} } }
+ { \int_max:nn { -\c_one_int } { \@@_clean_int:n {#3} } }
\@@_clean_bool:n {#4}
\@@_clean_branch_loop:n
}
@@ -3936,7 +3934,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_clean_class_loop:nnn #1#2#3
{
- \tl_if_single:nF {#1} { \prg_break: }
+ \tl_if_single:nF {#1} \prg_break:
\token_case_meaning:NnTF #1
{
\@@_item_cs:n { #1 { \@@_clean_regex:n {#2} } }
@@ -3968,10 +3966,10 @@
\@@_clean_class_loop:nnn
}
{
- \exp_args:Nf \str_case:nnTF
+ \exp_args:Ne \str_case:nnTF
{
- \exp_args:Nf \str_range:nnn
- { \cs_to_str:N #1 } { 1 } { 13 }
+ \exp_args:Ne \str_range:nnn
+ { \cs_to_str:N #1 } \c_one_int { 13 }
}
{
{ @@_prop_ } { }
@@ -3981,7 +3979,7 @@
#1
\@@_clean_class_loop:nnn {#2} {#3}
}
- { \prg_break: }
+ \prg_break:
}
}
}
@@ -4164,14 +4162,14 @@
\int_zero:N \l_@@_show_lines_int
\@@_show_push:n {~}
#2
- \int_compare:nTF { \l_@@_show_lines_int = 0 }
+ \int_compare:nTF { \l_@@_show_lines_int = \c_zero_int }
{
\group_end:
\@@_show_one:n { \bool_if:NTF #1 { Fail } { Pass } }
}
{
\bool_if:nTF
- { #1 && \int_compare_p:n { \l_@@_show_lines_int = 1 } }
+ { #1 && \int_compare_p:n { \l_@@_show_lines_int = \c_one_int } }
{
\group_end:
#2
@@ -4389,7 +4387,7 @@
%
\@@_build_new_state:
\@@_toks_put_left:Ne \l_@@_left_state_int
- { \@@_action_submatch:nN { 0 } < }
+ { \@@_action_submatch:nN \c_zero_int < }
\@@_push_lr_states:
\int_zero:N \l_@@_case_max_group_int
\int_gzero:N \g_@@_case_int
@@ -4403,18 +4401,15 @@
}
\cs_new_protected:Npn \@@_case_build_loop:n #1
{
- \int_set:Nn \l_@@_capturing_group_int { 1 }
+ \int_set_eq:NN \l_@@_capturing_group_int \c_one_int
\@@_compile_use:n {#1}
\int_set:Nn \l_@@_case_max_group_int
- {
- \int_max:nn { \l_@@_case_max_group_int }
- { \l_@@_capturing_group_int }
- }
+ { \int_max:nn \l_@@_case_max_group_int \l_@@_capturing_group_int }
\seq_pop:NN \l_@@_right_state_seq \l_@@_internal_a_tl
\int_set:Nn \l_@@_right_state_int \l_@@_internal_a_tl
\@@_toks_put_left:Ne \l_@@_right_state_int
{
- \@@_action_submatch:nN { 0 } >
+ \@@_action_submatch:nN \c_zero_int >
\int_gset:Nn \g_@@_case_int
{ \int_use:N \g_@@_case_int }
\@@_action_success:
@@ -4500,9 +4495,9 @@
% differing usage later on. Both functions could be optimized.
% \begin{macrocode}
\cs_new_protected:Npn \@@_build_transition_left:NNN #1#2#3
- { \@@_toks_put_left:Ne #2 { #1 { \int_eval:n { #3 - #2 } } } }
+ { \@@_toks_put_left:Ne #2 { #1 { \tex_the:D \@@_int_eval:w #3 - #2 } } }
\cs_new_protected:Npn \@@_build_transition_right:nNn #1#2#3
- { \@@_toks_put_right:Ne #2 { #1 { \int_eval:n { #3 - #2 } } } }
+ { \@@_toks_put_right:Ne #2 { #1 { \tex_the:D \@@_int_eval:w #3 - #2 } } }
% \end{macrocode}
% \end{macro}
%
@@ -4534,11 +4529,11 @@
\@@_toks_put_right:Ne \l_@@_left_state_int
{
\if_meaning:w \c_true_bool #1
- #2 { \int_eval:n { #3 - \l_@@_left_state_int } }
- #4 { \int_eval:n { #5 - \l_@@_left_state_int } }
+ #2 { \tex_the:D \@@_int_eval:w #3 - \l_@@_left_state_int }
+ #4 { \tex_the:D \@@_int_eval:w #5 - \l_@@_left_state_int }
\else:
- #4 { \int_eval:n { #5 - \l_@@_left_state_int } }
- #2 { \int_eval:n { #3 - \l_@@_left_state_int } }
+ #4 { \tex_the:D \@@_int_eval:w #5 - \l_@@_left_state_int }
+ #2 { \tex_the:D \@@_int_eval:w #3 - \l_@@_left_state_int }
\fi:
}
}
@@ -4636,7 +4631,7 @@
{
\@@_class_repeat:n {#1}
\int_set:Nn \l_@@_internal_a_int
- { \l_@@_max_state_int + #2 - 1 }
+ { \l_@@_max_state_int + #2 - \c_one_int }
\prg_replicate:nn { #2 }
{
\@@_build_transitions_lazyness:NNNNN #3
@@ -4730,8 +4725,8 @@
\use_none:nn #3 { \int_set:Nn \l_@@_capturing_group_int {#1} }
\int_set:Nn \l_@@_capturing_group_int {#2}
#3 {#4}
- \exp_args:Nf \@@_group_resetting_loop:nnNn
- { \int_max:nn {#1} { \l_@@_capturing_group_int } }
+ \exp_args:Ne \@@_group_resetting_loop:nnNn
+ { \int_max:nn {#1} \l_@@_capturing_group_int }
{#2}
}
% \end{macrocode}
@@ -4774,7 +4769,7 @@
{
\if_int_compare:w #2 = \c_zero_int
\int_set:Nn \l_@@_max_state_int
- { \l_@@_left_state_int - 1 }
+ { \l_@@_left_state_int - \c_one_int }
\@@_build_new_state:
\else:
\@@_group_repeat_aux:n {#2}
@@ -4816,14 +4811,14 @@
\l_@@_right_state_int \l_@@_max_state_int
\int_set_eq:NN \l_@@_internal_a_int \l_@@_left_state_int
\int_set_eq:NN \l_@@_internal_b_int \l_@@_max_state_int
- \if_int_compare:w \int_eval:n {#1} > \c_one_int
+ \if_int_compare:w \@@_int_eval:w #1 > \c_one_int
\int_set:Nn \l_@@_internal_c_int
{
- ( #1 - 1 )
+ ( #1 - \c_one_int )
* ( \l_@@_internal_b_int - \l_@@_internal_a_int )
}
- \int_add:Nn \l_@@_right_state_int { \l_@@_internal_c_int }
- \int_add:Nn \l_@@_max_state_int { \l_@@_internal_c_int }
+ \int_add:Nn \l_@@_right_state_int \l_@@_internal_c_int
+ \int_add:Nn \l_@@_max_state_int \l_@@_internal_c_int
\@@_toks_memcpy:NNn
\l_@@_internal_b_int
\l_@@_internal_a_int
@@ -4859,7 +4854,7 @@
\@@_group_submatches:nNN {#1}
\l_@@_left_state_int \l_@@_right_state_int
\int_set:Nn \l_@@_internal_a_int
- { \l_@@_left_state_int - 1 }
+ { \l_@@_left_state_int - \c_one_int }
\@@_build_transition_right:nNn \@@_action_free:n
\l_@@_right_state_int \l_@@_internal_a_int
\@@_build_new_state:
@@ -4919,7 +4914,7 @@
\l_@@_left_state_int \l_@@_max_state_int
}
\else:
- \prg_replicate:nn { #3 - 1 }
+ \prg_replicate:nn { #3 - \c_one_int }
{
\int_sub:Nn \l_@@_right_state_int
{ \l_@@_internal_b_int - \l_@@_internal_a_int }
@@ -4928,7 +4923,7 @@
}
\if_int_compare:w #2 = \c_zero_int
\int_set:Nn \l_@@_right_state_int
- { \l_@@_left_state_int - 1 }
+ { \l_@@_left_state_int - \c_one_int }
\else:
\int_sub:Nn \l_@@_right_state_int
{ \l_@@_internal_b_int - \l_@@_internal_a_int }
@@ -4963,8 +4958,8 @@
{
\@@_action_free:n
{
- \int_eval:n
- { \l_@@_right_state_int - \l_@@_left_state_int }
+ \tex_the:D \@@_int_eval:w
+ \l_@@_right_state_int - \l_@@_left_state_int
}
}
\bool_if:NT #1 { { } }
@@ -5009,12 +5004,12 @@
\@@_build_new_state:
\@@_toks_put_right:Ne \l_@@_left_state_int
{
- \@@_action_submatch:nN { 0 } <
+ \@@_action_submatch:nN \c_zero_int <
\bool_set_true:N \l_@@_fresh_thread_bool
\@@_action_free:n
{
- \int_eval:n
- { \l_@@_right_state_int - \l_@@_left_state_int }
+ \tex_the:D \@@_int_eval:w
+ \l_@@_right_state_int - \l_@@_left_state_int
}
\bool_set_false:N \l_@@_fresh_thread_bool
}
@@ -5300,10 +5295,10 @@
{
\bool_gset_false:N \g_@@_success_bool
\int_step_inline:nnn
- \l_@@_min_state_int { \l_@@_max_state_int - 1 }
+ \l_@@_min_state_int { \l_@@_max_state_int - \c_one_int }
{
\__kernel_intarray_gset:Nnn
- \g_@@_state_active_intarray {##1} { 1 }
+ \g_@@_state_active_intarray {##1} \c_one_int
}
\int_zero:N \l_@@_step_int
\int_set:Nn \l_@@_min_pos_int { 2 }
@@ -5311,7 +5306,7 @@
\int_set:Nn \l_@@_last_char_success_int { -2 }
\tl_build_begin:N \l_@@_matched_analysis_tl
\tl_clear:N \l_@@_curr_analysis_tl
- \int_set:Nn \l_@@_min_submatch_int { 1 }
+ \int_set_eq:NN \l_@@_min_submatch_int \c_one_int
\int_set_eq:NN \l_@@_submatch_int \l_@@_min_submatch_int
\bool_set_false:N \l_@@_empty_success_bool
}
@@ -5353,8 +5348,7 @@
{ \prg_replicate:nn { 2 * \l_@@_capturing_group_int } { 0 , } }
\int_set_eq:NN \l_@@_max_thread_int \l_@@_min_thread_int
\@@_store_state:n { \l_@@_min_state_int }
- \int_set:Nn \l_@@_curr_pos_int
- { \l_@@_start_pos_int - 1 }
+ \int_set:Nn \l_@@_curr_pos_int { \l_@@_start_pos_int - \c_one_int }
\int_set_eq:NN \l_@@_curr_char_int \l_@@_last_char_success_int
\tl_build_get_intermediate:NN \l_@@_matched_analysis_tl \l_@@_internal_a_tl
\exp_args:NNf \@@_match_once_init_aux:
@@ -5432,15 +5426,15 @@
{
\int_set_eq:NN \l_@@_max_thread_int \l_@@_min_thread_int
\int_step_function:nnN
- { \l_@@_min_thread_int }
- { \l_@@_max_thread_int - 1 }
+ \l_@@_min_thread_int
+ { \l_@@_max_thread_int - \c_one_int }
\@@_match_one_active:n
}
\prg_break_point:
\bool_set_false:N \l_@@_fresh_thread_bool
\if_int_compare:w \l_@@_max_thread_int > \l_@@_min_thread_int
\if_int_compare:w -2 < \l_@@_curr_char_int
- \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n
+ \exp_after:wN \use_i:nn
\fi:
\fi:
\l_@@_every_match_tl
@@ -5450,8 +5444,8 @@
\@@_use_state_and_submatches:w
\__kernel_intarray_range_to_clist:Nnn
\g_@@_thread_info_intarray
- { 1 + #1 * (\l_@@_capturing_group_int * 2 + 1) }
- { (1 + #1) * (\l_@@_capturing_group_int * 2 + 1) }
+ { \c_one_int + #1 * (\l_@@_capturing_group_int * 2 + \c_one_int) }
+ { (\c_one_int + #1) * (\l_@@_capturing_group_int * 2 + \c_one_int) }
;
}
% \end{macrocode}
@@ -5471,11 +5465,11 @@
\cs_new_protected:Npn \@@_use_state:
{
\__kernel_intarray_gset:Nnn \g_@@_state_active_intarray
- { \l_@@_curr_state_int } { \l_@@_step_int }
+ \l_@@_curr_state_int \l_@@_step_int
\@@_toks_use:w \l_@@_curr_state_int
\__kernel_intarray_gset:Nnn \g_@@_state_active_intarray
- { \l_@@_curr_state_int }
- { \int_eval:n { \l_@@_step_int + 1 } }
+ \l_@@_curr_state_int
+ { \@@_int_eval:w \l_@@_step_int + \c_one_int \scan_stop: }
}
% \end{macrocode}
% \end{macro}
@@ -5491,7 +5485,7 @@
\int_set:Nn \l_@@_curr_state_int {#1}
\if_int_compare:w
\__kernel_intarray_item:Nn \g_@@_state_active_intarray
- { \l_@@_curr_state_int }
+ \l_@@_curr_state_int
< \l_@@_step_int
\tl_set:Nn \l_@@_curr_submatches_tl { #2 , }
\exp_after:wN \@@_use_state:
@@ -5548,7 +5542,7 @@
{
\if_int_compare:w
\__kernel_intarray_item:Nn \g_@@_state_active_intarray
- { \l_@@_curr_state_int }
+ \l_@@_curr_state_int
#1
\exp_after:wN \@@_use_state:
\fi:
@@ -5571,8 +5565,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_action_cost:n #1
{
- \exp_args:Ne \@@_store_state:n
- { \int_eval:n { \l_@@_curr_state_int + #1 } }
+ \exp_args:No \@@_store_state:n
+ { \tex_the:D \@@_int_eval:w \l_@@_curr_state_int + #1 }
}
% \end{macrocode}
% \end{macro}
@@ -5595,8 +5589,8 @@
\g_@@_thread_info_intarray
{
\@@_int_eval:w
- 1 + \l_@@_max_thread_int *
- (\l_@@_capturing_group_int * 2 + 1)
+ \c_one_int + \l_@@_max_thread_int *
+ (\l_@@_capturing_group_int * 2 + \c_one_int)
}
{ #2 , #1 }
}
@@ -5792,11 +5786,11 @@
{
\if_int_compare:w #1 < #2 \exp_stop_f:
\else:
- \exp_after:wN \prg_break:
+ \prg_break:n
\fi:
\@@_toks_use:w #1 \exp_stop_f:
\exp_after:wN \@@_query_range_loop:ww
- \int_value:w \@@_int_eval:w #1 + 1 ; #2 ;
+ \int_value:w \@@_int_eval:w #1 + \c_one_int ; #2 ;
}
% \end{macrocode}
% \end{macro}
@@ -5824,22 +5818,21 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_submatch_balance:n #1
{
- \int_eval:n
- {
- \@@_intarray_item:NnF \g_@@_balance_intarray
- {
- \__kernel_intarray_item:Nn
- \g_@@_submatch_end_intarray {#1}
- }
- { 0 }
- -
- \@@_intarray_item:NnF \g_@@_balance_intarray
- {
- \__kernel_intarray_item:Nn
- \g_@@_submatch_begin_intarray {#1}
- }
- { 0 }
- }
+ \tex_the:D \@@_int_eval:w
+ \@@_intarray_item:NnF \g_@@_balance_intarray
+ {
+ \__kernel_intarray_item:Nn
+ \g_@@_submatch_end_intarray {#1}
+ }
+ \c_zero_int
+ -
+ \@@_intarray_item:NnF \g_@@_balance_intarray
+ {
+ \__kernel_intarray_item:Nn
+ \g_@@_submatch_begin_intarray {#1}
+ }
+ \c_zero_int
+ \scan_stop:
}
% \end{macrocode}
% \end{macro}
@@ -5984,7 +5977,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_replacement_normal:n #1
{
- \int_compare:nNnTF { \l_@@_replacement_csnames_int } > 0
+ \int_compare:nNnTF \l_@@_replacement_csnames_int > \c_zero_int
{ \exp_args:No \@@_replacement_put:n { \token_to_str:N #1 } }
{
\tl_if_empty:NTF \l_@@_replacement_category_tl
@@ -6040,7 +6033,7 @@
{
\cs_if_exist_use:cF { @@_replacement_#1:w }
{
- \if_int_compare:w 1 < 1#1 \exp_stop_f:
+ \if_int_compare:w \c_one_int < 1#1 \exp_stop_f:
\@@_replacement_put_submatch:n {#1}
\else:
\@@_replacement_normal:n {#1}
@@ -6066,16 +6059,16 @@
\@@_replacement_put_submatch_aux:n {#1}
\else:
\msg_expandable_error:nnff { regex } { submatch-too-big }
- {#1} { \int_eval:n { \l_@@_capturing_group_int - 1 } }
+ {#1} { \int_eval:n { \l_@@_capturing_group_int - \c_one_int } }
\fi:
}
\cs_new_protected:Npn \@@_replacement_put_submatch_aux:n #1
{
\tl_build_put_right:Nn \l_@@_build_tl
- { \@@_query_submatch:n { \int_eval:n { #1 + ##1 } } }
+ { \@@_query_submatch:n { \@@_int_eval:w #1 + ##1 \scan_stop: } }
\if_int_compare:w \l_@@_replacement_csnames_int = \c_zero_int
\tl_gput_right:Nn \g_@@_balance_tl
- { + \@@_submatch_balance:n { \int_eval:n { #1 + ##1 } } }
+ { + \@@_submatch_balance:n { \@@_int_eval:w #1 + ##1 \scan_stop: } }
\fi:
}
% \end{macrocode}
@@ -6097,7 +6090,7 @@
{
\token_if_eq_meaning:NNTF #1 \@@_replacement_normal:n
{
- \if_int_compare:w 1 < 1#2 \exp_stop_f:
+ \if_int_compare:w \c_one_int < 1#2 \exp_stop_f:
#2
\exp_after:wN \use_i:nnn
\exp_after:wN \@@_replacement_g_digits:NN
@@ -6232,7 +6225,7 @@
\token_if_eq_meaning:NNTF \prg_do_nothing: #3
{ \msg_error:nn { regex } { replacement-catcode-end } }
{
- \int_compare:nNnTF { \l_@@_replacement_csnames_int } > 0
+ \int_compare:nNnTF \l_@@_replacement_csnames_int > \c_zero_int
{
\msg_error:nnnn
{ regex } { replacement-catcode-in-cs } {#1} {#3}
@@ -6284,7 +6277,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_replacement_char:nNN #1#2#3
{
- \tex_lccode:D 0 = `#3 \scan_stop:
+ \tex_lccode:D \c_zero_int = `#3 \scan_stop:
\tex_lowercase:D { \@@_replacement_put:n {#1} }
}
% \end{macrocode}
@@ -6637,7 +6630,6 @@
\prg_generate_conditional_variant:Nnn #2 { nV } { T , F , TF }
\cs_generate_variant:Nn #3 { NV }
\prg_generate_conditional_variant:Nnn #3 { NV } { T , F , TF }
-
}
\@@_tmp:w \@@_extract_once:nnN
\regex_extract_once:nnN \regex_extract_once:NnN
@@ -6728,12 +6720,12 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{@@_begin, @@_end}
+% \begin{variable}{\l_@@_begin_flag, \l_@@_end_flag}
% Those flags are raised to indicate begin-group or end-group tokens
% that had to be added when extracting submatches.
% \begin{macrocode}
-\flag_new:n { @@_begin }
-\flag_new:n { @@_end }
+\flag_new:N \l_@@_begin_flag
+\flag_new:N \l_@@_end_flag
% \end{macrocode}
% \end{variable}
%
@@ -6819,7 +6811,7 @@
\int_incr:N \l_@@_curr_pos_int
\@@_toks_set:Nn \l_@@_curr_pos_int {#1}
\__kernel_intarray_gset:Nnn \g_@@_balance_intarray
- { \l_@@_curr_pos_int } { \l_@@_balance_int }
+ \l_@@_curr_pos_int \l_@@_balance_int
\if_case:w "#2 \exp_stop_f:
\or: \int_incr:N \l_@@_balance_int
\or: \int_decr:N \l_@@_balance_int
@@ -6946,29 +6938,29 @@
\l_@@_start_pos_int < \l_@@_success_pos_int
\@@_extract:
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_zeroth_submatch_int } { 0 }
+ \l_@@_zeroth_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_end_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
{
\__kernel_intarray_item:Nn \g_@@_submatch_begin_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
}
\__kernel_intarray_gset:Nnn \g_@@_submatch_begin_intarray
- { \l_@@_zeroth_submatch_int }
- { \l_@@_start_pos_int }
+ \l_@@_zeroth_submatch_int
+ \l_@@_start_pos_int
\fi:
}
#1
\@@_match:n {#2}
\@@_query_set:n {#2}
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_submatch_int } { 0 }
+ \l_@@_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_end_intarray
- { \l_@@_submatch_int }
- { \l_@@_max_pos_int }
+ \l_@@_submatch_int
+ \l_@@_max_pos_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_begin_intarray
- { \l_@@_submatch_int }
- { \l_@@_start_pos_int }
+ \l_@@_submatch_int
+ \l_@@_start_pos_int
\int_incr:N \l_@@_submatch_int
\if_meaning:w \c_true_bool \l_@@_empty_success_bool
\if_int_compare:w \l_@@_start_pos_int = \l_@@_max_pos_int
@@ -6998,24 +6990,24 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_group_end_extract_seq:N #1
{
- \flag_clear:n { @@_begin }
- \flag_clear:n { @@_end }
+ \flag_clear:N \l_@@_begin_flag
+ \flag_clear:N \l_@@_end_flag
\cs_set_eq:NN \@@_tmp:w \scan_stop:
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
- \int_step_function:nnN { \l_@@_min_submatch_int }
- { \l_@@_submatch_int - 1 } \@@_extract_seq_aux:n
+ \int_step_function:nnN \l_@@_min_submatch_int
+ { \l_@@_submatch_int - \c_one_int } \@@_extract_seq_aux:n
\@@_tmp:w
}
\int_set:Nn \l_@@_added_begin_int
- { \flag_height:n { @@_begin } }
+ { \flag_height:N \l_@@_begin_flag }
\int_set:Nn \l_@@_added_end_int
- { \flag_height:n { @@_end } }
+ { \flag_height:N \l_@@_end_flag }
\tex_afterassignment:D \@@_extract_check:w
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{ \g_@@_internal_tl \if_false: { \fi: } }
\int_compare:nNnT
- { \l_@@_added_begin_int + \l_@@_added_end_int } > 0
+ { \l_@@_added_begin_int + \l_@@_added_end_int } > \c_zero_int
{
\msg_error:nneee { regex } { result-unbalanced }
{ splitting~or~extracting~submatches }
@@ -7063,7 +7055,7 @@
\if_int_compare:w #1 < \c_zero_int
\prg_replicate:nn {-#1}
{
- \flag_raise:n { @@_begin }
+ \flag_raise:N \l_@@_begin_flag
\exp_not:n { { \if_false: } \fi: }
}
\fi:
@@ -7071,7 +7063,7 @@
\if_int_compare:w #1 > \c_zero_int
\prg_replicate:nn {#1}
{
- \flag_raise:n { @@_end }
+ \flag_raise:N \l_@@_end_flag
\exp_not:n { \if_false: { \fi: } }
}
\fi:
@@ -7087,17 +7079,17 @@
% In \cs{@@_group_end_extract_seq:N} we had to expand
% \cs{g_@@_internal_tl} to turn \cs{if_false:} constructions into
% actual begin-group and end-group tokens. This is done with a
-% \cs{__kernel_tl_gset:Ne} assignment, and \cs{@@_extract_check:w} is
+% \cs{__kernel_tl_gset:Nx} assignment, and \cs{@@_extract_check:w} is
% run immediately after this assignment ends, thanks to the
% \tn{afterassignment} primitive. If all of the items were properly
% balanced (enough begin-group tokens before end-group tokens, so |}{|
% is not) then \cs{@@_extract_check:w} is called just before the
-% closing brace of the \cs{__kernel_tl_gset:Ne} (thanks to our sneaky
+% closing brace of the \cs{__kernel_tl_gset:Nx} (thanks to our sneaky
% \cs{if_false:} |{| \cs{fi:} |}| construction), and finds that there
% is nothing left to expand. If any of the items is unbalanced, the
% assignment gets ended early by an extra end-group token, and our
% check finds more tokens needing to be expanded in a new
-% \cs{__kernel_tl_gset:Ne} assignment. We need to add a begin-group
+% \cs{__kernel_tl_gset:Nx} assignment. We need to add a begin-group
% and an end-group tokens to the unbalanced item, namely to the last
% item found so far, which we reach through a loop.
% \begin{macrocode}
@@ -7113,7 +7105,7 @@
\int_incr:N \l_@@_added_begin_int
\int_incr:N \l_@@_added_end_int
\tex_afterassignment:D \@@_extract_check:w
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
\exp_after:wN \@@_extract_check_loop:w
\g_@@_internal_tl
@@ -7169,15 +7161,15 @@
\prg_replicate:nn \l_@@_capturing_group_int
{
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_submatch_int } { 0 }
+ \l_@@_submatch_int \c_zero_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_case_intarray
- { \l_@@_submatch_int } { 0 }
+ \l_@@_submatch_int \c_zero_int
\int_incr:N \l_@@_submatch_int
}
\__kernel_intarray_gset:Nnn \g_@@_submatch_prev_intarray
- { \l_@@_zeroth_submatch_int } { \l_@@_start_pos_int }
+ \l_@@_zeroth_submatch_int \l_@@_start_pos_int
\__kernel_intarray_gset:Nnn \g_@@_submatch_case_intarray
- { \l_@@_zeroth_submatch_int } { \g_@@_case_int }
+ \l_@@_zeroth_submatch_int \g_@@_case_int
\int_zero:N \l_@@_internal_a_int
\exp_after:wN \@@_extract_aux:w \l_@@_success_submatches_tl
\prg_break_point: \@@_use_none_delimit_by_q_recursion_stop:w ,
@@ -7192,7 +7184,12 @@
{ \@@_int_eval:w \l_@@_zeroth_submatch_int + \l_@@_internal_a_int } {#1}
\else:
\__kernel_intarray_gset:Nnn \g_@@_submatch_end_intarray
- { \@@_int_eval:w \l_@@_zeroth_submatch_int + \l_@@_internal_a_int - \l_@@_capturing_group_int } {#1}
+ {
+ \@@_int_eval:w
+ \l_@@_zeroth_submatch_int + \l_@@_internal_a_int
+ - \l_@@_capturing_group_int
+ }
+ {#1}
\fi:
\int_incr:N \l_@@_internal_a_int
\@@_extract_aux:w
@@ -7230,20 +7227,16 @@
\exp_args:No \@@_query_set:n {#3}
#2
\int_set:Nn \l_@@_balance_int
+ { \@@_replacement_balance_one_match:n \l_@@_zeroth_submatch_int }
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{
- \@@_replacement_balance_one_match:n
- { \l_@@_zeroth_submatch_int }
- }
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
- {
- \@@_replacement_do_one_match:n
- { \l_@@_zeroth_submatch_int }
+ \@@_replacement_do_one_match:n \l_@@_zeroth_submatch_int
\@@_query_range:nn
{
\__kernel_intarray_item:Nn \g_@@_submatch_end_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
}
- { \l_@@_max_pos_int }
+ \l_@@_max_pos_int
}
\@@_group_end_replace:N #3
}
@@ -7276,19 +7269,19 @@
#2
\int_set:Nn \l_@@_balance_int
{
- 0
+ \c_zero_int
\int_step_function:nnnN
- { \l_@@_min_submatch_int }
+ \l_@@_min_submatch_int
\l_@@_capturing_group_int
- { \l_@@_submatch_int - 1 }
+ { \l_@@_submatch_int - \c_one_int }
\@@_replacement_balance_one_match:n
}
- \__kernel_tl_set:Ne \l_@@_internal_a_tl
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl
{
\int_step_function:nnnN
- { \l_@@_min_submatch_int }
+ \l_@@_min_submatch_int
\l_@@_capturing_group_int
- { \l_@@_submatch_int - 1 }
+ { \l_@@_submatch_int - \c_one_int }
\@@_replacement_do_one_match:n
\@@_query_range:nn
\l_@@_start_pos_int \l_@@_max_pos_int
@@ -7321,11 +7314,12 @@
\cs_new_protected:Npn \@@_group_end_replace:N #1
{
\int_set:Nn \l_@@_added_begin_int
- { \int_max:nn { - \l_@@_balance_int } { 0 } }
+ { \int_max:nn { - \l_@@_balance_int } \c_zero_int }
\int_set:Nn \l_@@_added_end_int
- { \int_max:nn { \l_@@_balance_int } { 0 } }
+ { \int_max:nn \l_@@_balance_int \c_zero_int }
\@@_group_end_replace_try:
- \int_compare:nNnT { \l_@@_added_begin_int + \l_@@_added_end_int } > 0
+ \int_compare:nNnT { \l_@@_added_begin_int + \l_@@_added_end_int }
+ > \c_zero_int
{
\msg_error:nneee { regex } { result-unbalanced }
{ replacing } { \int_use:N \l_@@_added_begin_int }
@@ -7337,11 +7331,11 @@
\cs_new_protected:Npn \@@_group_end_replace_try:
{
\tex_afterassignment:D \@@_group_end_replace_check:w
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{
- \prg_replicate:nn { \l_@@_added_begin_int } { { \if_false: } \fi: }
+ \prg_replicate:nn \l_@@_added_begin_int { { \if_false: } \fi: }
\l_@@_internal_a_tl
- \prg_replicate:nn { \l_@@_added_end_int } { \if_false: { \fi: } }
+ \prg_replicate:nn \l_@@_added_end_int { \if_false: { \fi: } }
\if_false: { \fi: }
}
}
@@ -7618,14 +7612,13 @@
\use:e
{
\exp_not:n { \exp_after:wN \l_@@_peek_true_tl \exp:w }
- \@@_replacement_do_one_match:n
- { \l_@@_zeroth_submatch_int }
+ \@@_replacement_do_one_match:n \l_@@_zeroth_submatch_int
\@@_query_range:nn
{
\__kernel_intarray_item:Nn \g_@@_submatch_end_intarray
- { \l_@@_zeroth_submatch_int }
+ \l_@@_zeroth_submatch_int
}
- { \l_@@_max_pos_int }
+ \l_@@_max_pos_int
\exp_end:
}
}
@@ -7708,10 +7701,14 @@
{
\if_case:w \l_@@_replacement_csnames_int
\tl_build_put_right:Nn \l_@@_build_tl
- { \@@_query_submatch:n { \int_eval:n { #1 + ##1 } } }
+ { \@@_query_submatch:n { \@@_int_eval:w #1 + ##1 \scan_stop: } }
\else:
\tl_build_put_right:Nn \l_@@_build_tl
- { \exp:w \@@_query_submatch:n { \int_eval:n { #1 + ##1 } } \exp_end: }
+ {
+ \exp:w
+ \@@_query_submatch:n { \@@_int_eval:w #1 + ##1 \scan_stop: }
+ \exp_end:
+ }
\fi:
}
% \end{macrocode}
@@ -8141,7 +8138,7 @@
{
\int_step_inline:nnn
\l_@@_min_state_int
- { \l_@@_max_state_int - 1 }
+ { \l_@@_max_state_int - \c_one_int }
{
\@@_trace:nne { regex } {#1}
{ \iow_char:N \\toks ##1 = { \@@_toks_use:w ##1 } }
diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx
index debdd81397..45e5028d1b 100644
--- a/macros/latex/contrib/l3kernel/l3seq.dtx
+++ b/macros/latex/contrib/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -173,6 +173,22 @@
% See also \cs{seq_set_split:Nnn}, which removes spaces around the delimiters.
% \end{function}
%
+% \begin{function}[added = 2012-06-15]
+% {\seq_set_filter:NNn, \seq_gset_filter:NNn}
+% \begin{syntax}
+% \cs{seq_set_filter:NNn} \meta{seq~var_1} \meta{seq~var_2} \Arg{inline boolexpr}
+% \end{syntax}
+% Evaluates the \meta{inline boolexpr} for every \meta{item} stored
+% within the \meta{seq~var_2}. The \meta{inline boolexpr}
+% receives the \meta{item} as |#1|. The sequence of all \meta{items}
+% for which the \meta{inline boolexpr} evaluated to \texttt{true}
+% is assigned to \meta{seq~var_1}.
+% \begin{texnote}
+% Contrarily to other mapping functions, \cs{seq_map_break:} cannot
+% be used in this function, and would lead to low-level \TeX{} errors.
+% \end{texnote}
+% \end{function}
+%
% \begin{function}
% {\seq_concat:NNN, \seq_concat:ccc, \seq_gconcat:NNN, \seq_gconcat:ccc}
% \begin{syntax}
@@ -635,8 +651,8 @@
% \begin{syntax}
% \cs{seq_map_indexed_function:NN} \meta{seq~var} \meta{function}
% \end{syntax}
-% Applies \meta{function} to every entry in the \meta{sequence
-% variable}. The \meta{function} should have signature |:nn|. It
+% Applies \meta{function} to every entry in the \meta{seq~var}.
+% The \meta{function} should have signature |:nn|. It
% receives two arguments for each iteration: the \meta{index} (namely
% |1| for the first entry, then |2| and so on) and the \meta{item}.
% \end{function}
@@ -645,8 +661,8 @@
% \begin{syntax}
% \cs{seq_map_indexed_inline:Nn} \meta{seq~var} \Arg{inline function}
% \end{syntax}
-% Applies \meta{inline function} to every entry in the \meta{sequence
-% variable}. The \meta{inline function} should consist of code which
+% Applies \meta{inline function} to every entry in the \meta{seq~var}.
+% The \meta{inline function} should consist of code which
% receives the \meta{index} (namely |1| for the first entry, then |2|
% and so on) as~|#1| and the \meta{item} as~|#2|.
% \end{function}
@@ -933,8 +949,8 @@
% items in the sequence representing the set.
%
% Sets should not contain several occurrences of a given item. To make
-% sure that a \meta{sequence variable} only has distinct items, use
-% \cs{seq_remove_duplicates:N} \meta{sequence variable}. This function
+% sure that a \meta{seq~var} only has distinct items, use
+% \cs{seq_remove_duplicates:N} \meta{seq~var}. This function
% is relatively slow, and to avoid performance issues one should only
% use it when necessary.
%
@@ -1238,22 +1254,22 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_from_clist:NN #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_set_from_clist:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:NN #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \s_@@ \clist_map_function:NN #2 \@@_wrap_item:n }
}
\cs_new_protected:Npn \seq_gset_from_clist:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \s_@@ \clist_map_function:nN {#2} \@@_wrap_item:n }
}
\cs_generate_variant:Nn \seq_set_from_clist:NN { Nc }
@@ -1322,13 +1338,13 @@
% braces which are outermost after space trimming.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_split:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_set:Ne \tl_trim_spaces:n }
+ { \@@_set_split:NNNnn \__kernel_tl_set:Nx \tl_trim_spaces:n }
\cs_new_protected:Npn \seq_gset_split:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_gset:Ne \tl_trim_spaces:n }
+ { \@@_set_split:NNNnn \__kernel_tl_gset:Nx \tl_trim_spaces:n }
\cs_new_protected:Npn \seq_set_split_keep_spaces:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_set:Ne \exp_not:n }
+ { \@@_set_split:NNNnn \__kernel_tl_set:Nx \exp_not:n }
\cs_new_protected:Npn \seq_gset_split_keep_spaces:Nnn
- { \@@_set_split:NNNnn \__kernel_tl_gset:Ne \exp_not:n }
+ { \@@_set_split:NNNnn \__kernel_tl_gset:Nx \exp_not:n }
\cs_new_protected:Npn \@@_set_split:NNNnn #1#2#3#4#5
{
\tl_if_empty:nTF {#4}
@@ -1348,7 +1364,7 @@
\@@_set_split_end:
\@@_set_split:Nw #2 \prg_do_nothing:
}
- \__kernel_tl_set:Ne \l_@@_internal_a_tl { \l_@@_internal_a_tl }
+ \__kernel_tl_set:Nx \l_@@_internal_a_tl { \l_@@_internal_a_tl }
}
#1 #3 { \s_@@ \l_@@_internal_a_tl }
}
@@ -1372,6 +1388,30 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
+% \begin{macro}{\@@_set_filter:NNNn}
+% Similar to \cs{seq_map_inline:Nn}, without a
+% \cs{prg_break_point:} because the user's code
+% is performed within the evaluation of a boolean expression,
+% and skipping out of that would break horribly.
+% The \cs{@@_wrap_item:n} function inserts the relevant
+% \cs{@@_item:n} without expansion in the input stream,
+% hence in the \texttt{e}-expanding assignment.
+% \begin{macrocode}
+\cs_new_protected:Npn \seq_set_filter:NNn
+ { \@@_set_filter:NNNn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \seq_gset_filter:NNn
+ { \@@_set_filter:NNNn \__kernel_tl_gset:Nx }
+\cs_new_protected:Npn \@@_set_filter:NNNn #1#2#3#4
+ {
+ \@@_push_item_def:n { \bool_if:nT {#4} { \@@_wrap_item:n {##1} } }
+ #1 #2 { #3 }
+ \@@_pop_item_def:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\seq_concat:NNN, \seq_concat:ccc}
% \UnitTested
% \begin{macro}{\seq_gconcat:NNN, \seq_gconcat:ccc}
@@ -1422,7 +1462,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\exp_not:n { \s_@@ \@@_item:n {#2} }
\exp_not:f { \exp_after:wN \@@_put_left_aux:w #1 }
@@ -1430,7 +1470,7 @@
}
\cs_new_protected:Npn \seq_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\exp_not:n { \s_@@ \@@_item:n {#2} }
\exp_not:f { \exp_after:wN \@@_put_left_aux:w #1 }
@@ -1553,9 +1593,9 @@
% \texttt{e}-type expansion (|#1 #2 {#2}|) ensures that nothing is lost.
% \begin{macrocode}
\cs_new_protected:Npn \seq_remove_all:Nn
- { \@@_remove_all_aux:NNn \__kernel_tl_set:Ne }
+ { \@@_remove_all_aux:NNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gremove_all:Nn
- { \@@_remove_all_aux:NNn \__kernel_tl_gset:Ne }
+ { \@@_remove_all_aux:NNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_remove_all_aux:NNn #1#2#3
{
\@@_push_item_def:n
@@ -1599,15 +1639,15 @@
% last argument \cs{use_ii:nn} vs \cs{use_i:nn}.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_item:Nnn #1#2#3
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Ne \use_i:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_i:nn }
\cs_new_protected:Npn \seq_gset_item:Nnn #1#2#3
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Ne \use_i:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_i:nn }
\cs_generate_variant:Nn \seq_set_item:Nnn { c }
\cs_generate_variant:Nn \seq_gset_item:Nnn { c }
\prg_new_protected_conditional:Npnn \seq_set_item:Nnn #1#2#3 { TF , T , F }
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Ne \use_ii:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_ii:nn }
\prg_new_protected_conditional:Npnn \seq_gset_item:Nnn #1#2#3 { TF , T , F }
- { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Ne \use_ii:nn }
+ { \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_ii:nn }
\prg_generate_conditional_variant:Nnn \seq_set_item:Nnn { c } { TF , T , F }
\prg_generate_conditional_variant:Nnn \seq_gset_item:Nnn { c } { TF , T , F }
% \end{macrocode}
@@ -1729,9 +1769,9 @@
% from the stack, and the memory consumption becomes linear.
% \begin{macrocode}
\cs_new_protected:Npn \seq_reverse:N
- { \@@_reverse:NN \__kernel_tl_set:Ne }
+ { \@@_reverse:NN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_greverse:N
- { \@@_reverse:NN \__kernel_tl_gset:Ne }
+ { \@@_reverse:NN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_reverse:NN #1 #2
{
\cs_set_eq:NN \@@_tmp:w \@@_item:n
@@ -1912,7 +1952,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_left:NN #1#2
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{
\exp_after:wN \@@_get_left:wnw
#1 \@@_item:n { \q_no_value } \s_@@_stop
@@ -1964,7 +2004,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \seq_get_right:NN #1#2
{
- \__kernel_tl_set:Ne #2
+ \__kernel_tl_set:Nx #2
{
\exp_after:wN \use_i_ii:nnn
\exp_after:wN \@@_get_right_loop:nw
@@ -2005,9 +2045,9 @@
% finally stops the loop.
% \begin{macrocode}
\cs_new_protected:Npn \seq_pop_right:NN
- { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_set:Ne }
+ { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gpop_right:NN
- { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Ne }
+ { \@@_pop:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_pop_right:NNN #1#2#3
{
\cs_set_eq:NN \@@_tmp:w \@@_item:n
@@ -2019,7 +2059,7 @@
#2
{
\if_false: { \fi: }
- \__kernel_tl_set:Ne #3
+ \__kernel_tl_set:Nx #3
}
{ } \use_none:nn
\cs_set_eq:NN \@@_item:n \@@_tmp:w
@@ -2067,10 +2107,10 @@
{ \@@_pop_TF:NNNN \@@_pop_left:NNN \tl_gset:Nn #1 #2 }
\prg_new_protected_conditional:Npnn \seq_pop_right:NN #1#2
{ T , F , TF }
- { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_set:Ne #1 #2 }
+ { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2
{ T , F , TF }
- { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Ne #1 #2 }
+ { \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Nx #1 #2 }
\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c }
{ T , F , TF }
\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c }
@@ -2396,9 +2436,9 @@
% semantics.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_map_e:NNn
- { \@@_set_map_e:NNNn \__kernel_tl_set:Ne }
+ { \@@_set_map_e:NNNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gset_map_e:NNn
- { \@@_set_map_e:NNNn \__kernel_tl_gset:Ne }
+ { \@@_set_map_e:NNNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_set_map_e:NNNn #1#2#3#4
{
\@@_push_item_def:n { \exp_not:N \@@_item:n {#4} }
@@ -2415,9 +2455,9 @@
% <inline function>.
% \begin{macrocode}
\cs_new_protected:Npn \seq_set_map:NNn
- { \@@_set_map:NNNn \__kernel_tl_set:Ne }
+ { \@@_set_map:NNNn \__kernel_tl_set:Nx }
\cs_new_protected:Npn \seq_gset_map:NNn
- { \@@_set_map:NNNn \__kernel_tl_gset:Ne }
+ { \@@_set_map:NNNn \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \@@_set_map:NNNn #1#2#3#4
{
\@@_push_item_def:n { \exp_not:n { \@@_item:n {#4} } }
diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx
index 226debac9d..319cf75b6e 100644
--- a/macros/latex/contrib/l3kernel/l3skip.dtx
+++ b/macros/latex/contrib/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx
index 71d28c4433..a85bb213b2 100644
--- a/macros/latex/contrib/l3kernel/l3sort.dtx
+++ b/macros/latex/contrib/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -376,7 +376,7 @@
{
\group_begin:
\@@_main:NNNn \tl_map_inline:Nn \tl_map_break:n #2 {#3}
- \__kernel_tl_gset:Ne \g_@@_internal_tl
+ \__kernel_tl_gset:Nx \g_@@_internal_tl
{ \@@_tl_toks:w \l_@@_min_int ; }
\group_end:
#1 #2 \g_@@_internal_tl
diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx
index 90eb26afbb..39b6a43d28 100644
--- a/macros/latex/contrib/l3kernel/l3str-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -343,13 +343,13 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{@@_byte, @@_error}
+% \begin{variable}{\l_@@_byte_flag, \l_@@_error_flag}
% Conversions from one \meta{encoding}/\meta{escaping} pair to another
% are done within \texttt{e}-expanding assignments. Errors are
% signalled by raising the relevant flag.
% \begin{macrocode}
-\flag_new:n { @@_byte }
-\flag_new:n { @@_error }
+\flag_new:N \l_@@_byte_flag
+\flag_new:N \l_@@_error_flag
% \end{macrocode}
% \end{variable}
%
@@ -468,7 +468,7 @@
% an empty result for the input $-1$.
% \begin{macrocode}
\group_begin:
- \__kernel_tl_set:Ne \l_@@_internal_tl { \tl_to_str:n { 0123456789ABCDEF } }
+ \__kernel_tl_set:Nx \l_@@_internal_tl { \tl_to_str:n { 0123456789ABCDEF } }
\tl_map_inline:Nn \l_@@_internal_tl
{
\tl_map_inline:Nn \l_@@_internal_tl
@@ -554,7 +554,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_convert_gmap:N #1
{
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_convert_gmap_loop:NN
\exp_after:wN #1
@@ -579,7 +579,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_convert_gmap_internal:N #1
{
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_convert_gmap_internal_loop:Nww
\exp_after:wN #1
@@ -599,8 +599,8 @@
%
% \subsubsection{Error-reporting during conversion}
%
-% \begin{macro}{\@@_if_flag_error:nne}
-% \begin{macro}{\@@_if_flag_no_error:nne}
+% \begin{macro}{\@@_if_flag_error:Nne}
+% \begin{macro}{\@@_if_flag_no_error:Nne}
% When converting using the function \cs{str_set_convert:Nnnn}, errors
% should be reported to the user after each step in the
% conversion. Errors are signalled by raising some flag (typically
@@ -608,30 +608,30 @@
% give the user an error, otherwise remove the arguments. On the other
% hand, in the conditional functions \cs{str_set_convert:NnnnTF},
% errors should be suppressed. This is done by changing
-% \cs{@@_if_flag_error:nne} into \cs{@@_if_flag_no_error:nne}
+% \cs{@@_if_flag_error:Nne} into \cs{@@_if_flag_no_error:Nne}
% locally.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_if_flag_error:nne #1
+\cs_new_protected:Npn \@@_if_flag_error:Nne #1
{
- \flag_if_raised:nTF {#1}
+ \flag_if_raised:NTF #1
{ \msg_error:nne { str } }
{ \use_none:nn }
}
-\cs_new_protected:Npn \@@_if_flag_no_error:nne #1#2#3
- { \flag_if_raised:nT {#1} { \bool_gset_true:N \g_@@_error_bool } }
+\cs_new_protected:Npn \@@_if_flag_no_error:Nne #1#2#3
+ { \flag_if_raised:NT #1 { \bool_gset_true:N \g_@@_error_bool } }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}[rEXP]{\@@_if_flag_times:nT}
+% \begin{macro}[rEXP]{\@@_if_flag_times:NT}
% At the end of each conversion step, we raise all relevant errors as
% one error message, built on the fly. The height of each flag
% indicates how many times a given error was encountered. This
% function prints |#2| followed by the number of occurrences of an
% error if it occurred, nothing otherwise.
% \begin{macrocode}
-\cs_new:Npn \@@_if_flag_times:nT #1#2
- { \flag_if_raised:nT {#1} { #2~(x \flag_height:n {#1} ) } }
+\cs_new:Npn \@@_if_flag_times:NT #1#2
+ { \flag_if_raised:NT #1 { #2~(x \flag_height:N #1 ) } }
% \end{macrocode}
% \end{macro}
%
@@ -675,7 +675,7 @@
% unescape and decode; encode and escape; exit the group and store the
% result in the user's variable. The various conversion functions all
% act on \cs{g_@@_result_tl}. Errors are silenced for the conditional
-% functions by redefining \cs{@@_if_flag_error:nne} locally.
+% functions by redefining \cs{@@_if_flag_error:Nne} locally.
% \begin{macrocode}
\cs_new_protected:Npn \str_set_convert:Nnnn
{ \@@_convert:nNNnnn { } \tl_set_eq:NN }
@@ -686,7 +686,7 @@
{
\bool_gset_false:N \g_@@_error_bool
\@@_convert:nNNnnn
- { \cs_set_eq:NN \@@_if_flag_error:nne \@@_if_flag_no_error:nne }
+ { \cs_set_eq:NN \@@_if_flag_error:Nne \@@_if_flag_no_error:Nne }
\tl_set_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g_@@_error_bool \prg_return_false: \prg_return_true:
}
@@ -695,7 +695,7 @@
{
\bool_gset_false:N \g_@@_error_bool
\@@_convert:nNNnnn
- { \cs_set_eq:NN \@@_if_flag_error:nne \@@_if_flag_no_error:nne }
+ { \cs_set_eq:NN \@@_if_flag_error:Nne \@@_if_flag_no_error:Nne }
\tl_gset_eq:NN #1 {#2} {#3} {#4}
\bool_if:NTF \g_@@_error_bool \prg_return_false: \prg_return_true:
}
@@ -703,7 +703,7 @@
{
\group_begin:
#1
- \__kernel_tl_gset:Ne \g_@@_result_tl { \__kernel_str_to_other_fast:n {#4} }
+ \__kernel_tl_gset:Nx \g_@@_result_tl { \__kernel_str_to_other_fast:n {#4} }
\exp_after:wN \@@_convert:wwwnn
\tl_to_str:n {#5} /// \s_@@_stop
{ decode } { unescape }
@@ -714,7 +714,7 @@
{ encode } { escape }
\use_ii_i:nn
\@@_convert_encode_:
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{ \tl_to_str:V \g_@@_result_tl }
\group_end:
#2 #3 \g_@@_result_tl
@@ -893,7 +893,7 @@
% \begin{macro}[rEXP]{\@@_filter_bytes_aux:N}
% In the case of 8-bit engines, every character is a byte. For
% Unicode-aware engines, test the character code; non-bytes cause us
-% to raise the flag \texttt{@@_byte}. Spaces have already been given
+% to raise the flag \cs{l_@@_byte_flag}. Spaces have already been given
% the correct category code when this function is called.
% \begin{macrocode}
\bool_lazy_any:nTF
@@ -914,7 +914,7 @@
\if_int_compare:w `#1 < 256 \exp_stop_f:
#1
\else:
- \flag_raise:n { @@_byte }
+ \flag_raise:N \l_@@_byte_flag
\fi:
\@@_filter_bytes_aux:N
}
@@ -937,10 +937,10 @@
{
\cs_new_protected:Npn \@@_convert_unescape_:
{
- \flag_clear:n { @@_byte }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \flag_clear:N \l_@@_byte_flag
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{ \exp_args:No \@@_filter_bytes:n \g_@@_result_tl }
- \@@_if_flag_error:nne { @@_byte } { non-byte } { bytes }
+ \@@_if_flag_error:Nne \l_@@_byte_flag { non-byte } { bytes }
}
}
{ \cs_new_protected:Npn \@@_convert_unescape_: { } }
@@ -997,15 +997,15 @@
{
\cs_new_protected:Npn \@@_convert_encode_:
{
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\@@_convert_gmap_internal:N \@@_encode_native_char:n
- \@@_if_flag_error:nne { @@_error }
+ \@@_if_flag_error:Nne \l_@@_error_flag
{ native-overflow } { }
}
\cs_new:Npn \@@_encode_native_char:n #1
{
\if_int_compare:w #1 > \c_@@_max_byte_int
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
?
\else:
\char_generate:nn {#1} {12}
@@ -1034,7 +1034,7 @@
\cs_new_protected:Npn \@@_convert_decode_clist:
{
\clist_gset:No \g_@@_result_tl \g_@@_result_tl
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_args:No \clist_map_function:nN
\g_@@_result_tl \@@_decode_clist_char:n
@@ -1057,7 +1057,7 @@
\cs_new_protected:Npn \@@_convert_encode_clist:
{
\@@_convert_gmap_internal:N \@@_encode_clist_char:n
- \__kernel_tl_gset:Ne \g_@@_result_tl { \tl_tail:N \g_@@_result_tl }
+ \__kernel_tl_gset:Nx \g_@@_result_tl { \tl_tail:N \g_@@_result_tl }
}
\cs_new:Npn \@@_encode_clist_char:n #1 { , #1 }
% \end{macrocode}
@@ -1186,9 +1186,9 @@
\exp_not:N \@@_decode_eight_bit_aux:Nn
\exp_not:c { g_@@_decode_#1_intarray }
}
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\@@_convert_gmap:N \@@_tmp:w
- \@@_if_flag_error:nne { @@_error } { decode-8-bit } {#1}
+ \@@_if_flag_error:Nne \l_@@_error_flag { decode-8-bit } {#1}
}
\cs_new:Npn \@@_decode_eight_bit_aux:Nn #1#2
{
@@ -1200,7 +1200,7 @@
\cs_new:Npn \@@_decode_eight_bit_aux:n #1
{
\if_int_compare:w #1 < \c_zero_int
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\int_value:w \c_@@_replacement_char_int
\else:
#1
@@ -1230,9 +1230,9 @@
\exp_not:c { g_@@_encode_#1_intarray }
\exp_not:c { g_@@_decode_#1_intarray }
}
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\@@_convert_gmap_internal:N \@@_tmp:w
- \@@_if_flag_error:nne { @@_error } { encode-8-bit } {#1}
+ \@@_if_flag_error:Nne \l_@@_error_flag { encode-8-bit } {#1}
}
\cs_new:Npn \@@_encode_eight_bit_aux:NNn #1#2#3
{
@@ -1248,7 +1248,7 @@
{
\int_compare:nNnTF { \intarray_item:Nn #3 { 1 + #1 } } = {#2}
{ \@@_output_byte:n {#1} }
- { \flag_raise:n { @@_error } }
+ { \flag_raise:N \l_@@_error_flag }
}
% \end{macrocode}
% \end{macro}
@@ -1349,9 +1349,9 @@
\cs_new_protected:Npn \@@_convert_unescape_hex:
{
\group_begin:
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\@@_output_byte:w "
\exp_last_unbraced:Nf \@@_unescape_hex_auxi:N
@@ -1360,7 +1360,7 @@
\prg_break_point:
\@@_output_end:
}
- \@@_if_flag_error:nne { @@_error } { unescape-hex } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { unescape-hex } { }
\group_end:
}
\cs_new:Npn \@@_unescape_hex_auxi:N #1
@@ -1369,7 +1369,7 @@
\@@_hexadecimal_use:NTF #1
{ \@@_unescape_hex_auxii:N }
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\@@_unescape_hex_auxi:N
}
}
@@ -1382,7 +1382,7 @@
\@@_output_byte:w " \@@_unescape_hex_auxi:N
}
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\@@_unescape_hex_auxii:N
}
}
@@ -1427,17 +1427,17 @@
\cs_new_protected:cpn { @@_convert_unescape_#2: }
{
\group_begin:
- \flag_clear:n { @@_byte }
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_byte_flag
+ \flag_clear:N \l_@@_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN #3 \g_@@_result_tl
#1 ? { ? \prg_break: }
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_byte } { non-byte } { #2 }
- \@@_if_flag_error:nne { @@_error } { unescape-#2 } { }
+ \@@_if_flag_error:Nne \l_@@_byte_flag { non-byte } { #2 }
+ \@@_if_flag_error:Nne \l_@@_error_flag { unescape-#2 } { }
\group_end:
}
\cs_new:Npn #3 ##1#1##2##3
@@ -1450,12 +1450,12 @@
\@@_hexadecimal_use:NTF ##3
{ }
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
* 0 + `#1 \use_i:nn
}
}
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
0 + `#1 \use_i:nn
}
\@@_output_end:
@@ -1513,23 +1513,23 @@
\cs_new_protected:Npn \@@_convert_unescape_string:
{
\group_begin:
- \flag_clear:n { @@_byte }
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_byte_flag
+ \flag_clear:N \l_@@_error_flag
\int_set:Nn \tex_escapechar:D { 92 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_unescape_string_newlines:wN
\g_@@_result_tl \prg_break: ^^M ?
\prg_break_point:
}
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_unescape_string_loop:wNNN
\g_@@_result_tl #1 ?? { ? \prg_break: }
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_byte } { non-byte } { string }
- \@@_if_flag_error:nne { @@_error } { unescape-string } { }
+ \@@_if_flag_error:Nne \l_@@_byte_flag { non-byte } { string }
+ \@@_if_flag_error:Nne \l_@@_error_flag { unescape-string } { }
\group_end:
}
}
@@ -1569,7 +1569,7 @@
{ ^^J } { 0 - 1 }
}
{
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
0 - 1 \use_i:nn
}
}
@@ -1825,8 +1825,8 @@
% }
% When decoding a string that is purportedly in the \textsc{utf-8}
% encoding, four different errors can occur, signalled by a specific
-% flag for each (we define those flags using \cs{flag_clear_new:n}
-% rather than \cs{flag_new:n}, because they are shared with other
+% flag for each (we define those flags using \cs{flag_clear_new:N}
+% rather than \cs{flag_new:N}, because they are shared with other
% encoding definition files).
% \begin{itemize}
% \item \enquote{Missing continuation byte}: a leading byte is not
@@ -1846,19 +1846,19 @@
% first remind the user what a correct \textsc{utf-8} string should
% look like, then add error-specific information.
% \begin{macrocode}
-\flag_clear_new:n { @@_missing }
-\flag_clear_new:n { @@_extra }
-\flag_clear_new:n { @@_overlong }
-\flag_clear_new:n { @@_overflow }
+\flag_clear_new:N \l_@@_missing_flag
+\flag_clear_new:N \l_@@_extra_flag
+\flag_clear_new:N \l_@@_overlong_flag
+\flag_clear_new:N \l_@@_overflow_flag
\msg_new:nnnn { str } { utf8-decode }
{
Invalid~UTF-8~string:
\exp_last_unbraced:Nf \use_none:n
{
- \@@_if_flag_times:nT { @@_missing } { ,~missing~continuation~byte }
- \@@_if_flag_times:nT { @@_extra } { ,~extra~continuation~byte }
- \@@_if_flag_times:nT { @@_overlong } { ,~overlong~form }
- \@@_if_flag_times:nT { @@_overflow } { ,~code~point~too~large }
+ \@@_if_flag_times:NT \l_@@_missing_flag { ,~missing~continuation~byte }
+ \@@_if_flag_times:NT \l_@@_extra_flag { ,~extra~continuation~byte }
+ \@@_if_flag_times:NT \l_@@_overlong_flag { ,~overlong~form }
+ \@@_if_flag_times:NT \l_@@_overflow_flag { ,~code~point~too~large }
}
.
}
@@ -1873,25 +1873,25 @@
Code~point~ <~1114112:~11110xxx~10xxxxxx~10xxxxxx~10xxxxxx \\
}
Bytes~of~the~form~10xxxxxx~are~called~continuation~bytes.
- \flag_if_raised:nT { @@_missing }
+ \flag_if_raised:NT \l_@@_missing_flag
{
\\\\
A~leading~byte~(in~the~range~[192,255])~was~not~followed~by~
the~appropriate~number~of~continuation~bytes.
}
- \flag_if_raised:nT { @@_extra }
+ \flag_if_raised:NT \l_@@_extra_flag
{
\\\\
LaTeX~came~across~a~continuation~byte~when~it~was~not~expected.
}
- \flag_if_raised:nT { @@_overlong }
+ \flag_if_raised:NT \l_@@_overlong_flag
{
\\\\
Every~Unicode~code~point~must~be~expressed~in~the~shortest~
possible~form.~For~instance,~'0xC0'~'0x83'~is~not~a~valid~
representation~for~the~code~point~3.
}
- \flag_if_raised:nT { @@_overflow }
+ \flag_if_raised:NT \l_@@_overflow_flag
{
\\\\
Unicode~limits~code~points~to~the~range~[0,1114111].
@@ -1970,18 +1970,18 @@
% \begin{macrocode}
\cs_new_protected:cpn { @@_convert_decode_utf8: }
{
- \flag_clear:n { @@_error }
- \flag_clear:n { @@_missing }
- \flag_clear:n { @@_extra }
- \flag_clear:n { @@_overlong }
- \flag_clear:n { @@_overflow }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \flag_clear:N \l_@@_error_flag
+ \flag_clear:N \l_@@_missing_flag
+ \flag_clear:N \l_@@_extra_flag
+ \flag_clear:N \l_@@_overlong_flag
+ \flag_clear:N \l_@@_overflow_flag
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_decode_utf_viii_start:N \g_@@_result_tl
{ \prg_break: \@@_decode_utf_viii_end: }
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_error } { utf8-decode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf8-decode } { }
}
\cs_new:Npn \@@_decode_utf_viii_start:N #1
{
@@ -1991,8 +1991,8 @@
\if_int_compare:w `#1 < "80 \exp_stop_f:
\int_value:w `#1
\else:
- \flag_raise:n { @@_extra }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_extra_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\fi:
\else:
@@ -2015,8 +2015,8 @@
\int_value:w \int_eval:n { #1 * "40 + `#3 - "80 } \exp_after:wN
\else:
\s_@@
- \flag_raise:n { @@_missing }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_missing_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\fi:
\s_@@
@@ -2029,8 +2029,8 @@
\if_int_compare:w #1 < #4 \exp_stop_f:
\s_@@
\if_int_compare:w #1 < #3 \exp_stop_f:
- \flag_raise:n { @@_overlong }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overlong_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\else:
#1
@@ -2049,15 +2049,15 @@
\cs_new:Npn \@@_decode_utf_viii_overflow:w #1 \fi: #2 \fi:
{
\fi: \fi:
- \flag_raise:n { @@_overflow }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overflow_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
}
\cs_new:Npn \@@_decode_utf_viii_end:
{
\s_@@
- \flag_raise:n { @@_missing }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_missing_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int \s_@@
\prg_break:
}
@@ -2119,10 +2119,10 @@
{ \@@_encode_utf_xvi_aux:N \@@_output_byte_pair_le:n }
\cs_new_protected:Npn \@@_encode_utf_xvi_aux:N #1
{
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_error_flag
\cs_set_eq:NN \@@_tmp:w #1
\@@_convert_gmap_internal:N \@@_encode_utf_xvi_char:n
- \@@_if_flag_error:nne { @@_error } { utf16-encode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf16-encode } { }
}
\cs_new:Npn \@@_encode_utf_xvi_char:n #1
{
@@ -2131,7 +2131,7 @@
\else:
\if_int_compare:w #1 < "10000 \exp_stop_f:
\if_int_compare:w #1 < "E000 \exp_stop_f:
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_error_flag
\@@_tmp:w { \c_@@_replacement_char_int }
\else:
\@@_tmp:w {#1}
@@ -2162,9 +2162,9 @@
% an unexpected trail surrogate, and a string containing an odd number
% of bytes.
% \begin{macrocode}
- \flag_clear_new:n { @@_missing }
- \flag_clear_new:n { @@_extra }
- \flag_clear_new:n { @@_end }
+ \flag_clear_new:N \l_@@_missing_flag
+ \flag_clear_new:N \l_@@_extra_flag
+ \flag_clear_new:N \l_@@_end_flag
\msg_new:nnnn { str } { utf16-encode }
{ Unicode~string~cannot~be~expressed~in~UTF-16:~surrogate. }
{
@@ -2177,9 +2177,9 @@
Invalid~UTF-16~string:
\exp_last_unbraced:Nf \use_none:n
{
- \@@_if_flag_times:nT { @@_missing } { ,~missing~trail~surrogate }
- \@@_if_flag_times:nT { @@_extra } { ,~extra~trail~surrogate }
- \@@_if_flag_times:nT { @@_end } { ,~odd~number~of~bytes }
+ \@@_if_flag_times:NT \l_@@_missing_flag { ,~missing~trail~surrogate }
+ \@@_if_flag_times:NT \l_@@_extra_flag { ,~extra~trail~surrogate }
+ \@@_if_flag_times:NT \l_@@_end_flag { ,~odd~number~of~bytes }
}
.
}
@@ -2196,17 +2196,17 @@
}
Lead~surrogates~are~pairs~of~bytes~in~the~range~[0xD800,~0xDBFF],~
and~trail~surrogates~are~in~the~range~[0xDC00,~0xDFFF].
- \flag_if_raised:nT { @@_missing }
+ \flag_if_raised:NT \l_@@_missing_flag
{
\\\\
A~lead~surrogate~was~not~followed~by~a~trail~surrogate.
}
- \flag_if_raised:nT { @@_extra }
+ \flag_if_raised:NT \l_@@_extra_flag
{
\\\\
LaTeX~came~across~a~trail~surrogate~when~it~was~not~expected.
}
- \flag_if_raised:nT { @@_end }
+ \flag_if_raised:NT \l_@@_end_flag
{
\\\\
The~string~contained~an~odd~number~of~bytes.~This~is~invalid:~
@@ -2260,18 +2260,18 @@
}
\cs_new_protected:Npn \@@_decode_utf_xvi:Nw #1#2 \s_@@_stop
{
- \flag_clear:n { @@_error }
- \flag_clear:n { @@_missing }
- \flag_clear:n { @@_extra }
- \flag_clear:n { @@_end }
+ \flag_clear:N \l_@@_error_flag
+ \flag_clear:N \l_@@_missing_flag
+ \flag_clear:N \l_@@_extra_flag
+ \flag_clear:N \l_@@_end_flag
\cs_set:Npn \@@_tmp:w ##1 ##2 { ` ## #1 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_decode_utf_xvi_pair:NN
#2 \q_@@_nil \q_@@_nil
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_error } { utf16-decode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf16-decode } { }
}
% \end{macrocode}
% \end{macro}
@@ -2377,8 +2377,8 @@
{ \@@_decode_utf_xvi_error:nNN { extra } #1#2 }
\cs_new:Npn \@@_decode_utf_xvi_error:nNN #1#2#3
{
- \flag_raise:n { @@_error }
- \flag_raise:n { str_#1 }
+ \flag_raise:N \l_@@_error_flag
+ \flag_raise:c { l_@@_#1_flag }
#2 #3 \s_@@
\int_use:N \c_@@_replacement_char_int \s_@@
}
@@ -2463,29 +2463,29 @@
% happens if the encoding was in fact not \textsc{utf-32}, because
% most arbitrary strings are not valid in \textsc{utf-32}.
% \begin{macrocode}
- \flag_clear_new:n { @@_overflow }
- \flag_clear_new:n { @@_end }
+ \flag_clear_new:N \l_@@_overflow_flag
+ \flag_clear_new:N \l_@@_end_flag
\msg_new:nnnn { str } { utf32-decode }
{
Invalid~UTF-32~string:
\exp_last_unbraced:Nf \use_none:n
{
- \@@_if_flag_times:nT { @@_overflow } { ,~code~point~too~large }
- \@@_if_flag_times:nT { @@_end } { ,~truncated~string }
+ \@@_if_flag_times:NT \l_@@_overflow_flag { ,~code~point~too~large }
+ \@@_if_flag_times:NT \l_@@_end_flag { ,~truncated~string }
}
.
}
{
In~the~UTF-32~encoding,~every~Unicode~character~
(in~the~range~[U+0000,~U+10FFFF])~is~encoded~as~4~bytes.
- \flag_if_raised:nT { @@_overflow }
+ \flag_if_raised:NT \l_@@_overflow_flag
{
\\\\
LaTeX~came~across~a~code~point~larger~than~1114111,~
the~maximum~code~point~defined~by~Unicode.~
Perhaps~the~string~was~not~encoded~in~the~UTF-32~encoding?
}
- \flag_if_raised:nT { @@_end }
+ \flag_if_raised:NT \l_@@_end_flag
{
\\\\
The~length~of~the~string~is~not~a~multiple~of~4.~
@@ -2549,17 +2549,17 @@
}
\cs_new_protected:Npn \@@_decode_utf_xxxii:Nw #1#2 \s_@@_stop
{
- \flag_clear:n { @@_overflow }
- \flag_clear:n { @@_end }
- \flag_clear:n { @@_error }
+ \flag_clear:N \l_@@_overflow_flag
+ \flag_clear:N \l_@@_end_flag
+ \flag_clear:N \l_@@_error_flag
\cs_set:Npn \@@_tmp:w ##1 ##2 { ` ## #1 }
- \__kernel_tl_gset:Ne \g_@@_result_tl
+ \__kernel_tl_gset:Nx \g_@@_result_tl
{
\exp_after:wN \@@_decode_utf_xxxii_loop:NNNN
#2 \s_@@_stop \s_@@_stop \s_@@_stop \s_@@_stop
\prg_break_point:
}
- \@@_if_flag_error:nne { @@_error } { utf32-decode } { }
+ \@@_if_flag_error:Nne \l_@@_error_flag { utf32-decode } { }
}
\cs_new:Npn \@@_decode_utf_xxxii_loop:NNNN #1#2#3#4
{
@@ -2568,13 +2568,13 @@
\fi:
#1#2#3#4 \s_@@
\if_int_compare:w \@@_tmp:w #1#4 > \c_zero_int
- \flag_raise:n { @@_overflow }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overflow_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\else:
\if_int_compare:w \@@_tmp:w #2#3 > 16 \exp_stop_f:
- \flag_raise:n { @@_overflow }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_overflow_flag
+ \flag_raise:N \l_@@_error_flag
\int_use:N \c_@@_replacement_char_int
\else:
\int_eval:n
@@ -2588,8 +2588,8 @@
{
\tl_if_empty:nF {#1}
{
- \flag_raise:n { @@_end }
- \flag_raise:n { @@_error }
+ \flag_raise:N \l_@@_end_flag
+ \flag_raise:N \l_@@_error_flag
#1 \s_@@
\int_use:N \c_@@_replacement_char_int \s_@@
}
diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx
index dbb2180516..80b26ea9bc 100644
--- a/macros/latex/contrib/l3kernel/l3str.dtx
+++ b/macros/latex/contrib/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -990,7 +990,7 @@
% Similar to corresponding \pkg{l3tl} base functions, except that
% \cs{__kernel_exp_not:w} is replaced with \cs{__kernel_tl_to_str:w}.
% Just like token list, string constants use \cs{cs_gset_nopar:Npe}
-% instead of \cs{__kernel_tl_gset:Ne} so that the scope checking for
+% instead of \cs{__kernel_tl_gset:Nx} so that the scope checking for
% |c| is applied when \pkg{l3debug} is used.
% To maintain backward compatibility, in
% \cs[index=str_put_left:Nn]{str_(g)put_left:Nn} and
@@ -999,9 +999,9 @@
% to prevent further expansion.
% \begin{macrocode}
\cs_new_protected:Npn \str_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_tl_to_str:w {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_tl_to_str:w {#2} } }
\cs_gset_protected:Npn \str_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_tl_to_str:w {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_tl_to_str:w {#2} } }
\cs_new_protected:Npn \str_const:Nn #1#2
{
\__kernel_chk_if_free_cs:N #1
@@ -1009,22 +1009,22 @@
}
\cs_new_protected:Npn \str_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \str_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \str_put_right:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} }
}
\cs_new_protected:Npn \str_gput_right:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} }
}
\cs_generate_variant:Nn \str_set:Nn { NV , Ne , Nx , c , cV , ce , cx }
@@ -1061,13 +1061,13 @@
% hide in braces.
% \begin{macrocode}
\cs_new_protected:Npn \str_replace_once:Nnn
- { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_set:Ne }
+ { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_set:Nx }
\cs_new_protected:Npn \str_greplace_once:Nnn
- { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_gset:Ne }
+ { \@@_replace:NNNnn \prg_do_nothing: \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \str_replace_all:Nnn
- { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_set:Ne }
+ { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \str_greplace_all:Nnn
- { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_gset:Ne }
+ { \@@_replace:NNNnn \@@_replace_next:w \__kernel_tl_gset:Nx }
\cs_generate_variant:Nn \str_replace_once:Nnn { c }
\cs_generate_variant:Nn \str_greplace_once:Nnn { c }
\cs_generate_variant:Nn \str_replace_all:Nnn { c }
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf
index 7e379d5eae..dda0393c17 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.pdf
+++ b/macros/latex/contrib/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex
index c66e0df5d1..d2e46f56c4 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.tex
+++ b/macros/latex/contrib/l3kernel/l3styleguide.tex
@@ -187,7 +187,7 @@ The only exception is where a \enquote{family} of modules share some
Any internal functions or variables \emph{must} be documented in the same way
as public ones.
-The \pkg{l3docstrip} method should be used for internal functions in a module.
+The \pkg{DocStrip} method should be used for internal functions in a module.
This requires a line
\begin{quote}
\ttfamily
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
index 5fc4a89708..0bce9ea22a 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
index 1fbac1e5b4..0b64e14487 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
@@ -43,8 +43,8 @@ The released version of this bundle is available from CTAN.
This file describes functions that were expected to be completely
stable, but whose syntax has changed in ways that may potentially
require code relying on them to be changed. This file does not include
-bug-fixes, nor backward-compatible extensions of the syntax, nor changes
-to functions in \pkg{l3candidates}, nor functions that were completely
+bug-fixes, nor backward-compatible extensions of the syntax,
+nor functions that were completely
deprecated: the latter are listed in \texttt{l3obsolete.txt}. Only
changes after August 2011 are listed, with an approximate date.
diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx
index 0195a6e781..1d628ed6a8 100644
--- a/macros/latex/contrib/l3kernel/l3sys.dtx
+++ b/macros/latex/contrib/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -1142,7 +1142,7 @@ end
\tl_new:N \g_@@_backend_tl
\@@_finalise:n
{
- \__kernel_tl_gset:Ne \g_@@_backend_tl
+ \__kernel_tl_gset:Nx \g_@@_backend_tl
{
\sys_if_engine_xetex:TF
{ xetex }
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
index 2e4db4a60c..da4ee7e729 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.pdf
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index e5d854ff18..10e68fe763 100644
--- a/macros/latex/contrib/l3kernel/l3text-case.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text-map.dtx b/macros/latex/contrib/l3kernel/l3text-map.dtx
index bec0df2943..b1787a2f73 100644
--- a/macros/latex/contrib/l3kernel/l3text-map.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-map.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx
index 6f8be11b3a..2e57a3c3d3 100644
--- a/macros/latex/contrib/l3kernel/l3text-purify.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx
index 61de77d6ab..0631cc4695 100644
--- a/macros/latex/contrib/l3kernel/l3text.dtx
+++ b/macros/latex/contrib/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
index 99469d92c4..4c85ed51d9 100644
--- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -806,7 +806,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_analysis_b:n #1
{
- \__kernel_tl_gset:Ne \g_@@_analysis_result_tl
+ \__kernel_tl_gset:Nx \g_@@_analysis_result_tl
{
\@@_analysis_b_loop:w 0; #1
\prg_break_point:
diff --git a/macros/latex/contrib/l3kernel/l3tl-build.dtx b/macros/latex/contrib/l3kernel/l3tl-build.dtx
index 645f052d15..66b5a2d03e 100644
--- a/macros/latex/contrib/l3kernel/l3tl-build.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl-build.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -59,6 +59,14 @@
% constructed token list cannot be accessed during construction other than
% by methods provided in this section.
%
+% Whilst the exact performance difference is dependent on the size of each
+% added block of tokens and the total number of blocks, in general, the
+% \cs[no-index]{tl_build_(g)put...} functions will out-perform the basic
+% \cs[no-index]{tl_(g)put...} equivalent if more than 100 non-empty addition
+% operations occur. See
+% \url{https://github.com/latex3/latex3/issues/1393#issuecomment-1880164756}
+% for a more detailed analysis.
+%
% \begin{function}[added = 2018-04-01]{\tl_build_begin:N, \tl_build_gbegin:N}
% \begin{syntax}
% \cs{tl_build_begin:N} \meta{tl~var}
@@ -285,12 +293,12 @@
% \begin{macrocode}
\cs_new_protected:Npn \tl_build_end:N #1
{
- \@@_build_get:NNN \__kernel_tl_set:Ne #1 #1
+ \@@_build_get:NNN \__kernel_tl_set:Nx #1 #1
\exp_args:Nc \@@_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_clear:N
}
\cs_new_protected:Npn \tl_build_gend:N #1
{
- \@@_build_get:NNN \__kernel_tl_gset:Ne #1 #1
+ \@@_build_get:NNN \__kernel_tl_gset:Nx #1 #1
\exp_args:Nc \@@_build_end_loop:NN { \cs_to_str:N #1 ' } \tl_gclear:N
}
\cs_new_protected:Npn \@@_build_end_loop:NN #1#2
@@ -308,7 +316,7 @@
% \begin{macro}{\tl_build_get_intermediate:NN}
% \begin{macrocode}
\cs_new_protected:Npn \tl_build_get_intermediate:NN
- { \@@_build_get:NNN \__kernel_tl_set:Ne }
+ { \@@_build_get:NNN \__kernel_tl_set:Nx }
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index 0249c36aef..5429f19c54 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -103,11 +103,11 @@
% \tl_const:cn, \tl_const:ce
% }
% \begin{syntax}
-% \cs{tl_const:Nn} \meta{tl~var} \Arg{token list}
+% \cs{tl_const:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Creates a new constant \meta{tl~var} or raises an error
% if the name is already taken. The value of the
-% \meta{tl~var} is set globally to the \meta{token list}.
+% \meta{tl~var} is set globally to the \meta{tokens}.
% \end{function}
%
% \begin{function}{\tl_clear:N, \tl_clear:c, \tl_gclear:N, \tl_gclear:c}
@@ -235,7 +235,7 @@
% \cs{tl_if_empty_p:N} \meta{tl~var}
% \cs{tl_if_empty:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token list variable} is entirely empty
+% Tests if the \meta{tl~var} is entirely empty
% (\emph{i.e.}~contains no tokens at all).
% \end{function}
%
@@ -255,7 +255,7 @@
% \cs{tl_if_eq_p:NN} \meta{tl~var_1} \meta{tl~var_2}
% \cs{tl_if_eq:NNTF} \meta{tl~var_1} \meta{tl~var_2} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Compares the content of two \meta{token list variables} and
+% Compares the content of \meta{tl~var_1} and \meta{tl~var_2} and
% is logically \texttt{true} if the two contain the same list of
% tokens (\emph{i.e.}~identical in both the list of characters they
% contain and the category codes of those characters). Thus for example
@@ -272,7 +272,7 @@
% \begin{syntax}
% \cs{tl_if_eq:NnTF} \meta{tl~var_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token list variable_1} and the \meta{token
+% Tests if the \meta{tl~var_1} and the \meta{token
% list_2} contain the same list of tokens, both in respect of
% character codes and category codes. This conditional is not
% expandable: see \cs{tl_if_eq:NNTF} for an expandable version when
@@ -540,12 +540,12 @@
% \begin{function}[added = 2012-05-13, EXP]
% {\tl_count:n, \tl_count:V, \tl_count:v, \tl_count:e, \tl_count:o}
% \begin{syntax}
-% \cs{tl_count:n} \Arg{tokens}
+% \cs{tl_count:n} \Arg{token list}
% \end{syntax}
-% Counts the number of \meta{items} in \meta{tokens} and leaves this
+% Counts the number of \meta{items} in the \meta{token list} and leaves this
% information in the input stream. Unbraced tokens count as one
% element as do each token group (|{|\ldots|}|). This process
-% ignores any unprotected spaces within \meta{tokens}. See also
+% ignores any unprotected spaces within the \meta{token list}. See also
% \cs{tl_count:N}. This function requires three expansions,
% giving an \meta{integer denotation}.
% \end{function}
@@ -564,9 +564,9 @@
%
% \begin{function}[EXP, added = 2019-02-25]{\tl_count_tokens:n}
% \begin{syntax}
-% \cs{tl_count_tokens:n} \Arg{tokens}
+% \cs{tl_count_tokens:n} \Arg{token list}
% \end{syntax}
-% Counts the number of \TeX{} tokens in the \meta{tokens} and leaves
+% Counts the number of \TeX{} tokens in the \meta{token list} and leaves
% this information in the input stream. Every token, including spaces and
% braces, contributes one to the total; thus for instance, the token count of
% |a~{bc}| is $6$.
@@ -603,7 +603,7 @@
% that \meta{item_1}\meta{item_2}\meta{item_3} \ldots \meta{item_n}
% becomes \meta{item_n}\ldots \meta{item_3}\meta{item_2}\meta{item_1}.
% This process preserves unprotected spaces within the
-% \meta{token list variable}. Braced token groups are copied without
+% \meta{tl~var}. Braced token groups are copied without
% reversing the order of tokens, but keep the outer set of braces.
% This is equivalent to a combination of an assignment and
% \cs{tl_reverse:V}. See also \cs{tl_reverse_items:n} for improved
@@ -769,11 +769,11 @@
% {\tl_map_tokens:Nn, \tl_map_tokens:cn, \tl_map_tokens:nn}
% \begin{syntax}
% \cs{tl_map_tokens:Nn} \meta{tl~var} \Arg{code}
-% \cs{tl_map_tokens:nn} \Arg{tokens} \Arg{code}
+% \cs{tl_map_tokens:nn} \Arg{token list} \Arg{code}
% \end{syntax}
% Analogue of \cs{tl_map_function:NN} which maps several tokens
% instead of a single function. The \meta{code} receives each \meta{item} in
-% the \meta{tl~var} or in \meta{tokens} as a trailing brace group. For
+% the \meta{tl~var} or in the \meta{token list} as a trailing brace group. For
% instance,
% \begin{verbatim}
% \tl_map_tokens:Nn \l_my_tl { \prg_replicate:nn { 2 } }
@@ -816,7 +816,7 @@
% \cs{tl_map_break:}
% \end{syntax}
% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all
-% entries in the \meta{token list variable} have been processed. This
+% entries in the \meta{token list} have been processed. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
% \tl_map_inline:Nn \l_my_tl
@@ -830,9 +830,9 @@
% level \TeX{} errors.
% \begin{texnote}
% When the mapping is broken, additional tokens may be inserted
-% before the \meta{tokens} are
-% inserted into the input stream.
-% This depends on the design of the mapping function.
+% before further items are taken
+% from the input stream. This depends on the design of the mapping
+% function.
% \end{texnote}
% \end{function}
%
@@ -841,7 +841,7 @@
% \cs{tl_map_break:n} \Arg{code}
% \end{syntax}
% Used to terminate a \cs[no-index]{tl_map_\ldots} function before all
-% entries in the \meta{token list variable} have been processed, inserting
+% entries in the \meta{token list} have been processed, inserting
% the \meta{code} after the mapping has ended. This
% normally takes place within a conditional statement, for example
% \begin{verbatim}
@@ -1170,7 +1170,7 @@
% \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Removes the first (leftmost) occurrence of \meta{tokens} from the
-% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#|
+% \meta{tl~var}. The \meta{tokens} cannot contain |{|, |}| or |#|
% (more precisely, explicit character tokens with category code $1$
% (begin-group) or $2$ (end-group), and tokens with category code $6$).
% \end{function}
@@ -1186,7 +1186,7 @@
% \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens}
% \end{syntax}
% Removes all occurrences of \meta{tokens} from the
-% \meta{tl~var}. \meta{Tokens} cannot contain |{|, |}| or |#|
+% \meta{tl~var}. The \meta{tokens} cannot contain |{|, |}| or |#|
% (more precisely, explicit character tokens with category code $1$
% (begin-group) or $2$ (end-group), and tokens with category code $6$).
% As this function
@@ -1346,12 +1346,12 @@
%
% \subsection{Functions}
%
-% \begin{macro}{\__kernel_tl_set:Ne,\__kernel_tl_gset:Ne}
+% \begin{macro}{\__kernel_tl_set:Nx,\__kernel_tl_gset:Nx}
% These two are supplied to get better performance for macros which would
% otherwise use \cs{tl_set:Ne} or \cs{tl_gset:Ne} internally.
% \begin{macrocode}
-\cs_new_eq:NN \__kernel_tl_set:Ne \cs_set_nopar:Npe
-\cs_new_eq:NN \__kernel_tl_gset:Ne \cs_gset_nopar:Npe
+\cs_new_eq:NN \__kernel_tl_set:Nx \cs_set_nopar:Npe
+\cs_new_eq:NN \__kernel_tl_gset:Nx \cs_gset_nopar:Npe
% \end{macrocode}
% \end{macro}
%
@@ -1374,7 +1374,7 @@
% \tl_const:cn, \tl_const:ce, \tl_const:cx
% }
% Constants are also easy to generate. They use \cs{cs_gset_nopar:Npe} instead
-% of \cs{__kernel_tl_gset:Ne} so that the correct scope checking for |c|,
+% of \cs{__kernel_tl_gset:Nx} so that the correct scope checking for |c|,
% instead of for |g|, is applied when
% \cs{debug_on:n} |{ check-declarations }| is used.
% Constant assignment functions are patched specially in \pkg{l3debug} to
@@ -1444,7 +1444,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \tl_concat:NNN #1#2#3
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#3}
@@ -1452,7 +1452,7 @@
}
\cs_new_protected:Npn \tl_gconcat:NNN #1#2#3
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#3}
@@ -1519,13 +1519,13 @@
% by hand as it is used quite a lot.
% \begin{macrocode}
\cs_new_protected:Npn \tl_set:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_set:No #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_new_protected:Npn \tl_gset:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w {#2} } }
\cs_new_protected:Npn \tl_gset:No #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Ne , Nf }
\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , ce , cf }
\cs_generate_variant:Nn \tl_set:No { c }
@@ -1556,22 +1556,22 @@
% \begin{macrocode}
\cs_new_protected:Npn \tl_put_left:Nn #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:NV #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:Nv #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_put_left:Ne #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \tex_expanded:D { {#2} }
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1579,7 +1579,7 @@
}
\cs_new_protected:Npn \tl_put_left:No #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1587,22 +1587,22 @@
}
\cs_new_protected:Npn \tl_gput_left:Nn #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:NV #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \exp_not:V #2 \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:Nv #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \exp_not:v {#2} \__kernel_exp_not:w \exp_after:wN {#1} }
}
\cs_new_protected:Npn \tl_gput_left:Ne #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \tex_expanded:D { {#2} }
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1610,7 +1610,7 @@
}
\cs_new_protected:Npn \tl_gput_left:No #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#2}
\__kernel_exp_not:w \exp_after:wN {#1}
@@ -1649,20 +1649,20 @@
% The same on the right.
% \begin{macrocode}
\cs_new_protected:Npn \tl_put_right:Nn #1#2
- { \__kernel_tl_set:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
+ { \__kernel_tl_set:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_put_right:NV #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
\cs_new_protected:Npn \tl_put_right:Nv #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
}
\cs_new_protected:Npn \tl_put_right:Ne #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \tex_expanded:D { {#2} }
@@ -1670,27 +1670,27 @@
}
\cs_new_protected:Npn \tl_put_right:No #1#2
{
- \__kernel_tl_set:Ne #1
+ \__kernel_tl_set:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \exp_after:wN {#2}
}
}
\cs_new_protected:Npn \tl_gput_right:Nn #1#2
- { \__kernel_tl_gset:Ne #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
+ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN { #1 #2 } } }
\cs_new_protected:Npn \tl_gput_right:NV #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:V #2 }
}
\cs_new_protected:Npn \tl_gput_right:Nv #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{ \__kernel_exp_not:w \exp_after:wN {#1} \exp_not:v {#2} }
}
\cs_new_protected:Npn \tl_gput_right:Ne #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \tex_expanded:D { {#2} }
@@ -1698,7 +1698,7 @@
}
\cs_new_protected:Npn \tl_gput_right:No #1#2
{
- \__kernel_tl_gset:Ne #1
+ \__kernel_tl_gset:Nx #1
{
\__kernel_exp_not:w \exp_after:wN {#1}
\__kernel_exp_not:w \exp_after:wN {#2}
@@ -2041,13 +2041,13 @@
% the \meta{tl~var} by \meta{token list}.
% \begin{macrocode}
\cs_new_protected:Npn \tl_replace_once:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_set:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_once:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_gset:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_wrap:w \__kernel_tl_gset:Nx }
\cs_new_protected:Npn \tl_replace_all:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_set:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_set:Nx }
\cs_new_protected:Npn \tl_greplace_all:Nnn
- { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_gset:Ne }
+ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_gset:Nx }
\cs_generate_variant:Nn \tl_replace_once:Nnn
{ NnV , Nne , NV , Ne , Nee , c , cnV , cne , cV , ce , cee }
\cs_generate_variant:Nn \tl_replace_once:Nnn
@@ -2904,9 +2904,9 @@
{ \@@_trim_spaces:nn { \@@_trim_mark: #1 } { \exp_args:No #2 } }
\cs_generate_variant:Nn \tl_trim_spaces_apply:nN { o }
\cs_new_protected:Npn \tl_trim_spaces:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
\cs_new_protected:Npn \tl_gtrim_spaces:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \tl_trim_spaces:n {#1} } }
\cs_generate_variant:Nn \tl_trim_spaces:N { c }
\cs_generate_variant:Nn \tl_gtrim_spaces:N { c }
% \end{macrocode}
@@ -3208,17 +3208,22 @@
% \begin{macro}[EXP]
% {
% \@@_if_head_is_N_type_auxi:w ,
-% \@@_if_head_is_N_type_auxii:nn ,
-% \@@_if_head_is_N_type_auxiii:n
+% \@@_if_head_is_N_type_auxii:n ,
% }
% A token list can be empty, can start with an explicit space
% character (catcode 10 and charcode 32), can start with a begin-group
% token (catcode 1), or start with an \texttt{N}-type argument. In
-% the first two cases, the line involving \cs{@@_if_head_is_N_type_auxi:w}
-% produces~|f| (and otherwise nothing). In the third case
-% (begin-group token), the lines involving \cs{token_to_str:N} produce a
-% single closing brace. The category code test is thus true exactly
-% in the fourth case, which is what we want. One cannot optimize by
+% the first two cases, and when |#1~| starts with |{}~|,
+% \cs{@@_if_head_is_N_type_auxi:w} receives an empty argument hence
+% produces |f| and removes everything before the first
+% \cs{scan_stop:}. In the third case (except when |#1~| starts with
+% |{}~|), the second auxiliary removes the first copy of~|#1| that was
+% used for the space test, then expands \cs{token_to_str:N} which hits
+% the leading begin-group token, leaving a single closing brace to be
+% compared with \cs{scan_stop:}. In the last case,
+% \cs{token_to_str:N} does not change the brace balance so that only
+% \cs{scan_stop:} \cs{scan_stop:} remain, making the character code
+% test true. One cannot optimize by
% moving one of the \cs{scan_stop:} to the beginning: if |#1| contains
% primitive conditionals, all of its occurrences must be dealt with before
% the \cs{if:w} tries to skip the \texttt{true} branch of the
@@ -3227,7 +3232,7 @@
\prg_new_conditional:Npnn \tl_if_head_is_N_type:n #1 { p , T , F , TF }
{
\if:w
- \if_false: { \fi: \@@_if_head_is_N_type_auxi:w \prg_do_nothing: #1 ~ }
+ \if_false: { \fi: \@@_if_head_is_N_type_auxi:w #1 ~ }
{ \exp_after:wN { \token_to_str:N #1 } }
\scan_stop: \scan_stop:
\prg_return_true:
@@ -3237,7 +3242,7 @@
}
\exp_args:Nno \use:n { \cs_new:Npn \@@_if_head_is_N_type_auxi:w #1 ~ }
{
- \tl_if_empty:oTF { #1 }
+ \tl_if_empty:nTF {#1}
{ f \exp_after:wN \use_none:nn }
{ \exp_after:wN \@@_if_head_is_N_type_auxii:n }
\exp_after:wN { \if_false: } \fi:
@@ -3481,9 +3486,9 @@
% which stops the \texttt{f}-expansion.
% \begin{macrocode}
\cs_new_protected:Npn \tl_reverse:N #1
- { \__kernel_tl_set:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+ { \__kernel_tl_set:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_new_protected:Npn \tl_greverse:N #1
- { \__kernel_tl_gset:Ne #1 { \exp_args:No \tl_reverse:n { #1 } } }
+ { \__kernel_tl_gset:Nx #1 { \exp_args:No \tl_reverse:n { #1 } } }
\cs_generate_variant:Nn \tl_reverse:N { c }
\cs_generate_variant:Nn \tl_greverse:N { c }
% \end{macrocode}
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index 1f3113a659..add3e80eff 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
@@ -1522,7 +1522,7 @@
% Before doing any actual conversion, first some special case filtering.
% Spaces are out here as \LuaTeX{} emulation only makes normal (charcode
% $32$ spaces). However, |^^@| is filtered out separately as that can't be
-% done with macro emulation either, so is flagged up separately. That
+% done with macro emulation either, so is treated separately. That
% done, hand off to the engine-dependent part.
% \begin{macrocode}
\cs_new:Npn \@@_generate_aux:w #1 ; #2 ;
diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx
index df2a5189db..ce11f62ae2 100644
--- a/macros/latex/contrib/l3kernel/l3unicode.dtx
+++ b/macros/latex/contrib/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-01-04}
+% \date{Released 2024-01-22}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf
index 8485500fb3..d74db5c796 100644
--- a/macros/latex/contrib/l3kernel/source3.pdf
+++ b/macros/latex/contrib/l3kernel/source3.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex
index 8066b02fda..5ccc140197 100644
--- a/macros/latex/contrib/l3kernel/source3body.tex
+++ b/macros/latex/contrib/l3kernel/source3body.tex
@@ -321,7 +321,7 @@ following variable types:
\item[\texttt{box}] Box register.
\item[\texttt{coffin}] A \enquote{box with handles} --- a higher-level
data type for carrying out \texttt{box} alignment operations.
- \item[\texttt{flag}] Integer that can be incremented expandably.
+ \item[\texttt{flag}] Non-negative integer that can be incremented expandably.
\item[\texttt{fparray}] Fixed-size array of floating point values.
\item[\texttt{intarray}] Fixed-size array of integers.
\item[\texttt{ior}/\texttt{iow}] An input or output stream, for
@@ -335,7 +335,7 @@ following variable types:
Modules focussed on variable usage typically provide four scratch variables,
two local and two global, with names of the form
-\cs{\meta{scope}_tmpa_\meta{type}}/\cs{\meta{scope}_tmpb_\meta{type}}. These
+\cs[no-index]{\meta{scope}_tmpa_\meta{type}}/\cs[no-index]{\meta{scope}_tmpb_\meta{type}}. These
are never used by the core code. The nature of \TeX{} grouping means that as
with any other scratch variable, these should only be set and used with no
intervening third-party code.
@@ -607,9 +607,7 @@ used on top of \LaTeXe{} if \tn{outer} tokens are used in the arguments.
\DocInput{l3color.dtx}
\DocInput{l3pdf.dtx}
-\part{Additions and removals}
-
-\DocInput{l3candidates.dtx}
+\part{Removals}
\ExplSyntaxOn
\clist_gput_right:Nn \g_docinput_clist { l3deprecation.dtx }
diff --git a/macros/latex/contrib/mcmthesis/figures/qrcodewechat.jpg b/macros/latex/contrib/mcmthesis/figures/qrcodewechat.jpg
new file mode 100644
index 0000000000..b7cde51674
--- /dev/null
+++ b/macros/latex/contrib/mcmthesis/figures/qrcodewechat.jpg
Binary files differ
diff --git a/macros/latex/contrib/mcmthesis/mcmthesis-demo.pdf b/macros/latex/contrib/mcmthesis/mcmthesis-demo.pdf
index 853b949069..ed01017921 100644
--- a/macros/latex/contrib/mcmthesis/mcmthesis-demo.pdf
+++ b/macros/latex/contrib/mcmthesis/mcmthesis-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/mcmthesis/mcmthesis.dtx b/macros/latex/contrib/mcmthesis/mcmthesis.dtx
index 048757784b..5ba899a077 100644
--- a/macros/latex/contrib/mcmthesis/mcmthesis.dtx
+++ b/macros/latex/contrib/mcmthesis/mcmthesis.dtx
@@ -1,9 +1,7 @@
% \iffalse meta-comment
-%
% This is file `mcmthesis.dtx'.
%
-% Copyright (C)
-% 2010 -- 2015 by latexstudio
+% Copyright (C) 2010 -- 2015 by latexstudio
% 2014 -- 2019 by Liam Huang
% 2019 -- present by latexstudio.net
% -----------------------------------
@@ -17,7 +15,7 @@
%
% This work has the LPPL maintenance status `maintained'.
%
-% The Current Maintainer of this work is Liam Huang.
+% The Current Maintainer of this work is LaTeXStudio.
%
%<*internal>
\begingroup
@@ -32,11 +30,9 @@
\preamble
-----------------------------------
-
This is a generated file.
-Copyright (C)
- 2010 -- 2015 by latexstudio
+Copyright (C) 2010 -- 2015 by latexstudio
2014 -- 2019 by Liam Huang
2019 -- present by latexstudio.net
@@ -48,8 +44,6 @@ The latest version of this license is in
and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-This work has the LPPL maintenance status `maintained'.
-
The Current Maintainer of this work is latexstudio.net.
\endpreamble
@@ -104,16 +98,17 @@ and the derived files \jobname.cls,
%</internal>
%<*driver>
\ProvidesFile{mcmthesis.dtx}
- [2024/01/15 v6.3.2 The Thesis Template Designed For MCM/ICM]
+ [2024/01/22 v6.3.3 The Thesis Template Designed For MCM/ICM]
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
-\usepackage[UTF8, fntef]{ctexcap}
+\usepackage[UTF8, fontset=fandol,fntef]{ctexcap}
\usepackage{hologo}
\usepackage{xcolor}
\usepackage{longtable}
\usepackage{booktabs}
+\usepackage{graphicx}
\usepackage{listings}
\usepackage{multirow}
\usepackage{amsmath}
@@ -122,13 +117,13 @@ and the derived files \jobname.cls,
\definecolor{darkblue}{rgb}{0,0,0.3}
\lstset{
language=[LaTeX]TeX,
-% style
+ % style
frame=lines,%
basicstyle={\footnotesize\ttfamily},%
keywordstyle=\color{darkblue}\bfseries,%
identifierstyle=,%
commentstyle=\color{darkgreen},%\itshape,%
- stringstyle=\color{black}%
+ stringstyle=\color{black},%
}
\AtBeginDocument{\hypersetup{colorlinks=true}}
\newcommand{\pkg}[1]{\textsf{#1}}
@@ -146,7 +141,7 @@ and the derived files \jobname.cls,
%</driver>
% \fi
%
-% \CheckSum{530}
+% \CheckSum{673}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -164,7 +159,7 @@ and the derived files \jobname.cls,
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \changes{v6.3.2}{2024/01/19}{更新版面尺寸,细节格式。}
+% \changes{v6.3.3}{2024/01/22}{修改几个样式错误,增加了生成式 AI 引用样式。}
%
% \GetFileInfo{\jobname.dtx}
%
@@ -193,14 +188,16 @@ and the derived files \jobname.cls,
% 用 key-value 语法重构了文档选项,并修复了一些 bug。2015 年年初,黄晨成将模板使用
% \pkg{DocStrip} 的语法重构,并上传至 CTAN。
%
-% 详细的使用说明,可以参考\href{https://liam.page/2016/01/27/how-to-use-mcmthesis/}{这里}。我们也会持续维护更新在这里,
-% 大家可以到这里下载 \url{https://www.latexstudio.net}。
%
+%
+% 欢迎大家关注我们的微信公众号,更多更好的 \LaTeX{} 资料资讯:
+%
+% \centerline{\includegraphics[width=3.5cm]{./figures/qrcodewechat}}
% \section{手工安装说明}
%
% \subsection{下载}
%
-% 你可以到项目主页下载模板的最新版本。除去项目主页之外,不再维护任何镜像。
+% 你可以到项目主页下载最新版。如下是几个更新地址:
%
% \begin{description}
% \item [CTAN] \url{http://www.ctan.org/pkg/mcmthesis}
@@ -291,6 +288,7 @@ xelatex mcmthesis-demo.tex
% 当前,\pkg{mcmthesis} 有八个选项:
% \begin{description}
% \item [CTeX] 兼容选项,默认关闭。当使用 2.9.2.164 版本的 CTeX 套装时请打开。
+% \item [tstyle] 可以根据自己需要修改队号和题号的字体和颜色。
% \item [tcn] 队伍控制号码,接受一个字符串作为值;输入的值将显示在摘要页上和
% 每一页的页眉上;默认为 \texttt{0000}。
% \item [problem] 选题,接受一个字符串作为值;输入的值将显示在摘要页上;
@@ -401,6 +399,7 @@ xelatex mcmthesis-demo.tex
% \item [6.3] 修改summary的版面样式。
% \item [6.3.1] 将默认的版面尺寸由 |a4paper| 修改为 |letterpaper|。
% \item [6.3.2] 修复了一些版式异常和兼容性问题。
+% \item [6.3.3] 修改几个样式错误,增加了生成式 AI 引用样式。
% \end{description}
%
% \title{\hypertarget{English}{%
@@ -531,6 +530,7 @@ xelatex mcmthesis-demo.tex
%
% \pkg{mcmthesis} has seven options.
% \begin{description}
+% \item [tstyle] change the text color of the team control number and problem no.
% \item [tcn] The team control number, recieves a string as value;
% this value will be displayed on summary sheet and every page's header.
% The default value is \texttt{0000}.
@@ -638,6 +638,7 @@ xelatex mcmthesis-demo.tex
% \item [6.3] Change summary sheet layout and demo code.
% \item [6.3.1] Change the default papersize, frome |a4paper| to |letterpaper|.
% \item [6.3.2] fixed some bugs and ctex compatibility.
+% \item [6.3.3] Fixed several styling errors and added the reference style for the generative AI.
% \end{description}
%
% \StopEventually{}
@@ -647,9 +648,9 @@ xelatex mcmthesis-demo.tex
%<*class>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{mcmthesis}
- [2024/01/19 v6.3.2 The Thesis Template Designed For MCM/ICM]
+ [2024/01/22 v6.3.3 The Thesis Template Designed For MCM/ICM]
\typeout{The Thesis Template Designed For MCM/ICM}
-\def\MCMversion{v6.3.2}
+\def\MCMversion{v6.3.3}
% \end{macrocode}
% \subsection{Options}
%
@@ -667,13 +668,16 @@ xelatex mcmthesis-demo.tex
\define@boolkey{MCM}[MCM@opt@]{sheet}[true]{}
\define@boolkey{MCM}[MCM@opt@]{titleinsheet}[false]{}
\define@boolkey{MCM}[MCM@opt@]{keywordsinsheet}[false]{}
-\define@cmdkeys{MCM}[MCM@opt@]{tcn,problem}
+\define@cmdkeys{MCM}[MCM@opt@]{tcn,problem,tstyle}
\define@key{MCM}{tcn}[0000]{\gdef\MCM@opt@tcn{#1}}
\define@key{MCM}{problem}[A]{\gdef\MCM@opt@problem{#1}}
-\setkeys{MCM}{tcn=0000,problem=B}
+\define@key{MCM}{tstyle}[A]{\gdef\MCM@opt@tstyle{#1}}
+\setkeys{MCM}{tcn=0000,problem=B,tstyle=\color{red}\bfseries}
\define@key{mcmthesis.cls}{tcn}[0000]{\gdef\MCM@opt@tcn{#1}}
\define@key{mcmthesis.cls}{problem}[A]{\gdef\MCM@opt@problem{#1}}
+\define@key{mcmthesis.cls}{tstyle}[A]{\gdef\MCM@opt@tstyle{#1}}
+\define@boolkey{mcmthesis.cls}[MCM@opt@]{CTeX}{}
\define@boolkey{mcmthesis.cls}[MCM@opt@]{titlepage}{}
\define@boolkey{mcmthesis.cls}[MCM@opt@]{abstract}{}
\define@boolkey{mcmthesis.cls}[MCM@opt@]{sheet}{}
@@ -711,7 +715,7 @@ xelatex mcmthesis-demo.tex
% \begin{macrocode}
\RequirePackage{fancyhdr, fancybox}
\RequirePackage{ifthen}
-\RequirePackage{lastpage}
+% \RequirePackage{lastpage}
\RequirePackage{listings}
\RequirePackage[toc, page, title, titletoc, header]{appendix}
\RequirePackage{paralist}
@@ -769,10 +773,18 @@ xelatex mcmthesis-demo.tex
%
% Making the footer and header.
% \begin{macrocode}
-\pagestyle{fancy}
+\fancypagestyle{main}{
\fancyhf{}
\lhead{\small\sffamily \team}
\rhead{\small\sffamily Page \thepage\ of \pageref{LastPage}}
+}
+\pagestyle{main}
+
+\fancypagestyle{aimain}{
+\fancyhf{}
+\lhead{\small\sffamily \team}
+\rhead{\small\sffamily Page \thepage }
+}
% \end{macrocode}
%
% Setting \cs{parskip}.
@@ -848,19 +860,19 @@ xelatex mcmthesis-demo.tex
\newbox\@abstract%
\setbox\@abstract\hbox{}%
\long\def\abstract{\bgroup\global\setbox\@abstract\vbox\bgroup\hsize\textwidth\leftskip1cm\rightskip1cm}%
- \def\endabstract{\egroup\egroup}
+ \def\endabstract{\egroup\egroup}%
\def\make@abstract{%
- \begin{center}
- \textbf{\abstractname}
- \end{center}
+ \begin{center}%
+ \textbf{\abstractname}%
+ \end{center}%
\usebox\@abstract\par
}
\else
\RenewEnviron{abstract}{\xdef\@abstract{\expandonce\BODY}}
\def\make@abstract{%
- \begin{center}
- \textbf{\abstractname}
- \end{center}
+ \begin{center}%
+ \textbf{\abstractname}%
+ \end{center}%
\@abstract\par
}
\fi
@@ -914,7 +926,7 @@ xelatex mcmthesis-demo.tex
\begin{minipage}[t]{0.33\linewidth}
\centering%
\textbf{Problem Chosen}\\[0.7pc]
- {\Large\textcolor{red}{\MCM@opt@problem}}\\[2.8pc]
+ {\Large \MCM@opt@tstyle {\MCM@opt@problem}}\\[2.8pc]
\end{minipage}%
\begin{minipage}[t]{0.33\linewidth}
\centering%
@@ -923,7 +935,7 @@ xelatex mcmthesis-demo.tex
\begin{minipage}[t]{0.33\linewidth}
\centering%
\textbf{Team Control Number}\\[0.7pc]
- {\Large\textcolor{red}{\MCM@opt@tcn}}\\[2.8pc]
+ {\Large\MCM@opt@tstyle{\MCM@opt@tcn}}\\[2.8pc]
\end{minipage}\par
\rule{\linewidth}{1.5pt}
\endgroup
@@ -967,7 +979,7 @@ xelatex mcmthesis-demo.tex
}
% \end{macrocode}
%
-% \changes{6.2.2}{2019/01/26}{新增 memo 环境}
+% \changes{6.3.3}{2024/01/22}{新增生成式AI引用样式}
% \subsection{the memo environment}
% Defining macros to store information here.
% \begin{macrocode}
@@ -995,7 +1007,7 @@ xelatex mcmthesis-demo.tex
% with logo specified
\begin{minipage}[t]{\columnwidth}%
\begin{flushright}
- \vspace{-0.6in}
+ \vspace{-0.2in}
\MCM@memologo
\vspace{0.5in}
\par\end{flushright}%
@@ -1078,9 +1090,59 @@ xelatex mcmthesis-demo.tex
keywordstyle=\color{darkblue}\bfseries,%
identifierstyle=,%
commentstyle=\color{darkgreen},%\itshape,%
- stringstyle=\color{black}%
+ stringstyle=\color{black},%
+ breaklines=true,%
+ postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space}
}
-\lstloadlanguages{C,C++,Java,Matlab,Mathematica}
+\lstloadlanguages{C,C++,Java,Matlab,python,Mathematica}
+
+% \end{macrocode}
+% \subsection{Report on Use of AI Settings}
+% \begin{macrocode}
+
+\def\AIcite{\@newl@bel b}
+\let\citation\@gobble
+\DeclareRobustCommand\AIcite{%
+ \@ifnextchar [{\@tempswatrue\@AIcitex}{\@tempswafalse\@AIcitex[]}}
+\def\@AIcitex[#1]#2{\leavevmode
+ \let\@AIcitea\@empty
+ \@AIcite{\@for\@AIciteb:=#2\do
+ {\@AIcitea\def\@AIcitea{,\penalty\@m\ }%
+ \edef\@AIciteb{\expandafter\@firstofone\@AIciteb\@empty}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@AIciteb}}\fi
+ \@ifundefined{b@\@AIciteb}{\hbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue
+ \@latex@warning
+ {Citation `\@AIciteb' on page \thepage \space undefined}}%
+ {\@AIcite@ofmt{\csname b@\@AIciteb\endcsname}}}}{#1}}
+\def\@AIcite#1#2{[AI: {#1\if@tempswa , #2\fi}]}
+\let\@AIcite@ofmt\hbox
+
+\def\reportname{Report on Use of AI}
+
+\providecommand\@AIlabel[1]{#1.~}
+
+\newenvironment{ReportAiUse}[1]
+ {\centerline{\underline{\large\sffamily\bfseries\reportname}}%
+ \vspace*{-.2em}
+ \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
+ \list{\@AIlabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@AIlabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \@openbib@code
+ \usecounter{enumiv}%
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \endlist}
+\def\AImatter{\label{LastPage}\clearpage\pagestyle{aimain}}
% \end{macrocode}
% \begin{macrocode}
%</class>
@@ -1089,47 +1151,21 @@ xelatex mcmthesis-demo.tex
% \iffalse
%<*demo>
%!TEX program = pdflatex|xelatex
-%%
-%% This is file `mcmthesis-demo.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% mcmthesis.dtx (with options: `demo')
-%%
-%% -----------------------------------
-%%
-%% This is a generated file.
-%%
-%% Copyright (C)
-%% 2010 -- 2015 by latexstudio
-%% 2014 -- 2019 by Liam Huang
-%% 2019 -- present by latexstudio.net
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% 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.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This work has the LPPL maintenance status `maintained'.
-%%
-%% The Current Maintainer of this work is latexstudio.net.
-%%
+%% !Mode:: "TeX:UTF-8"
\documentclass{mcmthesis}
%\documentclass[CTeX = true]{mcmthesis} % 当使用 CTeX 套装时请注释上一行使用该行的设置
-\mcmsetup{
- tcn = 0000, problem = A,
- sheet = true, titleinsheet = true, keywordsinsheet = true,
+\mcmsetup{tstyle=\color{red}\bfseries,%修改题号,队号的颜色和加粗显示,黑色可以修改为 black
+ tcn = 0000, problem = A, %修改队号,参赛题号
+ sheet = true, titleinsheet = true, keywordsinsheet = true,
titlepage = false, abstract = true}
- %三款字体可以选择
-\usepackage{times}
- %\usepackage{newtxtext}
- %\usepackage{palatino}
+ %四款字体可以选择
+ %\usepackage{times}
+ %\usepackage{newtxtext}
+ %\usepackage{palatino}
+ \usepackage{txfonts}
+\usepackage{indentfirst} %首行缩进,注释掉,首行就不再缩进。
\usepackage{lipsum}
\title{The \LaTeX{} Template for MCM Version \MCMversion}
\author{\small \href{https://www.latexstudio.net/}
@@ -1137,7 +1173,7 @@ xelatex mcmthesis-demo.tex
\date{\today}
\begin{document}
\begin{abstract}
-Use this template to begin typing the first page (summary page) of your electronic report. This template uses a 12-point Times New Roman font. Submit your paper as an Adobe PDF electronic file (e.g. 1111111.pdf), typed in English, with a readable font of at least 12-point type.
+\par Use this template to begin typing the first page (summary page) of your electronic report. This template uses a 12-point Times New Roman font. Submit your paper as an Adobe PDF electronic file (e.g. 1111111.pdf), typed in English, with a readable font of at least 12-point type.
Do not include the name of your school, advisor, or team members on this or any page.
@@ -1154,15 +1190,15 @@ keyword1; keyword2
\end{abstract}
\maketitle
%% Generate the Table of Contents, if it's needed.
-%% \tableofcontents
-%% \newpage
+\tableofcontents
+\newpage
%%
%% Generate the Memorandum, if it's needed.
%% \memoto{\LaTeX{}studio}
%% \memofrom{Liam Huang}
%% \memosubject{Happy \TeX{}ing!}
%% \memodate{\today}
-%% \logo{\LARGE I'm pretending to be a LOGO!}
+%% \memologo{\LARGE I'm pretending to be a LOGO!}
%% \begin{memo}[Memorandum]
%% \lipsum[1-3]
%% \end{memo}
@@ -1181,6 +1217,10 @@ mathematics. Install the software from
\url{www.tug.org/texlive/}.
\subsection{Creating and typesetting your document}
+Follow our WeChat official account for more LaTeX materials and information.
+
+\centerline{\includegraphics[width=5cm]{qrcodewechat}}
+
\subsection{Syntax (how to type \LaTeX\ commands --- these
are the rules)}
@@ -1247,8 +1287,7 @@ a^2 \label{aa}
\[
\arcsin \theta =
- \mathop{{\int\!\!\!\!\!\int\!\!\!\!\!\int}\mkern-31.2mu
- \bigodot}\limits_\varphi
+ \mathop{{\int\!\!\!\!\!\int\!\!\!\!\!\int}} \limits_\varphi
{\mathop {\lim }\limits_{x \to \infty } \frac{{n!}}{{r!\left( {n - r}
\right)!}}} \eqno (1)
\]
@@ -1283,9 +1322,14 @@ boarding time.We also know that all the service is automate.
\item \textbf{Improve the quality of the airport service}\\
Balancing the cost of the cost and the benefit, it will bring in
more convenient for airport and passengers.It also saves many
-human resources for the airline. \item \textbf{}
+human resources for the airline.
\end{itemize}
+\subsection{How to cite?}
+bibliography cite use \cite{1,2,3}
+
+AI cite use \AIcite{AI1,AI2,AI3}
+
\begin{thebibliography}{99}
\bibitem{1} D.~E. KNUTH The \TeX{}book the American
Mathematical Society and Addison-Wesley
@@ -1325,6 +1369,72 @@ some more text \textcolor[rgb]{0.98,0.00,0.00}{\textbf{Input C++ source:}}
\lstinputlisting[language=C++]{./code/mcmthesis-sudoku.cpp}
\end{appendices}
+
+%\label{LastPage} % put the label at end of paper
+
+\AImatter
+
+\begin{ReportAiUse}{9}
+\bibitem{AI1}
+Bing AI\\
+Query1: write a sort algorithm\\
+Output: Sure, I can help you with that. Here is a simple implementation of the selection sort algorithm in Python:
+% Python
+\begin{lstlisting}[language=python]
+def selection_sort(arr):
+ for i in range(len(arr)):
+ min_idx = i
+ for j in range(i + 1, len(arr)):
+ if arr[min_idx] > arr[j]:
+ min_idx = j
+ arr[i], arr[min_idx] = arr[min_idx], arr[i]
+ return arr
+\end{lstlisting}
+% AI-generated code. Review and use carefully. More info on FAQ.
+This algorithm sorts an array by repeatedly finding the minimum element from the unsorted part of the array and putting it at the beginning. \href{https://www.geeksforgeeks.org/sorting-algorithms/}{The time complexity of this algorithm is O($n^2$)}.
+
+There are many other sorting algorithms available such as bubble sort, insertion sort, merge sort, quick sort, heap sort, and more. Each of these algorithms has its own advantages and disadvantages. You can learn more about them on GeeksforGeeks and Programiz.
+
+I hope this helps!
+
+\bibitem{AI2}
+OpenAl Enie (Nov 5, 2023 version, Ernie 4.0)\\
+Query1: <insert the exact wording of any subsequent input into the Al tool>\\
+Output: <insert the complete output from the second query>
+
+\bibitem{AI3}
+Github CoPilot (Feb 3, 2024 version)\\
+Query1: <insert the exact wording you input into the Al tool>\\
+Output: <insert the complete output fron the Al tool>
+
+\bibitem{AI4}
+Google Bard (Feb 2,2024 version)\\
+Query: <insert the exact wording of your query>\\
+Output: <irsert the complete output from the Al tool>
+
+\bibitem{AI5}
+Bing AI\\
+Query: write a FFT algorithm\\
+Output: Sure, here is a Python implementation of the Fast Fourier Transform (FFT) algorithm:
+\begin{lstlisting}[language=python]
+import numpy as np
+
+def fft(x):
+ n = len(x)
+ if n == 1:
+ return x
+ even = fft(x[0::2])
+ odd = fft(x[1::2])
+ T = [np.exp(-2j * np.pi * k / n) * odd[k] for k in range(n // 2)]
+ return [even[k] + T[k] for k in range(n // 2)] + [even[k] - T[k] for k in range(n // 2)]
+\end{lstlisting}
+% AI-generated code. Review and use carefully. More info on FAQ.
+The FFT is a widely used algorithm for computing the \textbf{Discrete Fourier Transform (DFT)} of a sequence. It reduces the number of computations needed from O(n$^2$) to O(n log n) 12. The basic idea of the FFT is to apply divide and conquer. We divide the coefficient vector of the polynomial into two vectors, recursively compute the DFT for each of them, and combine the results to compute the DFT of the complete polynomial 3.
+
+I hope this helps!
+
+\end{ReportAiUse}
+
\end{document}
%</demo>
%<*readme>
diff --git a/macros/latex/contrib/mcmthesis/mcmthesis.pdf b/macros/latex/contrib/mcmthesis/mcmthesis.pdf
index a225536e45..0d27c28c04 100644
--- a/macros/latex/contrib/mcmthesis/mcmthesis.pdf
+++ b/macros/latex/contrib/mcmthesis/mcmthesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
index 62ee043d52..c6903922cf 100644
--- a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
+++ b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profcollege/latex/PfCBonbon.tex b/macros/latex/contrib/profcollege/latex/PfCBonbon.tex
index 37ddec940e..08be71cd4f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCBonbon.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCBonbon.tex
@@ -1,8 +1,8 @@
%%%
% Bonbon
%%%
-\setKVdefault[Bonbon]{CouleurUn=red,Bicolore=false,Echelle=1}
-\defKV[Bonbon]{CouleurDeux=\setKV[Bonbon]{Bicolore}}
+\setKVdefault[Bonbon]{CouleurUn=red,Bicolore=false,Echelle=1}%
+\defKV[Bonbon]{CouleurDeux=\setKV[Bonbon]{Bicolore}}%
\NewDocumentCommand\Bonbon{o}{%
\useKVdefault[Bonbon]%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex b/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex
index 81464aa744..dbe0adbd3e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex
@@ -141,16 +141,18 @@
\setKV[ClesCalculatrice]{#1}%
\ifboolKV[ClesCalculatrice]{Ecran}{%
\ifboolKV[ClesCalculatrice]{Calcul}{%
- \setsepchar[*]{,*§}%
+ \setsepchar[*]{,*§}\reademptyitems%
\readlist\ListeCalc{#2}%
}{%
- \setsepchar[*]{,*/}%
+ \setsepchar[*]{,*/}\reademptyitems%
\readlist\ListeCalc{#2}%
}%
+ \ignoreemptyitems
\MPCalculatrice{\ListeCalc[1,1]}{\ListeCalc[1,2]}{\useKV[ClesCalculatrice]{NbLignes}}%
}{%
- \setsepchar[*]{,*/}%
+ \setsepchar[*]{,*/}\reademptyitems%
\readlist\ListeCalc{#2}%
+ \ignoreemptyitems
\foreachitem\compteur\in\ListeCalc{\xintifboolexpr{\listlen\ListeCalc[\compteurcnt]==2}{\Longstack{{\tiny\ListeCalc[\compteurcnt,1]} \KN{\ListeCalc[\compteurcnt,2]}}}{\Longstack{{\tiny\ListeCalc[\compteurcnt,2]} \KY{\ListeCalc[\compteurcnt,3]}}}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex b/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex
index a29f47f9af..d17a6c9f55 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCalculsCroises.tex
@@ -71,7 +71,7 @@
\color{PfCCouleurCCS}\num{\PfCListeCCOp[1]}%
}{}%
}%
- }&\StrCompare{\PfCListeCCOp[2]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[2]$}}&\Block{}{%
+ }&\StrCompare{\PfCListeCCOp[2]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[2]$}}&\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}%
\xintFor* ##1 in{\xintSeq{1}{\PfCListeCCAidelen}}\do{%
@@ -82,7 +82,7 @@
\color{PfCCouleurCCS}\num{\PfCListeCCOp[3]}%
}{}%
}%
- }&\StrCompare{\PfCListeCCOp[4]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[4]$}}&\Block{}{%
+ }&\StrCompare{\PfCListeCCOp[4]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[4]$}}&\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}
\xintFor* ##1 in{\xintSeq{1}{\PfCListeCCAidelen}}\do{%
@@ -94,7 +94,7 @@
}{}%
}%
}&\Block[borders={bottom,right,top},fill=PfCCouleurCC]{}{\ifboolKV[CalculsCroises]{Inverse}{}{\num{\fpeval{\PfCListeCCOp[1]\PfCListeCCOp[2]\PfCListeCCOp[3]\PfCListeCCOp[4]\PfCListeCCOp[5]}}}}\\
- \rule{0pt}{\PfCCalculsCroises}\StrCompare{\PfCListeCCOp[6]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[6]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[7]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[7]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[8]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[8]$}}\\
+ \rule{0pt}{\PfCCalculsCroises}\StrCompare{\PfCListeCCOp[6]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[6]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[7]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[7]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[8]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[8]$}}\\
\rule{0pt}{\PfCCalculsCroises}\Block{}{%
\setcounter{CCRetiensAide}{0}%
\ifboolKV[CalculsCroises]{Aide}{%
@@ -106,7 +106,7 @@
\color{PfCCouleurCCS}\num{\PfCListeCCOp[9]}%
}{}%
}%
- }&\StrCompare{\PfCListeCCOp[10]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[10]$}}&\Block{}{%
+ }&\StrCompare{\PfCListeCCOp[10]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[10]$}}&\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}%
\xintFor* ##1 in{\xintSeq{1}{\PfCListeCCAidelen}}\do{%
@@ -117,7 +117,7 @@
\color{PfCCouleurCCS}\num{\PfCListeCCOp[11]}%
}{}%
}%
- }&\StrCompare{\PfCListeCCOp[12]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[12]$}}&\Block{}{%
+ }&\StrCompare{\PfCListeCCOp[12]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[12]$}}&\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}%
\xintFor* ##1 in{\xintSeq{1}{\PfCListeCCAidelen}}\do{%
@@ -129,7 +129,7 @@
}{}%
}%
}&\Block[borders={bottom,right,top},fill=PfCCouleurCC]{}{\ifboolKV[CalculsCroises]{Inverse}{}{\num{\fpeval{\PfCListeCCOp[9]\PfCListeCCOp[10]\PfCListeCCOp[11]\PfCListeCCOp[12]\PfCListeCCOp[13]}}}}\\
- \rule{0pt}{\PfCCalculsCroises}\StrCompare{\PfCListeCCOp[14]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[14]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[15]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[15]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[16]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[16]$}}\\
+ \rule{0pt}{\PfCCalculsCroises}\StrCompare{\PfCListeCCOp[14]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[14]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[15]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[15]$}}&\Block[fill=black]{}{~}&\StrCompare{\PfCListeCCOp[16]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[16]$}}\\
\rule{0pt}{\PfCCalculsCroises}\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}%
@@ -141,7 +141,7 @@
\color{PfCCouleurCCS}\num{\PfCListeCCOp[17]}%
}{}%
}%
- }&\StrCompare{\PfCListeCCOp[18]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[18]$}}&\Block{}{%
+ }&\StrCompare{\PfCListeCCOp[18]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[18]$}}&\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}%
\xintFor* ##1 in{\xintSeq{1}{\PfCListeCCAidelen}}\do{%
@@ -152,7 +152,7 @@
\color{PfCCouleurCCS}\num{\PfCListeCCOp[19]}%
}{}%
}%
- }&\StrCompare{\PfCListeCCOp[20]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{$\times$}{$\PfCListeCCOp[20]$}}&\Block{}{%
+ }&\StrCompare{\PfCListeCCOp[20]}{*}[\PfCTestEtoile]\Block{}{\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolTimes}{$\PfCListeCCOp[20]$}}&\Block{}{%
\ifboolKV[CalculsCroises]{Aide}{%
\setcounter{CCRetiensAide}{0}%
\xintFor* ##1 in{\xintSeq{1}{\PfCListeCCAidelen}}\do{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex b/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex
index cdd853a8fa..336b10651d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCibleQOp.tex
@@ -106,6 +106,7 @@
\readlist*\PfCOrdreOperations{\faa}%
\readlist*\PfCListeCibleNombres{\PfCFooNombres}%
\readlist*\PfCListeCibleOperations{\PfCCQOListeOperations}%
+ \reademptyitems%
% On détermine les solutions
\xdef\PfCListeSolution{\fpeval{\PfCCibleQO-\PfCListeCibleNombres[1]}}%
\xdef\PfCListeSolution{\PfCListeSolution,\fpeval{\PfCCibleQO-\PfCListeCibleNombres[2]}}%
@@ -130,16 +131,17 @@
\StrCompare{\PfCListeCibleOperations[\PfCCibleRang]}{/}[\PfCTestSlash]%
\StrCompare{\PfCListeCibleOperations[\PfCCibleRang]}{d}[\PfCTestDE]%
\xintifboolexpr{\PfCTestDE==0}{%
- \xdef\PfCFooRetiensTout{\PfCFooRetiensTout,$\pointilles[5mm]\times\num{\PfCListeCibleNombres[9]}+\num{\PfCListeCibleSolutions[9]}$}%
- \xdef\PfCFooRetiensToutAvecSol{\PfCFooRetiensToutAvecSol,$\mathcolor{CouleurCibleQO}{\num{\PfCListeCibleSolutions[8]}}\times\num{\PfCListeCibleNombres[9]}+\num{\PfCListeCibleSolutions[9]}$}%
+ \xdef\PfCFooRetiensTout{\PfCFooRetiensTout,$\pointilles[5mm]\PfCSymbolTimes\num{\PfCListeCibleNombres[9]}+\num{\PfCListeCibleSolutions[9]}$}%
+ \xdef\PfCFooRetiensToutAvecSol{\PfCFooRetiensToutAvecSol,$\mathcolor{CouleurCibleQO}{\num{\PfCListeCibleSolutions[8]}}\PfCSymbolTimes\num{\PfCListeCibleNombres[9]}+\num{\PfCListeCibleSolutions[9]}$}%
}{%
- \xdef\PfCFooRetiensTout{\PfCFooRetiensTout,$\pointilles[5mm]\xintifboolexpr{\PfCTestEtoile==0}{\div}{\xintifboolexpr{\PfCTestSlash==0}{\times}{\PfCListeCibleOperations[\PfCCibleRang]}}\num{\PfCListeCibleNombres[\PfCCibleRang]}$}%
- \xdef\PfCFooRetiensToutAvecSol{\PfCFooRetiensToutAvecSol,$\mathcolor{CouleurCibleQO}{\num{\PfCListeCibleSolutions[\PfCCibleRang]}}\xintifboolexpr{\PfCTestEtoile==0}{\div}{\xintifboolexpr{\PfCTestSlash==0}{\times}{\PfCListeCibleOperations[\PfCCibleRang]}}\num{\PfCListeCibleNombres[\PfCCibleRang]}$}%
+ \xdef\PfCFooRetiensTout{\PfCFooRetiensTout,$\pointilles[5mm]\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolDiv}{\xintifboolexpr{\PfCTestSlash==0}{\PfCSymbolTimes}{\PfCListeCibleOperations[\PfCCibleRang]}}\num{\PfCListeCibleNombres[\PfCCibleRang]}$}%
+ \xdef\PfCFooRetiensToutAvecSol{\PfCFooRetiensToutAvecSol,$\mathcolor{CouleurCibleQO}{\num{\PfCListeCibleSolutions[\PfCCibleRang]}}\xintifboolexpr{\PfCTestEtoile==0}{\PfCSymbolDiv}{\xintifboolexpr{\PfCTestSlash==0}{\PfCSymbolTimes}{\PfCListeCibleOperations[\PfCCibleRang]}}\num{\PfCListeCibleNombres[\PfCCibleRang]}$}%
}%
}%
\setsepchar{,}\ignoreemptyitems%
\readlist*\PfCCibleQOListeEnonce{\PfCFooRetiensTout}%
\readlist*\PfCCibleQOListeSolution{\PfCFooRetiensToutAvecSol}%
+ \reademptyitems
\foreachitem\compteur\in\PfCCibleQOListeEnonce{\expandafter\UpdatetoksCibleQO\compteur\nil}%
\foreachitem\compteur\in\PfCCibleQOListeSolution{\expandafter\UpdatetoksCibleQOO\compteur\nil}%
\BuildCibleQuatreOperations{\PfCCibleQO}{\the\toklistecibleA}{\the\toklistecibleab}{\useKV[CibleQO]{Style}}%
@@ -232,44 +234,44 @@
trace Op[k] shifted A[k];
endfor;
\end{mplibcode}
- \else
- \begin{mpost}[mpsettings={\BuildCibleQOCode;Rayon:=\useKV[CibleQO]{Rayon};boolean Solution;Solution=\useKV[CibleQO]{Solution};}]
- string Style;
- Style=#4;
- Cible=#1;
-
- picture Op[];
-
- if Solution:
- LectureOperationsPDF(#3)
- else:
- LectureOperationsPDF(#2)
- fi;
-
- path cc;
- pair O,A[];
- O=(0,0);
- picture CIBLE;
- CIBLE=image(label(LATEX("\Huge\bfseries"&decimal(Cible)),O));
- draw CIBLE;
- cc=cercles(O,Rayon);
- path Fleche;
- for k=0 upto 7:
- A[k]=1.1[O,pointarc(cc,k*45)];
- Fleche:=((0,0)--(center Op[k] shifted A[k])) cutbefore cercles(O,0.45*Rayon) cutafter (polygone(llcorner Op[k],lrcorner Op[k],urcorner Op[k],ulcorner Op[k]) shifted A[k]);
- if Style="<->":
- drawdblarrow (point(0.75*length Fleche) of Fleche)--(point(0) of Fleche);
- elseif Style="<-":
- drawarrow (point(0.75*length Fleche) of Fleche)--(point(0) of Fleche);
- elseif Style="->":
- drawarrow (point(0) of Fleche)--(point(0.75*length Fleche) of Fleche);
- elseif Style="-":
- draw (point(0) of Fleche)--(point(0.75*length Fleche) of Fleche);
- elseif Style="--":
- label(LATEX("$=$") rotated (k*45) ,point(0.5*length Fleche) of Fleche);
- fi;
- trace Op[k] shifted A[k];
- endfor;
- \end{mpost}
+% \else
+% \begin{mpost}[mpsettings={\BuildCibleQOCode;Rayon:=\useKV[CibleQO]{Rayon};boolean Solution;Solution=\useKV[CibleQO]{Solution};}]
+% string Style;
+% Style=#4;
+% Cible=#1;
+%
+% picture Op[];
+%
+% if Solution:
+% LectureOperationsPDF(#3)
+% else:
+% LectureOperationsPDF(#2)
+% fi;
+%
+% path cc;
+% pair O,A[];
+% O=(0,0);
+% picture CIBLE;
+% CIBLE=image(label(LATEX("\noexpand\Huge\noexpand\bfseries"&decimal(Cible)),O));
+% draw CIBLE;
+% cc=cercles(O,Rayon);
+% path Fleche;
+% for k=0 upto 7:
+% A[k]=1.1[O,pointarc(cc,k*45)];
+% Fleche:=((0,0)--(center Op[k] shifted A[k])) cutbefore cercles(O,0.45*Rayon) cutafter (polygone(llcorner Op[k],lrcorner Op[k],urcorner Op[k],ulcorner Op[k]) shifted A[k]);
+% if Style="<->":
+% drawdblarrow (point(0.75*length Fleche) of Fleche)--(point(0) of Fleche);
+% elseif Style="<-":
+% drawarrow (point(0.75*length Fleche) of Fleche)--(point(0) of Fleche);
+% elseif Style="->":
+% drawarrow (point(0) of Fleche)--(point(0.75*length Fleche) of Fleche);
+% elseif Style="-":
+% draw (point(0) of Fleche)--(point(0.75*length Fleche) of Fleche);
+% elseif Style="--":
+% label(LATEX("$=$") rotated (k*45) ,point(0.5*length Fleche) of Fleche);
+% fi;
+% trace Op[k] shifted A[k];
+% endfor;
+% \end{mpost}
\fi%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex b/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex
index c61d8cf870..1d5339b114 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCompteBon.tex
@@ -1,7 +1,7 @@
%%%
% Le compte est bon
%%%
-\setKVdefault[CompteBon]{NombreCalculs=5,NombrePlaques=4,Solution=false,Relatifs=false,Original=false,Graines=false,Plaques=6}
+\setKVdefault[CompteBon]{NombreCalculs=5,NombrePlaques=4,Solution=false,Relatifs=false,Original=false,Graines=false,Plaques=6,CDot=false}
\defKV[CompteBon]{Graine=\setKV[CompteBon]{Graines}}%
\makeatletter
@@ -173,7 +173,7 @@
\ifboolKV[CompteBon]{Solution}{%
\begin{align*}
\xintFor* ##1 in{\xintSeq{1}{\fpeval{\useKV[CompteBon]{Plaques}-1}}}\do{
- \StrSubstitute{\PfCCBDecompositionEtapes[##1,1]}{*}{\times}[\PfCCBAffiche]\PfCCBAffiche&=\PfCCBDecompositionEtapes[##1,2]\xintifForLast{\\}{}
+ \StrSubstitute{\PfCCBDecompositionEtapes[##1,1]}{*}{\PfCSymbolTimes}[\PfCCBAffiche]\PfCCBAffiche&=\PfCCBDecompositionEtapes[##1,2]\xintifForLast{\\}{}
}%
\end{align*}
}{}%
@@ -230,9 +230,11 @@
\begin{NiceTabular}{m{30pt}cccm{20pt}m{10pt}m{20pt}m{10pt}m{20pt}m{10pt}m{20pt}}
\xintFor* ##1 in{\xintSeq{1}{\useKV[CompteBon]{NombreCalculs}}}\do{%
\Block[draw]{}{\num{\fpeval{\PfC@ListeCalculsChoisis[##1,1]}}}&&$=$&&\Block[draw]{}{~}&\Block{}{~}&\Block[draw]{}{~}&\Block{}{~}&\Block[draw]{}{~}&\Block{}{~}&\Block[draw]{}{~}\\
- \ifboolKV[CompteBon]{Solution}{\Block{1-11}{\footnotesize Une solution : \StrSubstitute[0]{\PfC@ListeCalculsChoisis[##1,1]}{*}{\times}[\PfCEcritureCalcul]$\PfCEcritureCalcul$}}{}\\
+ \ifboolKV[CompteBon]{Solution}{\Block{1-11}{\footnotesize Une solution : \StrSubstitute[0]{\PfC@ListeCalculsChoisis[##1,1]}{*}{\PfCSymbolTimes}[\PfCEcritureCalcul]$\PfCEcritureCalcul$}}{}\\
}%
\end{NiceTabular}
\end{center}
}%
-}% \ No newline at end of file
+}%
+
+\makeatother \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCConversion.tex b/macros/latex/contrib/profcollege/latex/PfCConversion.tex
index 670e5ca28f..78fa6d0351 100644
--- a/macros/latex/contrib/profcollege/latex/PfCConversion.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCConversion.tex
@@ -1,6 +1,6 @@
-\setKVdefault[ClesConversion]{Longueur,Aire=false,Vol=false,Masses=false,Capas=false,Sans=false,Complete=40pt}
-\defKV[ClesConversion]{Masse=\setKV[ClesConversion]{Longueur=false}\setKV[ClesConversion]{Masses}}
-\defKV[ClesConversion]{Capa=\setKV[ClesConversion]{Longueur=false}\setKV[ClesConversion]{Capas}}
+\setKVdefault[ClesConversion]{Longueur,Aire=false,Vol=false,Masses=false,Capas=false,Sans=false,Complete=40pt}%
+\defKV[ClesConversion]{Masse=\setKV[ClesConversion]{Longueur=false}\setKV[ClesConversion]{Masses}}%
+\defKV[ClesConversion]{Capa=\setKV[ClesConversion]{Longueur=false}\setKV[ClesConversion]{Capas}}%
\NewDocumentCommand\ChoixUniteD{m}{%
\IfStrEqCase{#1}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCCritere.tex b/macros/latex/contrib/profcollege/latex/PfCCritere.tex
index 3fd554b0ba..34c96a9b06 100644
--- a/macros/latex/contrib/profcollege/latex/PfCCritere.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCCritere.tex
@@ -18,15 +18,16 @@
\end{itemize}
\ifx\bla\PfCListeARetenirCriteres\bla%
\else
- \setsepchar{,}\ignoreemptyitems
+ \setsepchar{,}\ignoreemptyitems%
\readlist*\PfCAfficheDivCriteres{\PfCListeARetenirCriteres}%
+ \reademptyitems%
\xdef\PfCNumListe{}%
En appliquant les critères de divisibilité connus, \num{#2} est donc divisible par \num{\PfCAfficheDivCriteres[1]}%
\xintifboolexpr{\PfCAfficheDivCritereslen>1}{\xintFor* ##1 in{\xintSeq{2}{\PfCAfficheDivCritereslen}}\do{%
\xintifForLast{ et }{ ; }\num{\PfCAfficheDivCriteres[##1]}%
}%
}{}.%
- \ifboolKV[Critere]{RemarqueAll}{\\\textbf{Remarque} : La liste des diviseurs de \num{#2} est \ListeDiviseur{#2}.}{}
+ \ifboolKV[Critere]{RemarqueAll}{\\\textbf{Remarque} : La liste des diviseurs de \num{#2} est \ListeDiviseur{#2}.}{}%
\fi%
}{%
\IfStrEqCase{\useKV[Critere]{Div}}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex b/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex
index 39ec997a29..4f9e7f9cf6 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDecomposerNombrePremier.tex
@@ -765,6 +765,28 @@
}%
}%
+\newcommand\LesFacteursPremiers[1]{%
+ %#1 : le nombre entier \`a tester
+% \newcount\anpl\newcount\bnpl\newcount\cnpl%
+ % \newcount\pilebl%
+ \xdef\anpl{#1}%\relax%
+ \xdef\bnpl{2}%\relax%
+ \xdef\pilebl{2}%\relax%
+ \xdef\PfCPileFacteurs{}%
+ \whiledo{\fpeval{\anpl} > 1}{%
+ \modulo{\fpeval{\anpl}}{\fpeval{\bnpl}}
+ \ifnum\remainder=0\relax
+ \xdef\cnpl{\fpeval{\anpl/\bnpl}}%
+ \xdef\PfCPileFacteurs{\PfCPileFacteurs,\fpeval{\bnpl}}%
+ % \num{\the\bnpl}\ifnum\anpl>\bnpl,\fi%
+ \xdef\anpl{\cnpl}%\relax
+ \else%
+ \xdef\bnpl{\fpeval{\bnpl+1}}%
+ \xdef\pilebl{\bnpl}%\relax%
+ \fi%
+ }%
+}%%
+
\newcommand\ListeDiviseur[1]{%#1 : le nombre entier \`a tester
\newcount\anp\newcount\bnp%
\anp=#1%
diff --git a/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex b/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex
index 619220704c..6d850f8012 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex
@@ -34,8 +34,8 @@
\setlength{\tabcolsep}{0.01\tabcolsep}
\begin{tabular}{*{4}{c}}%m{20pt}}}
\ifboolKV[DefiCalculatrice]{Impression}{\multicolumn{4}{c}{\Calculatrice[Ecran,Largeur=\mpdim{\Adaptationbis}/0.5mm,Impression]{\the\toktexteecran/\the\tokcibleecran}}}{\multicolumn{4}{c}{\Calculatrice[Ecran,Largeur=\mpdim{\Adaptationbis}/0.5mm]{\the\toktexteecran/\the\tokcibleecran}}}\\
- \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{7}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/7}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{8}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/8}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{9}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/9}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{/}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\div$}}}\\
- \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{4}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/4}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{5}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/5}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{6}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/6}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{*}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\times$}}}\\
+ \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{7}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/7}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{8}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/8}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{9}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/9}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{/}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\PfCSymbolDiv$}}}\\
+ \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{4}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/4}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{5}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/5}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{6}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/6}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{*}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\PfCSymbolTimes$}}}\\
\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{1}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/1}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{2}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/2}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{3}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/3}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{-}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$-$}}}\\
\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{0}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/0}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{.}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/.}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{=}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$=$}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{+}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$+$}}}\\
\end{tabular}
diff --git a/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex b/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex
index 7c227831e1..85274cac81 100644
--- a/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCDessinAlgo.tex
@@ -14,6 +14,7 @@
\setKV[DessinAlgo]{#1}%
\setsepchar[*]{/}\ignoreemptyitems%
\readlist*\PfCListeDessinAlgo{#2}%
+ \reademptyitems%
\foreachitem\compteur\in\PfCListeDessinAlgo{\expandafter\UpdatetoksDA\compteur\nil}%
\ifboolKV[DessinAlgo]{Relatif}{%
\BuildDessinAlgoRelatif{\the\tokDessinAlgo}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex b/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex
index f5c2c573d7..700fb9906b 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFactorisation.tex
@@ -21,9 +21,9 @@
}{%
\print{#2}%
}%
- }{
+ }{%
(\print{#2})%
- }
+ }%
}%
}%
}%
@@ -85,7 +85,8 @@
\ifboolKV[Facto]{Finale}{\\\PfCFactoNE&=\useKV[Facto]{Resultat}}{\ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Kf:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}}{}}%
\end{align*}
}
- \else%k*a+-k*b=k(a+-b)
+\else%k*a+-k*b=k(a+-b)
+ \#3 #3 -- \#4 #4 -- \#5 #5
\begin{CAS}
% La variable
vars('\useKV[Facto]{Lettre}'\ifboolKV[Facto]{VariableSup}{%
@@ -118,12 +119,13 @@
\ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\print{Kk}(\print{Ka\PfCFactoSymbole Kb})}{}%
\end{align*}
}{%Avec au moins un des facteurs polynomes
- \StrCompare{\PfCFactoSymbole}{-}[\PfCRetiensSigneFacteurDeux]
+ \StrCompare{\PfCFactoSymbole}{-}[\PfCRetiensSigneFacteurDeux]%
+ \StrChar{#5}{1}[\RetiensPremierCaractere]%en cas de deuxième terme écrit b-ax
\begin{align*}
\ifboolKV[Facto]{Aide}{\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#4}{Ka}\PfCFactoSymbole\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#5}{Kb}\\\setKV[Facto]{Aide}}{}%
\PfCFactoNE&=\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{\PfCEcrireFacteur{#3}{Kk}}}_{k}\times\underbrace{\Fdash{\PfCEcrireFacteur{#4}{Ka}}}_{a}\PfCFactoSymbole\underbrace{\Fdash{\PfCEcrireFacteur{#3}{Kk}}}_{k}\times\underbrace{\Fdash{\PfCEcrireFacteur{#5}{Kb}}}_{b}}{\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#4}{Ka}\PfCFactoSymbole\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#5}{Kb}}\setKV[Facto]{Aide=false}\\
\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\left[\PfCEcrireFacteur{#4}{Ka}\PfCFactoSymbole\PfCEcrireFacteur{#5}{Kb}\right]\\
- \PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ka}\xintifboolexpr{\PfCRetiensSigneFacteurDeux==1}{\xintifboolexpr{\TestCASB<0}{}{+}\print{Kb}}{\xintifboolexpr{\TestCASB<0}{+}{}\print{Ko}}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\\
+ \PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ka}\xintifboolexpr{\PfCRetiensSigneFacteurDeux==1}{\xintifboolexpr{\TestCASB<0}{\IfDecimal{\RetiensPremierCaractere}{+}{}}{+}\print{Kb}}{\xintifboolexpr{\TestCASB<0}{+}{}\print{Ko}}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\\
\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}%
\ifboolKV[Facto]{Finale}{\\\PfCFactoNE&=\useKV[Facto]{Resultat}}{\ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}}{}}%
\end{align*}
@@ -175,7 +177,6 @@
\ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=(\print{e})(\print{f})}{}%
\end{align*}
}{%Avec au moins un des facteurs polynomes
- Ici
\begin{align*}
\ifboolKV[Facto]{Aide}{\IfDecimal{#3}{\PfCFactoNE&=\print{c}-\print{d}}{\IfDecimal{#4}{\PfCFactoNE&=\print{c}-\print{d}}{\PfCFactoNE&={\underbrace{\Fdash{$(\print{a})$}}_{A}}^{\,2}-{\underbrace{\Fdash{$(\print{b})$}}_{B}}^{\,2}}}}{\PfCFactoNE&=\print{c}-\print{d}}\\
\IfDecimal{#3}{\PfCFactoNE\uppercase{&}=\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$\phantom{(}\print{a}\phantom{)}$}}_{A}}^{\,2}}{\print{a}^2}-\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$(\print{b})$}}_{B}}^{\,2}}{\print{d}}\\}{\IfDecimal{#4}{\PfCFactoNE\uppercase{&}=\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$(\print{a})$}}_{A}}^{\,2}}{\print{c}}-\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$\phantom{(}\print{b}\phantom{)}$}}_{B}}^{\,2}}{\print{b}^2}\\}{}}
diff --git a/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex b/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex
index 08e9936d52..52512fb83e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCFractionNombre.tex
@@ -14,6 +14,7 @@
\ifboolKV[ClesFN]{Creation}{%
\setsepchar{,}\ignoreemptyitems%
\readlist*\PfCListeDeplacements{\PfCFooCheminFN}%
+ \reademptyitems%
\foreachitem\compteur\in\PfCListeDeplacements{\expandafter\UpdatetoksFN\compteur\nil}%
}{}%
\StrCut{#2}{/}\PfCNumA\PfCNumB%
diff --git a/macros/latex/contrib/profcollege/latex/PfCGaram.tex b/macros/latex/contrib/profcollege/latex/PfCGaram.tex
index 1bcd3ddab3..7e04378a93 100644
--- a/macros/latex/contrib/profcollege/latex/PfCGaram.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCGaram.tex
@@ -37,9 +37,9 @@
\StrChar{\PfCListeGaram[##1,##2,1]}{1}[\PfCCaracGaram]%
\IfStrEq{\PfCCaracGaram}{*}{}{%
\tikz{%
- \StrSubstitute{\PfCListeGaram[##1,##2,2]}{x}{\times}[\PfCGaramUn]%
+ \StrSubstitute{\PfCListeGaram[##1,##2,2]}{x}{\PfCSymbolTimes}[\PfCGaramUn]%
\StrSubstitute{\PfCGaramUn}{:}{\div}[\PfCGaramUn]%
- \StrSubstitute{\PfCListeGaram[##1,##2,3]}{x}{\times}[\PfCGaramDeux]%
+ \StrSubstitute{\PfCListeGaram[##1,##2,3]}{x}{\PfCSymbolTimes}[\PfCGaramDeux]%
\StrSubstitute{\PfCGaramDeux}{:}{\div}[\PfCGaramDeux]%
\xintifForLast{}{\node at (\fpeval{##1+0.5}-|\fpeval{##2+1}) {$\PfCGaramUn$};}
\node at (\fpeval{##1+1}-|\fpeval{##2+0.5}) {$\PfCGaramDeux$};
diff --git a/macros/latex/contrib/profcollege/latex/PfCKakuro.tex b/macros/latex/contrib/profcollege/latex/PfCKakuro.tex
index bbb99424f6..adf0aba7d2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCKakuro.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCKakuro.tex
@@ -15,9 +15,9 @@
\setKV[Kakuro]{TLargeur=\useKV[Kakuro]{Taille}}%
}{}%
\setlength{\PfCKakuro}{\useKV[Kakuro]{Largeur}+\tabcolsep}%
- \setsepchar[*]{,*/}%
+ \setsepchar[*]{,*/}\reademptyitems%
\readlist*\ListeCasesKK{#2}%
- \setsepchar{,}%
+ \setsepchar{,}\reademptyitems%
\xdef\ListeAvantNombres{\useKV[Kakuro]{ListeNombres}}%
\readlist*\ListeKakuroNombres{\ListeAvantNombres}%
\savecomparemode%
diff --git a/macros/latex/contrib/profcollege/latex/PfCKenKen.tex b/macros/latex/contrib/profcollege/latex/PfCKenKen.tex
index 8e8daa9f86..e28efc379f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCKenKen.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCKenKen.tex
@@ -10,8 +10,9 @@
\useKVdefault[ClesKK]%
\setKV[ClesKK]{#1}%
\setlength{\PfCKenKen}{\useKV[ClesKK]{Largeur}+\tabcolsep}%
- \setsepchar[*]{,*/}%
+ \setsepchar[*]{,*/}\reademptyitems%
\readlist*\ListeCasesKK{#2}%
+ \ignoreemptyitems
\savecomparemode%
\comparestrict%
\begin{NiceTabular}{*{\useKV[ClesKK]{Taille}}{m{\useKV[ClesKK]{Largeur}}}}[color-inside]%
diff --git a/macros/latex/contrib/profcollege/latex/PfCLego.tex b/macros/latex/contrib/profcollege/latex/PfCLego.tex
index f4b0fbd65c..86811da4ad 100644
--- a/macros/latex/contrib/profcollege/latex/PfCLego.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCLego.tex
@@ -11,6 +11,7 @@
\MelangeListe{1,2,3,4,5,6,7,8,9,10}{\fpeval{#1+1}}%
\setsepchar{,}\ignoreemptyitems%
\readlist*\ListeRotation{\faa}%
+ \reademptyitems%
\xintFor* ##2 in{\xintSeq{1}{#1}}\do{%
\xdef\RetiensCouleur{\ListeRotation[##2]}%
\xintifForFirst{\xdef\FooCouleur{\PfCListeCouleurs[\RetiensCouleur]}}{\xdef\FooCouleur{\FooCouleur,\PfCListeCouleurs[\RetiensCouleur]}}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCMulJap.tex b/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
index 3e615aa3e9..e0457471e1 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMulJap.tex
@@ -15,6 +15,7 @@
\toksmuljap{}%
\foreachitem\compteur\in\PfCMulJap{\expandafter\UpdatetoksMulJap\compteur\nil}%
\BuildMulJap{\the\toksmuljap}%
+ \reademptyitems
}%
\NewDocumentCommand\BuildMulJap{m}{%
diff --git a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
index 64c196d992..d000fef45b 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
@@ -34,6 +34,8 @@
\readlist*\ListeDesNomsFonctions{\PfCFooNomFn}
\foreachitem\compteur\in\ListeDesNomsFonctions{\expandafter\UpdatePfCListeDesNomsFonctions\compteur\nil}%
\fi
+ \tokPfCLabelX{}%
+ \tokPfCLabelY{}%
\addtotok\tokPfCLabelX{"\useKV[TraceG]{LabelX}"}%
\addtotok\tokPfCLabelY{"\useKV[TraceG]{LabelY}"}%
\TraceMultiGraphique{\the\tokPfCListeDesFonctions}{\the\tokPfCListeDesNomsFonctions}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCReperage.tex b/macros/latex/contrib/profcollege/latex/PfCReperage.tex
index 4c116cff67..70bd8b7c7a 100644
--- a/macros/latex/contrib/profcollege/latex/PfCReperage.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCReperage.tex
@@ -1482,6 +1482,9 @@
enddef;
%%%
tata(#2);
+ if \useKV[ClesReperage]{Code}:
+ \useKV[ClesReperage]{Traces}
+ fi;
\end{mplibcode}
\else
\begin{mpost}[mpsettings={unitex:=\useKV[ClesReperage]{Unitex}*cm; pasx:=\useKV[ClesReperage]{Pasx}; unitp:=unitex/pasx; ValeurUnitex:=\useKV[ClesReperage]{ValeurUnitex}; ValeurOrigine:=\useKV[ClesReperage]{ValeurOrigine}; AffichageGrad:=\AffichageGrad; AffichageCoord:=\useKV[ClesReperage]{AffichageAbs}; AffichageNom:=\AffichageNom; ValeurMin=\useKV[ClesReperage]{ValeurMin}; ValeurMax=\useKV[ClesReperage]{ValeurMax};boolean DemiDroite;DemiDroite=\useKV[ClesReperage]{DemiDroite};}]
diff --git a/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex b/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex
index d0d39859ea..6660693348 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRepresenterFraction.tex
@@ -427,12 +427,14 @@
fill ((A--B0--arccercle(B[0],B[nume mod deno],A)--cycle) shifted (m*(2*Rayon+1cm,0))) withcolor ColDisque;
fi;
fi;
+ drawoptions(withpen pencircle scaled Epaisseur);
for l=0 upto m:
draw cc shifted(l*(2*Rayon+1cm,0));
for k=0 upto (deno-1):
draw segment(A,B[k]) shifted(l*(2*Rayon+1cm,0));
endfor;
endfor;
+ drawoptions();
);
RetourFraction
enddef;
@@ -497,9 +499,12 @@
draw segment(A,C) shifted(m*(Longueur+1cm,0));
fi;
fi;
+ if Hachures:drawoptions(withpen pencircle scaled Epaisseur);fi;
draw (segment(B[0],B[nume mod deno]) shifted(m*(Longueur+1cm,0)));
draw segment(A,C) shifted(m*(Longueur+1cm,0));
+ %drawoptions();
fi;
+ if Hachures:drawoptions(withpen pencircle scaled Epaisseur);fi;
marque_p:="tiretv";
for l=0 upto m-1:
for k=0 upto deno:
diff --git a/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex b/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex
index 7917c5138b..9fc7f3446d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRondeInfernale.tex
@@ -44,9 +44,9 @@
\xdef\PfCRIRetiensListeDiviseurs{\PfCRIRetiensListeDiviseurs \the\anp,-\the\anp}
\fi
\fi
-}
+}%
-\setKVdefault[RondeInfernale]{Solution=false,Relatifs=false,Etapes=4,Perso=false,Cles=false,Vide,Rayon=2.5cm,Rectangle=false}%
+\setKVdefault[RondeInfernale]{Solution=false,Relatifs=false,Etapes=4,Perso=false,Cles=false,Vide,Rayon=2.5cm,Rectangle=false,Div=false,CDot=false}%
\defKV[RondeInfernale]{Graine=\PfCGraineAlea{#1}}
\defKV[RondeInfernale]{Cle=\setKV[RondeInfernale]{Cles}\setKV[RondeInfernale]{Vide=false}}%
\defKV[RondeInfernale]{ListeOperations=\setKV[RondeInfernale]{Perso}}%
@@ -232,8 +232,10 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- boolean Vide,Rectangle,Perso;
+ boolean Vide,Rectangle,Perso,Div,CDot;
Vide=\useKV[RondeInfernale]{Vide};
+ Div=\useKV[RondeInfernale]{Div};
+ CDot=\useKV[RondeInfernale]{CDot};
Rectangle=\useKV[RondeInfernale]{Rectangle};
Perso=\useKV[RondeInfernale]{Perso};
if Perso:
@@ -265,9 +267,17 @@
for p_=t:
n:=n+1;
if p_="*":
+ if CDot:
+ label(TEX("$\cdot"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ else:
label(TEX("$\times"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ fi;
elseif p_="/":
+ if Div:
+ label(TEX("$:"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ else:
label(TEX("$\div"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ fi;
else:
label(TEX("$"&p_&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
fi;
@@ -280,17 +290,33 @@
n:=n+1;
if n=nbcase:
if p_="*":
+ if CDot:
+ label.bot(TEX("$\cdot"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ else:
label.bot(TEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ fi;
elseif p_="/":
+ if Div:
+ label.bot(TEX("$:"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ else:
label.bot(TEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ fi;
else:
label.bot(TEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
fi;
else:
if p_="*":
+ if CDot:
+ label.top(TEX("$\cdot"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ else:
label.top(TEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ fi;
elseif p_="/":
+ if Div:
+ label.top(TEX("$:"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ else:
label.top(TEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ fi;
else:
label.top(TEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
fi;
@@ -378,9 +404,17 @@
for p_=t:
n:=n+1;
if p_="*":
+ if CDot:
+ label(LATEX("$\cdot"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ else:
label(LATEX("$\times"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ fi;
elseif p_="/":
+ if Div:
+ label(LATEX("$:"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ else:
label(LATEX("$\div"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ fi;
else:
label(LATEX("$"&p_&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
fi;
@@ -393,17 +427,33 @@
n:=n+1;
if n=nbcase:
if p_="*":
+ if CDot:
+ label.bot(LATEX("$\cdot"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ else:
label.bot(LATEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ fi;
elseif p_="/":
+ if Div:
+ label.bot(LATEX("$:"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ else:
label.bot(LATEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ fi;
else:
label.bot(LATEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
fi;
else:
if p_="*":
+ if CDot:
+ label.top(LATEX("$\cdot"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ else:
label.top(LATEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ fi;
elseif p_="/":
+ if Div:
+ label.top(LATEX("$:"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ else:
label.top(LATEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ fi;
else:
label.top(LATEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
fi;
diff --git a/macros/latex/contrib/profcollege/latex/PfCRondeInfernaleold.tex b/macros/latex/contrib/profcollege/latex/PfCRondeInfernaleold.tex
new file mode 100644
index 0000000000..bf7cc6225f
--- /dev/null
+++ b/macros/latex/contrib/profcollege/latex/PfCRondeInfernaleold.tex
@@ -0,0 +1,474 @@
+%%%
+% Ronde infernale
+%%%
+\newcommand\TestNombrePremier[1]{%
+ % #1 le nombre \`a tester
+ \newcount\anp\newcount\bnp\newcount\cnp%
+ \anp=#1\relax
+ \bnp=2\relax
+ \premier=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax%
+ \global\premier=\numexpr\premier+1\relax%
+ \cnp=\numexpr\anp/\bnp\relax%
+ \anp=\cnp\relax%
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }%
+}%
+
+\newcommand\PfCRIListeDiviseur[1]{%#1 : nombre entier
+ \newcount\anp\newcount\bnp%
+ \anp=\fpeval{abs(#1)}%
+ \bnp=2\relax%
+ \xdef\PfCRIRetiensListeDiviseurs{}%
+ \ifnum#1=0%
+ \xdef\PfCRIRetiensListeDiviseurs{\fpeval{randint(2,5)},\fpeval{randint(6,9)}}%
+ \else
+ \whiledo{\bnp<\anp}{%
+ \modulo{\the\anp}{\the\bnp}{}%
+ \ifnum\remainder=0%
+ \ifnum#1>0
+ \xdef\PfCRIRetiensListeDiviseurs{\PfCRIRetiensListeDiviseurs \the\bnp,}%
+ \else
+ \xdef\PfCRIRetiensListeDiviseurs{\PfCRIRetiensListeDiviseurs \the\bnp,-\the\bnp,}%
+ \fi
+ \fi%
+ \bnp=\numexpr\bnp+1%
+ }%
+ \ifnum#1>0
+ \xdef\PfCRIRetiensListeDiviseurs{\PfCRIRetiensListeDiviseurs \the\anp,1}
+ \else
+ \xdef\PfCRIRetiensListeDiviseurs{\PfCRIRetiensListeDiviseurs \the\anp,-\the\anp}
+ \fi
+ \fi
+}%
+
+\setKVdefault[RondeInfernale]{Solution=false,Relatifs=false,Etapes=4,Perso=false,Cles=false,Vide,Rayon=2.5cm,Rectangle=false,Div=false,Cdot=false}%
+\defKV[RondeInfernale]{Graine=\PfCGraineAlea{#1}}
+\defKV[RondeInfernale]{Cle=\setKV[RondeInfernale]{Cles}\setKV[RondeInfernale]{Vide=false}}%
+\defKV[RondeInfernale]{ListeOperations=\setKV[RondeInfernale]{Perso}}%
+\defKV[RondeInfernale]{ListeNombres=\setKV[RondeInfernale]{Perso}}%
+%
+
+\NewDocumentCommand\RondeInfernale{ }{%Mise en place pour les germanistes : le " est actif :(
+ \begingroup
+ \catcode`\"12
+ \RondeInfernaleaux
+}%
+
+\NewDocumentCommand\RondeInfernaleaux{o}{%
+ \endgroup
+ \useKVdefault[RondeInfernale]%
+ \setKV[RondeInfernale]{#1}%
+ % Graine
+% \ifboolKV[RondeInfernale]{Graines}{\PfCGraineAlea{\useKV[RondeInfernale]{Graine}}}{}%
+ % Nombre clé
+ \ifboolKV[RondeInfernale]{Cles}{%
+ \xdef\PfCRINombreCle{\useKV[RondeInfernale]{Cle}}%
+ }{%
+ \ifboolKV[RondeInfernale]{Relatifs}{%
+ \xdef\PfCRIListeNegatifs{-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10}
+ \MelangeListe{\PfCRIListeNegatifs}{1}
+ \readlist*\PfCRIListeCle{\faa}
+ \xdef\PfCRINombreCle{\PfCRIListeCle[1]}%
+ }{%
+ \xdef\PfCRINombreCle{\fpeval{randint(2,9)}}%
+ }%
+ }%
+ \ifboolKV[RondeInfernale]{Perso}{%
+ \xdef\PfCRIRecupOperations{\useKV[RondeInfernale]{ListeOperations}}%
+ \xdef\PfCRIRecupNombres{\useKV[RondeInfernale]{ListeNombres}}%
+ }{%
+ % On définit les éléments nécessaires
+ \xdef\PfCRIListeToutesOperations{+,-,*,/}%
+ \xdef\PfCRIListeOperationsSansDiv{+,-,*}%
+ \xdef\PfCRIListeOperationsSansMul{+,-,/}%
+ \xdef\PfCRIListeOperationsSimple{+,-}%
+ \xdef\PfCRIRecupOperations{}%
+ \xdef\PfCRIRecupNombres{}%
+ \xdef\PfCRIRecupResultats{}%
+ \xdef\PfCRINombreATester{\PfCRINombreCle}%
+ \xdef\PfCRIRetiensNbEtapes{\useKV[RondeInfernale]{Etapes}}%
+ \setsepchar{,}\ignoreemptyitems%
+ % Liste des opérations jusqu'à l'étape n-1
+ \xintFor* ##1 in{\xintSeq{1}{\fpeval{\useKV[RondeInfernale]{Etapes}-1}}}\do{%
+ \TestNombrePremier{\PfCRINombreATester}\relax%
+ \xintifboolexpr{\premier==0}{%
+ % Définition des opérations
+ \MelangeListe{\PfCRIListeOperationsSansDiv}{1}%
+ \readlist*\PfCRIRetiensLoperation{\faa}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \xdef\PfCRIOperateur{\fpeval{randint(2,9)}}%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRIOperateur,}%
+ \xdef\PfCRIResultat{\fpeval{\PfCRINombreATester\PfCRIRetiensLoperation[1]\PfCRIOperateur}}%
+ \xdef\PfCRIRecupResultats{\PfCRIRecupResultats \PfCRIResultat,}%
+ \xdef\PfCRINombreATester{\PfCRIResultat}%
+ }{%
+ \MelangeListe{\PfCRIListeToutesOperations}{1}%
+ \readlist*\PfCRIRetiensLoperation{\faa}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{/}{%
+ \PfCRIListeDiviseur{\PfCRINombreATester}%
+ \MelangeListe{\PfCRIRetiensListeDiviseurs}{1}%
+ \readlist*\PfCRIRetiensLeDiviseur{\faa}%
+ \xdef\PfCRIOperateur{\PfCRIRetiensLeDiviseur[1]}%
+ }{%
+ \xdef\PfCRIOperateur{\fpeval{randint(2,9)}}%
+ }%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRIOperateur,}%
+ \xdef\PfCRIResultat{\fpeval{\PfCRINombreATester\PfCRIRetiensLoperation[1]\PfCRIOperateur}}%
+ \xdef\PfCRIRecupResultats{\PfCRIRecupResultats \PfCRIResultat,}%
+ \xdef\PfCRINombreATester{\PfCRIResultat}%
+ }%
+ }%
+ % Dernière opération
+ \xintifboolexpr{\fpeval{abs(\PfCRINombreATester)-abs(\PfCRINombreCle)}>0}{%
+ \modulo{\PfCRINombreATester}{\PfCRINombreCle}{}%
+ \xintifboolexpr{\remainder==0}{%
+ \MelangeListe{\PfCRIListeOperationsSansMul}{1}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRetiensLoperation{\faa}%
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{/}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreATester/\PfCRINombreCle}}%
+ }{%
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{-}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreATester-\PfCRINombreCle}}%
+ }{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreCle-\PfCRINombreATester}}%
+ }%
+ }%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRINombreATester}%
+ }{%
+ \MelangeListe{\PfCRIListeOperationsSimple}{1}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRetiensLoperation{\faa}%
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{-}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreATester-\PfCRINombreCle}}%
+ }{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreCle-\PfCRINombreATester}}%
+ }%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRINombreATester}%
+ }%
+ }{%
+ \xintifboolexpr{\fpeval{abs(\PfCRINombreATester)-abs(\PfCRINombreCle)}==0}{%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations *}%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRIListeOperations{\PfCRIRecupOperations}%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres 1}%
+ }{%
+ \xintifboolexpr{\PfCRINombreATester==0}{%
+ \MelangeListe{\PfCRIListeOperationsSimple}{1}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRetiensLoperation{\faa}%
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{-}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreATester-\PfCRINombreCle}}%
+ }{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreCle-\PfCRINombreATester}}%
+ }%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRINombreATester}%
+ }{%
+ \modulo{\PfCRINombreCle}{\PfCRINombreATester}{}%
+ \xintifboolexpr{\remainder==0}{%-1
+ \MelangeListe{\PfCRIListeToutesOperations}{1}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \readlist*\PfCRIRetiensLoperation{\faa}%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRIListeOperations{\PfCRIRecupOperations}%
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{*}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreCle/\PfCRINombreATester}}%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRINombreATester}%
+ }{
+ \IfStrEq{\PfCRIRetiensLoperation[1]}{-}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreATester-\PfCRINombreCle}}%
+ }{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreCle-\PfCRINombreATester}}%
+ }%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRINombreATester}%
+ }%
+ }{%
+ \MelangeListe{\PfCRIListeOperationsSimple}{1}%
+ \xdef\PfCRIRecupOperations{\PfCRIRecupOperations \faa}%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRIListeOperations{\PfCRIRecupOperations}%
+ \IfStrEq{\PfCRIRIListeOperations[\PfCRIRetiensNbEtapes]}{-}{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreATester-\PfCRINombreCle}}%
+ }{%
+ \xdef\PfCRINombreATester{\fpeval{\PfCRINombreCle-\PfCRINombreATester}}%
+ }%
+ \xdef\PfCRIRecupNombres{\PfCRIRecupNombres \PfCRINombreATester}%
+ }%
+ }%
+ }%
+ }%
+ }%
+ \ignoreemptyitems%
+ \readlist*\PfCRIRIOperations{\PfCRIRecupOperations}%
+ \readlist*\PfCRIRINombres{\PfCRIRecupNombres}%
+ \reademptyitems%
+ % On prépare le dessin
+ \xdef\PfCRINombresDessin{}%
+ \xdef\PfCRIOperationsDessin{}%
+ \foreachitem\compteur\in\PfCRIRINombres{%
+ \xintifboolexpr{\PfCRIRINombres[\compteurcnt]<0}{%
+ \xdef\PfCRINombresDessin{\PfCRINombresDessin "(\num{\PfCRIRINombres[\compteurcnt]})",}%
+ }{%
+ \xdef\PfCRINombresDessin{\PfCRINombresDessin "\num{\PfCRIRINombres[\compteurcnt]}",}%
+ }%
+ }%
+ \foreachitem\compteur\in\PfCRIRIOperations{%
+ \xdef\PfCRIOperationsDessin{\PfCRIOperationsDessin "\PfCRIRIOperations[\compteurcnt]",}%
+ }%
+ % On dessine
+ \BuildRondeInfernale{\PfCRINombresDessin}{\PfCRIOperationsDessin}%
+}%
+
+\NewDocumentCommand\BuildRondeInfernale{m m}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Vide,Rectangle,Perso;
+ Vide=\useKV[RondeInfernale]{Vide};
+ Rectangle=\useKV[RondeInfernale]{Rectangle};
+ Perso=\useKV[RondeInfernale]{Perso};
+ if Perso:
+ string Depart;
+ Depart=\useKV[RondeInfernale]{Cle};
+ else:
+ numeric Depart;
+ Depart=\PfCRINombreCle;
+ fi;
+
+ numeric Rayon;
+ Rayon=\useKV[RondeInfernale]{Rayon};
+
+ string Nombre[];
+
+ vardef Compte(text t)=%On compte le nb d'étapes et on retient les nombres
+ nbcase:=0;
+ for p_=t:
+ nbcase:=nbcase+1;
+ Nombre[nbcase]=p_;
+ endfor;
+ enddef;
+
+ vardef AfficheRonde(text t)=%On fait l'affichage des opérations
+ n:=0;
+ for k=1 upto nbcase:
+ fill cercles(rotation(A[k],O,0.5*(360/nbcase)),5mm) withcolor white;
+ endfor;
+ for p_=t:
+ n:=n+1;
+ if p_="*":
+ label(TEX("$\times"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ elseif p_="/":
+ label(TEX("$\div"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ else:
+ label(TEX("$"&p_&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ fi;
+ endfor;
+ enddef;
+
+ vardef AfficheRectangle(text t)=%On fait l'affichage des opérations
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ if n=nbcase:
+ if p_="*":
+ label.bot(TEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ elseif p_="/":
+ label.bot(TEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ else:
+ label.bot(TEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ fi;
+ else:
+ if p_="*":
+ label.top(TEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ elseif p_="/":
+ label.top(TEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ else:
+ label.top(TEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ fi;
+ fi;
+ endfor;
+ enddef;
+
+ vardef BaseRonde=
+ pair O,A[];
+ O=(0,0);
+ path cc;
+ cc=cercles(O,Rayon);
+ A[0]=pointarc(cc,0);
+ A[nbcase+1]=A[0];
+ for k=1 upto nbcase:
+ A[k]=rotation(A[0],O,k*(360/nbcase));
+ endfor;
+ for k=0 upto nbcase:
+ drawarrow reverse(arccercle(A[k],A[k+1],O) cutbefore cercles(A[k],5mm) cutafter cercles(A[k+1],5mm)) withpen pencircle scaled 1.5;
+ endfor;
+ for k=0 upto nbcase:
+ fill cercles(A[k],5mm) withcolor white;
+ trace cercles(A[k],5mm) withpen pencircle scaled 1.5;
+ endfor;
+ enddef;
+
+ vardef BoiteRectangle=
+ save $;
+ path $;
+ $=u*(0.9,-0.5){dir 0}..{dir 90}(u*(1,-0.4))--(u*(1,0.4)){dir 90}..{dir180}(u*(0.9,0.5))--u*(-0.9,0.5){dir 180}..{dir-90}(u*(-1,0.4))--(u*(-1,-0.4)){dir-90}..{dir0}(u*(-0.9,-0.5))--cycle;
+ $
+ enddef;
+
+ vardef BaseRectangle=
+ pair O,A[];
+ O=(0,0);
+ A[0]=O;
+ for k=1 upto nbcase:
+ A[k]-A[k-1]=(Rayon+2cm,0);
+ endfor;
+ for k=0 upto nbcase-2:
+ drawarrow (A[k]--A[k+1]) cutbefore (BoiteRectangle shifted A[k]) cutafter (BoiteRectangle shifted A[k+1]) withpen pencircle scaled 1.5;
+ endfor;
+ drawarrow (A[nbcase-1]--(A[nbcase-1]+u*(0,-1))--(A[0]+u*(0,-1))--A[0]) cutbefore (BoiteRectangle shifted A[nbcase-1]) cutafter (BoiteRectangle shifted A[0]) withpen pencircle scaled 1.5;
+ for k=0 upto nbcase-1:
+ trace (BoiteRectangle shifted A[k]) withpen pencircle scaled 1.5;
+ endfor;
+ enddef;
+
+ Compte(#1);
+
+ if Rectangle:
+ BaseRectangle;
+ AfficheRectangle(#2);
+ else:
+ BaseRonde;
+ AfficheRonde(#2);
+ fi;
+ if Vide=false:
+ if Perso:
+ label(TEX("$"&Depart&"$"),A[0]);
+ else:
+ label(TEX("$"&decimal(Depart)&"$"),A[0]);
+ fi;
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={%
+ boolean Vide,Rectangle,Perso;Vide=\useKV[RondeInfernale]{Vide};Rectangle=\useKV[RondeInfernale]{Rectangle};Perso=\useKV[RondeInfernale]{Perso};if Perso:string Depart;Depart=\useKV[RondeInfernale]{Cle};else:numeric Depart;Depart=\PfCRINombreCle;fi;numeric Rayon;Rayon=\useKV[RondeInfernale]{Rayon};}]
+ string Nombre[];
+
+ vardef Compte(text t)=%On compte le nb d'étapes et on retient les nombres
+ nbcase:=0;
+ for p_=t:
+ nbcase:=nbcase+1;
+ Nombre[nbcase]=p_;
+ endfor;
+ enddef;
+
+ vardef AfficheRonde(text t)=%On fait l'affichage des opérations
+ n:=0;
+ for k=1 upto nbcase:
+ fill cercles(rotation(A[k],O,0.5*(360/nbcase)),5mm) withcolor white;
+ endfor;
+ for p_=t:
+ n:=n+1;
+ if p_="*":
+ label(LATEX("$\times"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ elseif p_="/":
+ label(LATEX("$\div"&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ else:
+ label(LATEX("$"&p_&Nombre[n]&"$"),rotation(A[nbcase-n],O,0.5*(360/nbcase)));
+ fi;
+ endfor;
+ enddef;
+
+ vardef AfficheRectangle(text t)=%On fait l'affichage des opérations
+ n:=0;
+ for p_=t:
+ n:=n+1;
+ if n=nbcase:
+ if p_="*":
+ label.bot(LATEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ elseif p_="/":
+ label.bot(LATEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ else:
+ label.bot(LATEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[0]]+u*(0,-1));
+ fi;
+ else:
+ if p_="*":
+ label.top(LATEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ elseif p_="/":
+ label.top(LATEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ else:
+ label.top(LATEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ fi;
+ fi;
+ endfor;
+ enddef;
+
+ vardef BaseRonde=
+ pair O,A[];
+ O=(0,0);
+ path cc;
+ cc=cercles(O,Rayon);
+ A[0]=pointarc(cc,0);
+ A[nbcase+1]=A[0];
+ for k=1 upto nbcase:
+ A[k]=rotation(A[0],O,k*(360/nbcase));
+ endfor;
+ for k=0 upto nbcase:
+ drawarrow reverse(arccercle(A[k],A[k+1],O) cutbefore cercles(A[k],5mm) cutafter cercles(A[k+1],5mm)) withpen pencircle scaled 1.5;
+ endfor;
+ for k=0 upto nbcase:
+ fill cercles(A[k],5mm) withcolor white;
+ trace cercles(A[k],5mm) withpen pencircle scaled 1.5;
+ endfor;
+ enddef;
+
+ vardef BoiteRectangle=
+ save $;
+ path $;
+ $=u*(0.9,-0.5){dir 0}..{dir 90}(u*(1,-0.4))--(u*(1,0.4)){dir 90}..{dir180}(u*(0.9,0.5))--u*(-0.9,0.5){dir 180}..{dir-90}(u*(-1,0.4))--(u*(-1,-0.4)){dir-90}..{dir0}(u*(-0.9,-0.5))--cycle;
+ $
+ enddef;
+
+ vardef BaseRectangle=
+ pair O,A[];
+ O=(0,0);
+ A[0]=O;
+ for k=1 upto nbcase:
+ A[k]-A[k-1]=(Rayon+2cm,0);
+ endfor;
+ for k=0 upto nbcase-2:
+ drawarrow (A[k]--A[k+1]) cutbefore (BoiteRectangle shifted A[k]) cutafter (BoiteRectangle shifted A[k+1]) withpen pencircle scaled 1.5;
+ endfor;
+ drawarrow (A[nbcase-1]--(A[nbcase-1]+u*(0,-1))--(A[0]+u*(0,-1))--A[0]) cutbefore (BoiteRectangle shifted A[nbcase-1]) cutafter (BoiteRectangle shifted A[0]) withpen pencircle scaled 1.5;
+ for k=0 upto nbcase-1:
+ trace (BoiteRectangle shifted A[k]) withpen pencircle scaled 1.5;
+ endfor;
+ enddef;
+
+ Compte(#1);
+
+ if Rectangle:
+ BaseRectangle;
+ AfficheRectangle(#2);
+ else:
+ BaseRonde;
+ AfficheRonde(#2);
+ fi;
+ if Vide=false:
+ if Perso:
+ label(LATEX("$"&Depart&"$"),A[0]);
+ else:
+ label(LATEX("$"&decimal(Depart)&"$"),A[0]);
+ fi;
+ fi;
+ \end{mpost}
+ \fi
+}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCRose.tex b/macros/latex/contrib/profcollege/latex/PfCRose.tex
index 98363a8a64..d6059cdd7e 100644
--- a/macros/latex/contrib/profcollege/latex/PfCRose.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCRose.tex
@@ -1,7 +1,7 @@
%%%
% Rose
%%%
-\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false,Nom=Rose1,Creation=false,Addition=false,Melange=false}%
+\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false,Nom=Rose1,Creation=false,Addition=false,Melange=false,CDot=false}%
\defKV[ClesRose]{LesNombres=\setKV[ClesRose]{Creation}}%
\defKV[ClesRose]{LesProduits=\setKV[ClesRose]{Creation}}%
\defKV[ClesRose]{LesSommes=\setKV[ClesRose]{Addition}}%
@@ -19,8 +19,9 @@
}{%
\xdef\PfCFooRoseMul{\PfCFooRoseMul,\useKV[ClesRose]{LesProduits}}%
}%
- \setsepchar{,}%
+ \setsepchar{,}\reademptyitems%
\readlist*\ListeCompleteRoseMul{\PfCFooRoseMul}%
+ \ignoreemptyitems
\foreachitem\compteur\in\ListeCompleteRoseMul{\expandafter\UpdatetoksRM\compteur\nil}%
\xdef\PfCRetiensLesFacteurs{}%
\foreachitem\compteur\in\ListeCompleteRoseMul{%
@@ -216,7 +217,8 @@
\mplibforcehmode%
\begin{mplibcode}
Rayon=\useKV[ClesRose]{Rayon};
- boolean Aide,Solution,Polygone,Addition;
+ boolean Aide,Solution,Polygone,Addition,CDot;
+ CDot=\useKV[ClesRose]{CDot};
Aide=\useKV[ClesRose]{Aide};
Solution=\useKV[ClesRose]{Solution};
Addition=\useKV[ClesRose]{Addition};
@@ -248,12 +250,17 @@
if Addition:
label(TEX("\Large$+$"),O);
else:
+ if CDot:
+ label(TEX("\Large$\cdot$"),O);
+ else:
label(TEX("\Large$\times$"),O);
fi;
+ fi;
\end{mplibcode}
\else
\begin{mpost}[mpsettings={Rayon:=\useKV[ClesRose]{Rayon};
- boolean Aide,Solution,Polygone;
+ boolean Aide,Solution,Polygone,CDot;
+ CDot=\useKV[CleSRose]{Aide};
Aide:=\useKV[ClesRose]{Aide};
Solution:=\useKV[ClesRose]{Solution};
Polygone:=\useKV[ClesRose]{Polygone};
@@ -281,8 +288,12 @@
if Addition:
label(LATEX("\Huge$+$"),O);
else:
+ if CDot:
+ label(LATEX("\Huge$\cdot$"),O);
+ else:
label(LATEX("\Huge$\times$"),O);
fi;
+ fi;
\end{mpost}
\fi
}%
@@ -292,7 +303,8 @@
\mplibforcehmode%
\xdef\PfCNomRose{\useKV[ClesRose]{Nom}}%
\begin{mplibcode}[\PfCNomRose]
- boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone,Addition;
+ boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone,Addition,CDot;
+ CDot=\useKV[ClesRose]{CDot};
Addition=\useKV[ClesRose]{Addition};
Aide:=\useKV[ClesRose]{Aide};
Vide:=\useKV[ClesRose]{Vide};
@@ -326,8 +338,12 @@
if Addition:
label(TEX("\Large$+$"),O);
else:
+ if CDot:
+ label(TEX("\Large$\cdot$"),O);
+ else:
label(TEX("\Large$\times$"),O);
fi;
+ fi;
\end{mplibcode}
\fi
}
@@ -368,7 +384,8 @@
enddef;
pair A[],B[],O;
Rayon:=\useKV[ClesRose]{Rayon};
- boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone,Addition,Melange;
+ boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone,Addition,Melange,CDot;
+ CDot=\useKV[ClesRose]{CDot};
Melange:=\useKV[ClesRose]{Melange};
Addition=\useKV[ClesRose]{Addition};
Aide:=\useKV[ClesRose]{Aide};
@@ -490,12 +507,17 @@
if Addition:
label(TEX("\Large$+$"),O);
else:
+ if CDot:
+ label(TEX("\Large$\cdot$"),O);
+ else:
label(TEX("\Large$\times$"),O);
fi;
+ fi;
\end{mplibcode}
\else
\begin{mpost}[mpsettings={Rayon:=\useKV[ClesRose]{Rayon};
- boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone;
+ boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone,CDot;
+ CDot:=useKV[ClesRose]{CDot};
Aide:=\useKV[ClesRose]{Aide};
Vide:=\useKV[ClesRose]{Vide};
Solution:=\useKV[ClesRose]{Solution};
@@ -607,8 +629,12 @@
if Addition:
label(LATEX("\noexpand\Large$+$"),O);
else:
+ if CDot:
+ label(LATEX("\noexpand\Large$\cdot$"),O);
+ else:
label(LATEX("\noexpand\Large$\times$"),O);
fi;
+ fi;
\end{mpost}
\fi
}% \ No newline at end of file
diff --git a/macros/latex/contrib/profcollege/latex/PfCSerpent.tex b/macros/latex/contrib/profcollege/latex/PfCSerpent.tex
index b71434dc30..cd38bd90a2 100644
--- a/macros/latex/contrib/profcollege/latex/PfCSerpent.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCSerpent.tex
@@ -17,6 +17,7 @@
\setsepchar{,}\ignoreemptyitems%
\expandafter\UpdatetoksSerpent\PfCFooCheminSerpent\nil%
\BuildSerpent{\the\tokListeSerpentPerso}%
+ \reademptyitems%
}{%
\BuildSerpent{}%
}%
@@ -253,9 +254,9 @@
Chiffre[tt]=Chiffre[tt-1]*Multiple;
St[tt]=iso(N[tt-1]+PasQuad*(1,1),N[tt]+PasQuad*(1,1));
if xpart(N[tt])-xpart(N[tt-1])=0:
- label.rt(TEX("$\times"&decimal(Multiple)&"$"),St[tt]);
+ label.rt(TEX("$\PfCSymbolTimes"&decimal(Multiple)&"$"),St[tt]);
else:
- label.bot(TEX("$\times"&decimal(Multiple)&"$"),St[tt]);
+ label.bot(TEX("$\PfCSymbolTimes"&decimal(Multiple)&"$"),St[tt]);
fi;
enddef;
numeric Chiffre[];
@@ -290,9 +291,9 @@
Chiffre[tt]=Chiffre[tt-1] div Quotient;
St[tt]=iso(N[tt-1]+PasQuad*(1,1),N[tt]+PasQuad*(1,1));
if xpart(N[tt])-xpart(N[tt-1])=0:
- label.rt(TEX("$\div"&decimal(Quotient)&"$"),St[tt]);
+ label.rt(TEX("$\PfCSymbolDiv"&decimal(Quotient)&"$"),St[tt]);
else:
- label.bot(TEX("$\div"&decimal(Quotient)&"$"),St[tt]);
+ label.bot(TEX("$\PfCSymbolDiv"&decimal(Quotient)&"$"),St[tt]);
fi;
enddef;
%
diff --git a/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex b/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex
index 0fc78fb757..b45111daf5 100644
--- a/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCStatistiques.tex
@@ -514,6 +514,11 @@ ModeleCouleur=5%
B[n]=unitey*(0,ypart(p_));
fi;
endfor;
+ if DonneesSup:
+ maxAxey:=floor(maxy/10)*10+4*PasGrilley;
+ else:
+ maxAxey:=maxy;
+ fi;
enddef;
vardef tutu(text t)=%points qualitatif
n:=0;
@@ -531,6 +536,11 @@ ModeleCouleur=5%
endfor;
maxy:=maxy-Depart;
maxx:=n;
+ if DonneesSup:
+ maxAxey:=floor(maxy/10)*10+4*PasGrilley;
+ else:
+ maxAxey:=maxy;
+ fi;
enddef;
}
@@ -649,9 +659,9 @@ ModeleCouleur=5%
if Grille:
drawoptions(withcolor 0.75white);
for k=0 step PasGrillex until ((maxx+1)):
- trace (k*unitex,0)--(k*unitex,unitey*((floor(maxy/Pasy)+1)*Pasy));
+ trace (k*unitex,0)--(k*unitex,unitey*((floor(maxAxey/Pasy)+1)*Pasy));
endfor;
- for k=0 step PasGrilley until (floor(maxy/Pasy)+1)*Pasy:%((maxy+2*Pasy)):
+ for k=0 step PasGrilley until (floor(maxAxey/Pasy)+1)*Pasy:%((maxy+2*Pasy)):
trace (0,k*unitey)--(unitex*(maxx+1),k*unitey);
endfor;
drawoptions();
@@ -701,9 +711,9 @@ ModeleCouleur=5%
endfor;
fi;
drawarrow (0,0)--unitex*(maxx+1,0);
- drawarrow (0,0)--unitey*(0,(floor(maxy/Pasy)+1)*Pasy);
- label.lrt(btex \useKV[ClesStat]{Donnee} etex,unitex*(maxx+1,0));
- label.urt(btex \useKV[ClesStat]{Effectif} etex,unitey*(0,(floor(maxy/Pasy)+1)*Pasy));
+ drawarrow (0,0)--unitey*(0,(floor(maxAxey/Pasy)+1)*Pasy);
+ label.lrt(TEX("\useKV[ClesStat]{Donnee}"),unitex*(maxx+1,0));
+ label.urt(TEX("\useKV[ClesStat]{Effectif}"),unitey*(0,(floor(maxAxey/Pasy)+1)*Pasy));
if Qualitatif: titi(#1); else:tata(#1); fi;
\end{mplibcode}
\else
diff --git a/macros/latex/contrib/profcollege/latex/PfCThales.tex b/macros/latex/contrib/profcollege/latex/PfCThales.tex
index 47aabb47da..a0ebd3b36f 100644
--- a/macros/latex/contrib/profcollege/latex/PfCThales.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCThales.tex
@@ -554,7 +554,7 @@
est un tableau de proportionnalit\'e\ifboolKV[ClesThales]{Segment}{.}{ d'apr\`es le th\'eor\`eme de Thal\`es.}%
}{%
\ifboolKV[ClesThales]{Segment}{on a :}{le th\'eor\`eme de Thal\`es permet d'\'ecrire :}%
- \[\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursNum}{\mathcolor{\useKV[ClesThales]{CouleurNum}}{#2#5}}{#2#5}}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursDen}{\mathcolor{\useKV[ClesThales]{CouleurDen}}{#2#3}}{#2#3}}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursNum}{\mathcolor{\useKV[ClesThales]{CouleurNum}}{#2#6}}{#2#6}}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursDen}{\mathcolor{\useKV[ClesThales]{CouleurDen}}{#2#4}}{#2#4}}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursNum}{\mathcolor{\useKV[ClesThales]{CouleurNum}}{#5#6}}{#5#6}}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursDen}{\mathcolor{\useKV[ClesThales]{CouleurDen}}{#3#4}}{#3#4}}}\]%
+ \[\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursNum}{\mathcolor{\useKV[ClesThales]{CouleurNum}}{#2#5}}{#2#5}}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursDen}{\mathcolor{\useKV[ClesThales]{CouleurDen}}{#2#3}}{#2#3}}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursNum}{\mathcolor{\useKV[ClesThales]{CouleurNum}}{#2#6}}{#2#6}}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursDen}{\mathcolor{\useKV[ClesThales]{CouleurDen}}{#2#4}}{#2#4}}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursNum}{\mathcolor{\useKV[ClesThales]{CouleurNum}}{#5#6}}{#5#6}}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{\ifboolKV[ClesThales]{CouleursDen}{\mathcolor{\useKV[ClesThales]{CouleurDen}}{#3#4}}{#3#4}}}.\]%
}%
}%
}%
@@ -923,7 +923,7 @@
\end{array}
\]
}{%
- \[\frac{\IfDecimal{#3}{\num{#3}}{#3}}{\IfDecimal{#6}{\num{#6}}{#6}}=\frac{\IfDecimal{#4}{\num{#4}}{#4}}{\IfDecimal{#7}{\num{#7}}{#7}}=\frac{\IfDecimal{#5}{\num{#5}}{#5}}{\IfDecimal{#8}{\num{#8}}{#8}}\]
+ \[\frac{\IfDecimal{#3}{\num{#3}}{#3}}{\IfDecimal{#6}{\num{#6}}{#6}}=\frac{\IfDecimal{#4}{\num{#4}}{#4}}{\IfDecimal{#7}{\num{#7}}{#7}}=\frac{\IfDecimal{#5}{\num{#5}}{#5}}{\IfDecimal{#8}{\num{#8}}{#8}}.\]
}%
% On choisit \'eventuellement le calcul \`a faire s'il y en a plusieurs.
\xdef\CompteurCalcul{\useKV[ClesThales]{ChoixCalcul}}%
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index 5b62dc03b7..dd1f5c9237 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
@@ -2,9 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2023/12/01}%
+\def\filedate{2024/01/22}%
\let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-y}%
+\def\fileversion{0.99-z-z}%
\let\PfCfileversion\fileversion%
\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
@@ -710,6 +710,10 @@
\readlist*\ListeMateriaux{aluminium/'/2.7,chêne/e~/0.69,bouleau/e~/0.65,sapin/e~/0.45,polystyrène/e~/1.04,porcelaine/la/2.5,acier/'/7.85,cuivre/e~/8.92,fer/e~/7.86,or/'/19.3,argent/'/10.5,bronze/e~/8.4,plomb/e~/11.35,marbre/e~/2.75,laiton/e~/7.3,titane/e~/4.5,PVC/e~/1.38}
\setsepchar{,}
+%Internationalisation
+\def\PfCSymbolTimes{\times}%
+\def\PfCSymbolDiv{\div}%
+
\input{PfCConversion}
\input{PfCCritere}
\input{PfCLego}