summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/asmejour/README.md45
-rw-r--r--macros/latex/contrib/asmejour/asmejour-sample.bib109
-rw-r--r--macros/latex/contrib/asmejour/asmejour-template.pdfbin619315 -> 730733 bytes
-rw-r--r--macros/latex/contrib/asmejour/asmejour-template.tex407
-rw-r--r--macros/latex/contrib/asmejour/asmejour.bst4
-rw-r--r--macros/latex/contrib/asmejour/asmejour.cls672
-rw-r--r--macros/latex/contrib/cellprops/LICENSE4
-rw-r--r--macros/latex/contrib/cellprops/README.md2
-rw-r--r--macros/latex/contrib/cellprops/cellprops.dtx451
-rw-r--r--macros/latex/contrib/cellprops/cellprops.ins2
-rw-r--r--macros/latex/contrib/cellprops/cellprops.pdfbin564606 -> 573920 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin308574 -> 300438 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex3
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin224777 -> 224735 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex11
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter1.tex29
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter2.tex6
-rw-r--r--macros/latex/contrib/easybook/doc/pages/preface.tex22
-rw-r--r--macros/latex/contrib/easybook/easybook.cls88
-rw-r--r--macros/latex/contrib/l3kernel/CHANGELOG.md8
-rw-r--r--macros/latex/contrib/l3kernel/README.md8
-rw-r--r--macros/latex/contrib/l3kernel/expl3.dtx18
-rw-r--r--macros/latex/contrib/l3kernel/expl3.pdfbin590320 -> 589868 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.pdfbin1573631 -> 1573345 bytes
-rw-r--r--macros/latex/contrib/l3kernel/interface3.tex6
-rw-r--r--macros/latex/contrib/l3kernel/l3.ins6
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3bootstrap.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3box.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3candidates.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3cctab.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3clist.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3coffins.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3color-base.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3debug.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3deprecation.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3doc.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3docstrip.pdfbin263275 -> 262745 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3expan.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3file.dtx24
-rw-r--r--macros/latex/contrib/l3kernel/l3flag.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-assign.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-aux.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-basics.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-convert.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-expo.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-extended.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-logic.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-parse.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-random.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-round.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-traps.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp-trig.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fp.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3fparray.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3int.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3intarray.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3kernel-functions.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3keys.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3legacy.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3luatex.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3msg.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3names.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3news.pdfbin384459 -> 379428 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3news01.pdfbin113533 -> 113600 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news01.tex4
-rw-r--r--macros/latex/contrib/l3kernel/l3news02.pdfbin140873 -> 140873 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news03.pdfbin143207 -> 138073 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news04.pdfbin107122 -> 107122 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news05.pdfbin105090 -> 105090 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news06.pdfbin140905 -> 140913 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news06.tex4
-rw-r--r--macros/latex/contrib/l3kernel/l3news07.pdfbin119094 -> 119094 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news08.pdfbin152504 -> 152504 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news09.pdfbin241016 -> 235891 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news09.tex8
-rw-r--r--macros/latex/contrib/l3kernel/l3news10.pdfbin145548 -> 140388 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news11.pdfbin164409 -> 159248 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3news12.pdfbin197648 -> 192502 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.csv232
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.pdfbin76251 -> 75619 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.tex2
-rw-r--r--macros/latex/contrib/l3kernel/l3prg.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3prop.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3quark.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3regex.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3seq.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3skip.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3sort.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3str-convert.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3str.dtx15
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.pdfbin279972 -> 279525 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3styleguide.tex6
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.pdfbin228269 -> 227809 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3syntax-changes.tex6
-rw-r--r--macros/latex/contrib/l3kernel/l3sys.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.pdfbin217632 -> 217177 bytes
-rw-r--r--macros/latex/contrib/l3kernel/l3term-glossary.tex6
-rw-r--r--macros/latex/contrib/l3kernel/l3text-case.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3text-purify.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3text.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3tl-analysis.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/l3tl.dtx16
-rw-r--r--macros/latex/contrib/l3kernel/l3token.dtx8
-rw-r--r--macros/latex/contrib/l3kernel/l3unicode.dtx6
-rw-r--r--macros/latex/contrib/l3kernel/source3.pdfbin5995281 -> 5995035 bytes
-rw-r--r--macros/latex/contrib/l3kernel/source3.tex6
-rw-r--r--macros/latex/contrib/l3kernel/source3body.tex2
-rw-r--r--macros/latex/contrib/l3packages/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/l3packages/README.md17
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.dtx8
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.ins4
-rw-r--r--macros/latex/contrib/l3packages/l3keys2e.pdfbin347471 -> 347033 bytes
-rw-r--r--macros/latex/contrib/l3packages/xfp.dtx8
-rw-r--r--macros/latex/contrib/l3packages/xfp.ins4
-rw-r--r--macros/latex/contrib/l3packages/xfp.pdfbin309802 -> 309353 bytes
-rw-r--r--macros/latex/contrib/l3packages/xfrac.dtx8
-rw-r--r--macros/latex/contrib/l3packages/xfrac.ins4
-rw-r--r--macros/latex/contrib/l3packages/xfrac.pdfbin481205 -> 453787 bytes
-rw-r--r--macros/latex/contrib/l3packages/xparse-2018-04-12.sty2402
-rw-r--r--macros/latex/contrib/l3packages/xparse-2020-10-01.sty174
-rw-r--r--macros/latex/contrib/l3packages/xparse-generic.tex2286
-rw-r--r--macros/latex/contrib/l3packages/xparse.dtx4021
-rw-r--r--macros/latex/contrib/l3packages/xparse.ins7
-rw-r--r--macros/latex/contrib/l3packages/xparse.pdfbin505768 -> 505356 bytes
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.dtx10
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.ins4
-rw-r--r--macros/latex/contrib/l3packages/xtemplate.pdfbin416314 -> 415897 bytes
130 files changed, 6481 insertions, 5041 deletions
diff --git a/macros/latex/contrib/asmejour/README.md b/macros/latex/contrib/asmejour/README.md
index 18e1eb7a6f..18a7f825f0 100644
--- a/macros/latex/contrib/asmejour/README.md
+++ b/macros/latex/contrib/asmejour/README.md
@@ -1,13 +1,13 @@
#asmejour: A template for ASME journal papers#
- Version 1.14 dated 2020/08/12.
+ Version 1.15 dated 2021/02/01.
####Overview####
- This class provides a template to format preprints submitted to ASME journals. The layout and reference
- formats follow the style that is being used for published papers in 2020.
+ This class provides a template to format preprints in the style of journal papers published by the American Society of Mechanical Engineers.
+ The layout and reference formats follow the style of published papers in 2020.
- This work is not a publication of ASME itself.
+ This work is not a publication of ASME.
Files in this distribution are:
@@ -27,21 +27,27 @@
This template was designed to approach the following aims:
-- closely approximate ASME's fonts and layout, including author/title/abstract design
+ - closely approximate ASME's fonts and layout, including author/title/abstract design
-- follow today's ASME style for reference lists
+ - match ASME's current reference formats, including hyperlinked DOI and URL fields
-- support hyperref package (hyperlinks for figures, tables, citations, and web)
+ - support hyperlinks to figures, tables, equations, references, and external URLs
-- support pdf bookmarks and metadata
+ - support pdf bookmarks and metadata
-- use the features of the newtxtext and newtxmath font packages
+ - provide line numbers for editing and review
-- support bold-face math, citations, and footnotes in section headings
+ - support balancing of columns on last page
-- provide automatic layout of author blocks for multiple addresses
+ - support PDF/A (archival) standards if desired
-- support PDF/A (archival) standards if desired
+ - support copyright notices for federal employees and contractors
+
+ - support bold-face math and citations in section headings and captions
+
+ - enable various math and text features with newtxmath, newtxtext, and inconsolata packages
+
+ - enable passages in other languages, e.g., for a translation of the abstract or a quotation
####Author####
@@ -58,6 +64,19 @@
---
####Change log####
+
+v1.15 (2021/02/01):
+ - fix issue with math accents in mathversion sansbold (for captions)
+ - add optional copyright notices for government employees and contractors
+ - add \\EntryHeading command for nomenclature
+ - provide additional options for typewriter font
+ - simplify language options for babel
+ - make subfigure example consistent with ASME's labeling
+ - make abstract environment tolerant of blank lines
+ - edit sample bib file; include example of @manual
+ - update some usage of xparse; internal changes to \\PaperYear, \\CorrespondingAuthor and \\keywords commands.
+ - edit code for keys and options; correct largesc option; slightly increase interword shrink; remove legacy code;
+ - substantially edit documentation
v1.14 (2020/08/12): Set pdf page layout to a single page, rather than a two-page spread.
@@ -95,7 +114,7 @@ v1.00: initial release
####License####
- Copyright (c) 2020 John H. Lienhard
+ Copyright (c) 2021 John H. Lienhard
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
diff --git a/macros/latex/contrib/asmejour/asmejour-sample.bib b/macros/latex/contrib/asmejour/asmejour-sample.bib
index 33ad7a1406..864e8f51fb 100644
--- a/macros/latex/contrib/asmejour/asmejour-sample.bib
+++ b/macros/latex/contrib/asmejour/asmejour-sample.bib
@@ -1,6 +1,11 @@
-%% Revised: 12 April 2020
+%% Sample bibliography file for asmejour.bst and asmejour.cls
%%
-%% Titles should be capitalized (title case) according to ASME style
+%% Revised: 30 January 2021
+%% Copyright John H. Lienhard, MIT
+%% Offered under the MIT license: https://ctan.org/license/mit
+
+
+%% Titles should be in title case (first letters capitalized) according to ASME style
%% Allowable fields are listed after the first use of each entry type.
%%
@article{DKE1969,
@@ -14,7 +19,10 @@
doi = {10.1115/1.3580108},
month = feb,
}
-%% article supports these fields: author, year, title, journal, volume, number, pages OR eid, doi OR url OR eprint with archive, note. (The month field is not used in ASME style and will be ignored.)
+%% article supports these fields: author, year, title, journal,
+%% volume, number, pages OR eid,
+%% doi OR url OR eprint with archive, note.
+%% (The month field is not used in ASME style and will be ignored.)
@article{toohey2007,
author = {Kathleen S. Toohey and Nancy R. Sottos and Jennifer A. Lewis and Jeffrey S. Moore and Scott R. White},
@@ -34,7 +42,10 @@
publisher = {John Wiley and Sons},
address = {New York, NY},
}
-%% book supports these fields: author OR editor, year, title, edition, version, series, volume OR number, publisher, address, doi OR url OR eprint with archive, note. type={} field can change "Chap." to something else.
+%% book supports these fields: author OR editor, year, title, edition, version,
+%% series, volume OR number, publisher, address, type,
+%% doi OR url OR eprint with archive, note.
+%% type={} field can change "Chap." to something else.
@incollection{stevens1999,
author = {Thomas T. Stevens},
@@ -46,7 +57,10 @@
address = {Dordrecht, Germany},
pages = {22--36},
}
-%% incollection supports these fields: author, year, title, booktitle, edition, editor, series, volume OR number, publisher, address, chapter, pages, doi OR url OR eprint with archive, note. type={} field changes "Chap." to something else.
+%% incollection supports these fields: author, year, title, booktitle, edition, editor,
+%% series, volume OR number, publisher, address, type,
+%% chapter, pages, doi OR url OR eprint with archive, note.
+%% type={} field changes "Chap." to something else.
@inproceedings{wions2006,
author = {Thomas Wions and Christopher D. Mills},
@@ -60,13 +74,12 @@
pages = {777--798},
}
%% inproceedings supports these fields: author, year, title, booktitle, edition, editor, series, volume,
-%% organization OR publisher, address OR venue, eventdate, [paper] number
-%% pages, doi, note, url, eprint with archive, url.
+%% organization OR publisher, address OR venue, eventdate, [paper] number,
+%% pages, doi, note, url, eprint with archive, url, type.
%% type = { } changes default "Paper No."
%% venue and eventdate are specific to the asmejour.bst style. The "series" field is rarely used.
%% If there are no pages as such, just omit the pages field and ignore the bibtex warning "missing pages".
-
@techreport{oligaria2011,
author = {Oligaria, T. T. and Fredy, C. W. and Popullo, A. Z. and Tucker, M. A.},
year = {2011},
@@ -79,7 +92,6 @@
%% ASME's online examples omit institution; however, the ASME journals will include it, e.g.:
%% institution = {Society of Automotive Engineers},
-
@phdthesis{mollen2014,
author = {T. P. Mollen},
year = {2014},
@@ -89,7 +101,7 @@
address = {Boston, MA},
}
%% phdthesis supports these fields: author, year, title, type, school, address, note.
-%% These fields are also supported, but don't use them all: doi, eprint with archive, url, urldate, urltype
+%% Additional fields are also supported, but don't use them all: doi, eprint with archive, url, urldate, urltype
%% type = {} can optionally be added to change the style of thesis. Default is "Ph.D. thesis"
@book{smith2014,
@@ -168,31 +180,36 @@
urldate = {Nov. 6, 2019},
}
-@online{GSL,
- title = {{GNU} Scientific Library},
- year = 2017,
- URL = {https://www.gnu.org/software/gsl/},
+@manual{GSL,
+ title = {{GNU} Scientific Library},
author = {Mark Galassi
- and Jim Davies
- and James Theiler
- and Brian Gough
- and Gerard Jungman
- and Patrick Alken
- and Michael Booth
- and Fabrice Rossi
- and Rhys Ulerich},
+ and Jim Davies
+ and James Theiler
+ and Brian Gough
+ and Gerard Jungman
+ and Patrick Alken
+ and Michael Booth
+ and Fabrice Rossi
+ and Rhys Ulerich},
+ version = {2.4},
+ versiontype = {Release},
organization = {Free Software Foundation},
address = {Boston, MA},
+ year = 2017,
+ url = {https://www.gnu.org/software/gsl/},
urldate = {Dec. 12, 2018},
- version = {2.4},
- versiontype = {Release},
}
-%% An alternative approach that doesn't use version and versiontype follows next:
+%% manual supports these fields: author, year, title, edition, organization, address,
+%% doi, eprint with archive, urldate, url, version, versiontype, note.
+%% You can change "Accessed" with "urltype", e.g., urltype = {retrieved},
+%% You can change "Version" with "versiontype, e.g., versiontype = {Release},
+
+%% Next is an alternative approach to stating the version/release that doesn't use version and versiontype:
@online{dlmf,
title = {{NIST} {D}igital Library of Mathematical Functions, Release 1.0.17},
year = {2017},
editor = {F. W. J. Olver and A. B. {Olde Daalhuis} and D. W. Lozier and B. I. Schneider and
- R. F. Boisvert and C. W. Clark and B. R. Miller and B. V. Saunders},
+ R. F. Boisvert and C. W. Clark and B. R. Miller and B. V. Saunders},
organization = {National Institute of Standards and Technology},
address = {Gaithersburg, MD},
url = {http://dlmf.nist.gov/},
@@ -200,13 +217,13 @@
}
@online{texshop,
- author = {Richard Koch},
- title = {{\TeX}{S}hop, Version 4.01},
- year = {2018},
- url = {http://pages.uoregon.edu/koch/texshop/obtaining.html},
- urldate = {Apr. 16, 2018},
- organization = {University of Oregon},
- address = {Eugene, OR},
+ author = {Richard Koch},
+ title = {{\TeX}{S}hop, Version 4.01},
+ year = {2018},
+ url = {http://pages.uoregon.edu/koch/texshop/obtaining.html},
+ urldate = {Apr. 16, 2018},
+ organization = {University of Oregon},
+ address = {Eugene, OR},
}
@online{tolusis,
@@ -292,6 +309,16 @@
}
% note={English translation by I.\ Bruce available here at \url{http://www.17centurymaths.com/contents/introductiontoanalysisvol1.htm}},
+@online{milde,
+ author = {G\"{u}nter Milde},
+ title = {{\texttt{substitutefont}}---Easy font substitution},
+ version = {0.1.4},
+ organization = {Comprehensive \TeX\ Archive Network},
+ year = {2013},
+ url = {https://www.ctan.org/pkg/substitutefont},
+ urldate = {Dec. 9, 2020},
+}
+
@book{fourier1822,
author = {Jean Baptiste Joseph Fourier},
year = {1822},
@@ -313,9 +340,6 @@
archive = hndl,
eprint = {2060/19980228020},
}
-%% techreport supports these fields: author, year, title, institution, address, number, type,
-%% note, doi OR url OR eprint with archive.
-%% ASME's online examples omit the institution and address; however, the ASME journals will include these.
%% Equivalent links for this case: url = {https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19980228020.pdf},
%% url = {http://hdl.handle.net/2060/19980228020}
@@ -324,7 +348,7 @@
year = {1956},
title = {The Turbulent Boundary Layer},
booktitle = {Advances in Applied Mechanics},
- editor = {H.L. Dryden and Th. von K\'arm\'an},
+ editor = {H. L. Dryden and Th. von K\'arm\'an},
volume = {4},
publisher = {Elsevier},
address = {Amsterdam, The Netherlands},
@@ -332,9 +356,9 @@
doi = {10.1016/S0065-2156(08)70370-3},
}
%% This common case is an article in series of edited books where the series title is the same for all volumes.
-%% type = {..}, changes chapter to something else...
+%% type = {..}, changes chapter to something else
%% url = {..}, can be added if it exists
-%% edition = {..} can be added if relevant.
+%% edition = {..} can be added if relevant
@inserialcollection{DKE70,
author = {Donald K. Edwards},
@@ -453,6 +477,7 @@
%% mastersthesis supports these fields: author, year, title, type, school, address, note.
%% These fields are also supported, but don't use them all: doi, eprint with archive, url, urldate, urltype
%% type={} can optionally be used to change the type of thesis. Default is "Master's thesis"
+
%% The following example uses type to make an entry for a Bachelor's thesis.
@mastersthesis{smith1996,
author = {Robert Smith},
@@ -516,4 +541,8 @@
address = {Boston},
note = {{``The Locust Years''}},
}
-%% inbook supports these fields: author OR editor, year, title, edition, version, versiontype, series, volume OR number, doi OR url OR eprint with archive, publisher, address, note. type={} field can change "Chap." to something else.
+%% inbook supports these fields: author OR editor, year, title, edition,
+%% version, versiontype, series, volume OR number,
+%% doi OR url OR eprint with archive, publisher, address, note.
+%% type={} field can change "Chap." to something else.
+
diff --git a/macros/latex/contrib/asmejour/asmejour-template.pdf b/macros/latex/contrib/asmejour/asmejour-template.pdf
index 9545616fed..2951bf48e7 100644
--- a/macros/latex/contrib/asmejour/asmejour-template.pdf
+++ b/macros/latex/contrib/asmejour/asmejour-template.pdf
Binary files differ
diff --git a/macros/latex/contrib/asmejour/asmejour-template.tex b/macros/latex/contrib/asmejour/asmejour-template.tex
index 75a0357c10..b822063f69 100644
--- a/macros/latex/contrib/asmejour/asmejour-template.tex
+++ b/macros/latex/contrib/asmejour/asmejour-template.tex
@@ -1,25 +1,26 @@
% !TEX encoding = UTF-8 Unicode
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% This file is asmejour-template.tex, a template to format papers in the style of ASME journal papers
-%% as they are being published in 2020.
+%% This file is asmejour-template.tex, a template to format papers in the style of ASME journal papers.
%%
-%% This file is version 1.14 dated 2020/08/12
+%% This file is version 1.15 dated 2021/02/01
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
%% Massachusetts Institute of Technology
%% Cambridge, MA 02139-4307 USA
%%
-%% Class options are set up in the asmejour.cls file. These include:
+%% Class options include:
%%
%% * Option to color the vertical bar in the title block [barcolor = colorname]
%% * where colorname is any name def'd by xcolor package; omit barcolor option to get black
%%
-%% * Option to omit the list of figures and list of tables [nolists]
+%% * Option to omit the list of figures and list of tables at the end [nolists]
%%
-%% * Math options from M. Sharpe's newtxmath package: upright integrals [upint]; and
-%% * varvw for a v and w that are better distinguished from greek nu; and also
-%% * smallerops, varg, slantedGreek, frenchmath, varbb, cmbraces. Version 1.5 or higher
+%% * Math options from M. Sharpe's newtxmath package: upright integrals [upint];
+%% * [varvw] for a v and w that are better distinguished from greek nu; [subscriptcorrection]
+%% * to fine-tune the placement of math subscripts; and also additional options such as
+%% * [smallerops, varg, slantedGreek, frenchmath, varbb, cmbraces]. Version 1.6 or higher
%% * is recommended.
%%
%% * Option to include line numbers [lineno]. The lineno package does not number tables,
@@ -30,61 +31,53 @@
%% * misbehaves, so use it with an awareness that it can create unexpected problems.
%% * This option is not compatible with line numbering.
%%
+%% * Options for PDF/A compliance. [pdf-a] will produce PDF/A-3u compliance with sRGB OutputIntent.
+%% * [pdfapart= 1 or 2 or 3] and [pdfaconformance= b or u] allow other levels: 1b, 2b, 2u, and 3b.
+%%
+%% * An option to omit all the ASME text fields from the footer [nofoot].
+%%
+%% * Options for copyright notices:
+%% * Omit the ASME copyright from the footer [nocopyright]
+%% * Copyright footnote if all authors are government employees [govt]
+%% * Copyright footnote if some authors are government employees [govtsome]
+%% * Copyright footnote for government contractors [contractor]
+%%
%% * Many options for calligraphic, script, and fraktur fonts from the mathalfa package; the
%% * example value used is: mathalfa=cal=euler (use Euler font for \mathcal)
%% * some other options for cal are: dutchcal, zapfc, cm (default), boondox,...
%% * frak (fraktur), bb (blackboard bold), scr (script) may also be controlled.
%%
-%% * An option to omit all the ASME text fields from the footer [nofoot].
-%%
-%% * An option to omit only the ASME copyright field from the footer [nocopyright].
-%%
%% * An option to use newtxtext's superiors font for footnotes [nodefaultsups] and an option
-%% * for slightly larger small capitals, largesc
+%% * for slightly larger small capitals [largesc]
%%
-%% * Options to set (for the babel package) a primary language [lang= ], and secondary or tertiary
-%% * languages, [lang-second] and [lang-third]. If no option is given, english is the main language.
-%% * If a secondary or tertiary language is selected, a primary language must also be specified.
+%% * Options for typewriter font
+%% * [hyphenate] allow hyphenation (normally suppressed because for typewriter font is often used for code)
+%% * [var0] replace default slashed zero by unslashed zero
+%% * [mono] force interword separation to monospacing
%%
-%% * Option to allow hyphenation of the typewriter font [hyphenate]
-%% * Hyphenation is normally suppressed for typewriter mode because it is often used for code.
-%%
-%% * Options for PDF/A compliance. [pdf-a] will produce PDF/A-3u compliance with sRGB OutputIntent.
-%% * [pdfapart= 1 or 2 or 3] and [pdfaconformance= b or u] allow other levels: 1b, 2b, 2u, and 3b.
+%% * Options for the babel package to support passages in other languages (such as a translated
+%% * abstract in an appendix), e.g. [french]. The main language will default to English
+%% * unless a different main language is selected, e.g. [main=spanish]. See Appendix C for details.
%%
-%% For details of newtxmath and mathalfa, refer to their documentation (available on CTAN: http://ctan.org).
+%% For details of the newtxmath and mathalfa packages, refer to their documentation (available at CTAN: http://ctan.org).
%%
-%% The use of commands defined or modified by the asmejour class is illustrated below. In particular,
-%% some care is needed when using complicated math and macros in section headings,
-%% to avoid problems with pdf bookmarks, which is facilitated by the optional argument of \section,
-%% as also illustrated below.
+%% The use of commands defined or modified by the asmejour class is illustrated below. In particular, some care
+%% is needed when using complicated math and macros in section headings, to avoid problems with pdf bookmarks,
+%% as facilitated by the optional argument of \section (also illustrated below).
%%
%=========================================================
%%
-%% LICENSE:
+%% LICENSE:
%%
-%% Copyright (c) 2020 John Lienhard
+%% Copyright (c) 2021 John H. Lienhard
%%
-%% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
-%% associated documentation files (the "Software"), to deal in the Software without restriction,
-%% including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-%% and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-%% subject to the following conditions:
+%% Offered under the MIT license: https://ctan.org/license/mit
%%
-%% The above copyright notice and this permission notice shall be included in all copies or
-%% substantial portions of the Software.
-%%
-%% The software is provided "as is", without warranty of any kind, express or implied, including but
-%% not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.
-%% In no event shall the authors or copyright holders be liable for any claim, damages or other liability,
-%% whether in an action of contract, tort or otherwise, arising from, out of or in connection with the
-%% software or the use or other dealings in the software.
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Class options are described above.
-\documentclass[largesc,upint,varvw,mathalfa=cal=euler,barcolor=Goldenrod3,nocopyright,hyphenate,balance,lang-second=french,lang=english,pdf-a]{asmejour}
+\documentclass[subscriptcorrection,upint,varvw,mathalfa=cal=euler,barcolor=Goldenrod3,balance,hyphenate,french,pdf-a]{asmejour}
%%%%% FIELDS TO BE COMPLETED FOLLOW %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -97,12 +90,11 @@
%%%% Journal name and optional copyright year %%%%%%%%%%%%%%
-%% Omit "Journal of"
-%% If Journal Name is quite long, use \\ to insert a line break
-\JourName{Heat Transfer} %<=== change to name of your journal
+%% Omit "Journal of". If Journal Name is quite long, use \\ to insert a line break
+\JourName{Heat Transfer}%<=== change to the name of your journal
-\PaperYear % defaults to current year if no argument given or if command is omitted;
- % \PaperYear{} omits year; \PaperYear{2018} sets 2018.
+%% The default copyright year is the current year
+%% \PaperYear{2020} sets 2020; and \PaperYear{} omits the year entirely.
%%%%%%%%% End of Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -126,6 +118,7 @@
% "Name\CorrespondingAuthor{write@to.him, write@to.her}"
\SetAuthorBlock{John H.\ Lienhard V\CorrespondingAuthor}{%
+Fellow ASME\\
Rohsenow Kendall Heat Transfer Laboratory, \\
Department of Mechanical Engineering,\\
Massachusetts Institute of Technology, \\
@@ -139,17 +132,17 @@ email: lienhard@mit.edu
%%% Change these to your keywords. Keywords are automatically printed at the end of the abstract.
%%% This command must come BEFORE the end of the abstract.
-%%% If you don't want keywords, delete the command.
+%%% If you don't want keywords, omit the \keyword{..} command.
\keywords{ASME, Paper, Template, {\upshape\LaTeX}, {\upshape\hologo{BibTeX}}}
-
+
%% Abstract should be no more than 250 words
\begin{abstract}
-This paper is an example and template for the {\upshape\texttt{asmejour}} class. Papers typeset in this class will follow ASME journal style for margins, fonts, headings, captions, and reference formats. Standard {\upshape\LaTeX} commands are used. The class will lay out the author, title, and abstract in ASME style. The class will produce a pdf file that that includes hyperlinks, bookmarks, and pdf metadata. The class is intended to be used with the {\upshape\texttt{asmejour.bst} \hologo{BibTeX}} style for typesetting references, which is part of this distribution. This style supports hyperlinks and modern reference formats, following current ASME practice. The class may be invoked with several options, most of which address math fonts. The class calls a number of packages, all of which are in {\upshape\TeX~Live} and in CTAN (\href{http://ctan.org}{ctan.org}). The class is compatible with {\upshape\hologo{pdfLaTeX}} or {\upshape\hologo{LuaLaTeX}}.
+This paper is an example and {\upshape\LaTeX} template for the {\upshape\texttt{asmejour}} class. Papers typeset in this class will follow ASME journal style for margins, fonts, headings, captions, and reference formats. The class will also lay out the author, title, and abstract in ASME style. The pdf file produced will include internal and external hyperlinks, bookmarks, and pdf metadata. The class is intended to be used with the {\upshape\texttt{asmejour.bst} \hologo{BibTeX}}, which is part of this distribution. This style produces modern reference formats, following current ASME styles and including hyperlinked DOI and URL fields. Options to the class include line numbering, final column balancing, various math options, government copyright notices, and archivability (PDF/A). In addition, section headers may contain mathematics, references, citations, and footnotes. The class is compatible with {\upshape\hologo{pdfLaTeX}} or {\upshape\hologo{LuaLaTeX}}.
\end{abstract}
-\date{Version \versionno, \today} %% can modify this information as desired.
+\date{Version \versionno, \today}%% You can modify this information as desired.
%% Putting \date{} will suppress any date.
%% If this command is omitted, date defaults to \today
%% This command must come somewhere before \maketitle
@@ -162,25 +155,25 @@ This paper is an example and template for the {\upshape\texttt{asmejour}} class.
\section{Introduction}
-The \texttt{asmejour} class file will typeset papers with margins, fonts, headings, captions, and reference formats that follow those used in journals published by the American Society of Mechanical Engineers (ASME). Internal and external hyperlinks will be set automatically, and the pdf file will contain bookmarks and metadata.
+The \texttt{asmejour} class typesets papers with margins, fonts, headings, captions, and reference formats that follow those used in journals published by the American Society of Mechanical Engineers (ASME). Internal and external hyperlinks will be set automatically, and the pdf file will contain bookmarks and metadata. Many other useful features are supported.
-This class is not a publication of ASME. The intended use of this package is to allow authors to format their papers in ASME style prior to submission to an ASME journal for peer review.
+This class is not a publication of ASME, although the author has published in ASME journals since 1984. The intended use of this package is to allow authors to format their papers in ASME style prior to submission to an ASME journal for peer review.
-The \texttt{.tex} file may be written using standard \LaTeX\ commands, although some specific initial commands are needed to format the block containing the author[s], title, and abstract.
+The \texttt{.tex} file may be written using standard \LaTeX\ commands, although some specific initial commands are needed to format the block containing the author[s], title, and abstract. The class calls a number of packages, all of which are contained in up-to-date versions of \TeX~Live, Mac\TeX, and similar platforms. If you find that you are missing a package, you may obtain it at no cost from CTAN (\href{http://ctan.org}{ctan.org}).
\subsection{Essential Initial Commands}
-To begin, fill in the fields to be completed at top of the \texttt{asmejour-template.tex} file. The pdf metadata will be placed into the pdf file itself.
+To begin, fill in the fields to be completed at top of the \texttt{asmejour-template.tex} file. The first are pdf metadata in the preamble that will tag the pdf file itself. Next is the \verb|\JourName{..}| command, which should be changed as appropriate (omit ``Journal of'').
For each author, put author names and affiliation (with line breaks) into a separate \verb|\SetAuthorBlock{name}{affiliation}| command; follow the syntax illustrated \texttt{asmejour-template.tex} file. One author (or more) may be designated as the corresponding author by placing the command \verb|\CorrespondingAuthor| at the end of that name.
-The title should be placed into \verb|\title{..}|, and line breaks may be specified if desired. Keywords may optionally be including using the \verb|\keywords{..}| command; this command \textit{must} be issued before the abstract. The abstract text must be placed into \verb|\begin{abstract}|\ldots\verb|\end{abstract}|. The abstract will automatically be italicized.
+The title should be placed into \verb|\title{..}|, and line breaks may be specified if desired. Keywords may optionally be including using the \verb|\keywords{..}| command; this command \textit{must} be issued before the abstract. To omit keywords, just omit this command. Next, the abstract text must be placed into \verb|\begin{abstract}|\ldots\verb|\end{abstract}|. The abstract will automatically be italicized.
-The date is given as an unnumbered footnote, which deafults to \verb|\today|. Other text for \verb|\date{..}| may be specified. Putting \verb|\date{}| will suppress the footnote.
+The date is automatically given as an unnumbered footnote, which deafults to \verb|\today|. Different text may be given using \verb|\date{..}|. Putting \verb|\date{}| will suppress the date footnote.
-After setting up the authors, title, and abstract, issue the \verb|\maketitle| command.
+After setting up the authors, title, and abstract, issue the \verb|\maketitle| command. The introduction section comes next.
\subsection{Optional to the Color Title Bar}
-The vertical bar in the title block is black in all ASME journals. Since the \texttt{asmejour} class is only for preprints, we include the [fun] option to have the bar in color. Any color \texttt{name} recognized by the \texttt{xcolor} package may be invoked by including the option \texttt{barcolor=name} in the \verb|\documentclass[..]{asmejour}| command. The color name is \texttt{Red4} by default. (To have a black bar, either omit the option entirely or use the name \texttt{black}.)
+The vertical bar in the title block is black in all ASME journals. Since the \texttt{asmejour} class is only for preprints, we include the [fun] option to have the bar in color. Any color \texttt{name} recognized by the \texttt{xcolor} package may be invoked by including the option \texttt{[barcolor=name]} in the \verb|\documentclass[..]{asmejour}| command. The color for this example is \texttt{Goldenrod3}. To have a black bar, either omit \texttt{barcolor} entirely or use the name \texttt{black}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -188,7 +181,7 @@ The vertical bar in the title block is black in all ASME journals. Since the \te
For ASME papers, the labels Figure and Equation should be abbreviated when they do not start a sentence, as in Fig.~\ref{fig:1} and Eq.~\eqref{eqn:1}. Figure~\ref{fig:1} is spelled out when it starts a sentence. Equation~\eqref{eqn:1} is spelled out when it starts a sentence.
-Citations will be numbered automatically \cite{DKE1969}. They should be inserted at the appropriate point using a \verb|\cite{ref}| command~\cite{toohey2007,gibson2008}. The citations will be automatically sorted and compressed, as well, if they are given in a set \cite{stevens1999, DKE1969, wions2006, oligaria2011, mollen2014, smith2014, apple2019}. If naming a reference explicitly, use an abbreviation in front of the number, as in Ref.~\cite{smith2014}. Reference~\cite{smith2014} is appropriate at the beginning of a sentence.
+Citations will be numbered automatically \cite{DKE1969}. They should be inserted at the appropriate point using a \verb|\cite{ref}| command~\cite{toohey2007,gibson2008}. The citations will be automatically sorted and compressed, as well, if they are given in a set \cite{stevens1999, DKE1969, wions2006, oligaria2011, mollen2014, smith2014, apple2019}. If naming a reference explicitly, put ``Ref.''\ in front of the number, as in Ref.~\cite{smith2014}. Reference~\cite{smith2014} is appropriate at the beginning of a sentence.
See the \texttt{asmeconf-sample.bib} file for examples of how to enter your references.
Equations are typeset in the usual way. The class file loads the \texttt{amsmath} and \texttt{mathtools} packages. Further, the \texttt{newtxmath} package used for the math fonts includes many additional features.
@@ -197,24 +190,24 @@ Equations are typeset in the usual way. The class file loads the \texttt{amsmat
\end{equation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section Headings and Captions}
ASME requires that section headings and captions be set in bold face. In addition, the captions must be in sans serif type. The \texttt{asmejour} class will do this automatically. You can place \verb|\cite{..}|, \verb|\ref{..}|, \verb|\label{..}|, and into headings and captions directly, as you would in the main text. You can place \verb|\footnote{..}| into headings, but not into captions.\footnote{See \texttt{tex-stackexchange} for various approaches to footnotes in captions, if they seem necessary. For footnotes in tables, use the \texttt{tablefootnote} package.}
Sections may either be numbered or left unnumbered. ASME publishes papers in either style.
-Math can be used in either captions or section headings, and an appropriate math font will be automatically selected. For a section heading that includes complicated math (and macros), you may use the optional argument of \verb|\section[..]{..}| to create a pdf bookmark without losing characters or producing warnings or errors. See the \texttt{asmejour-template.tex} source file for examples of this. These bookmarks should usually be text expressions, although some math is supported.
+Math can be used in captions or section headings, and an appropriate math font will be automatically selected. For a section heading that includes complicated math (and macros), you may use the optional argument of \verb|\section[..]{..}| to create a pdf bookmark without losing characters or producing warnings or errors. See the \texttt{asmejour-template.tex} source file for examples of this technique. These bookmarks should usually be text expressions, although some math is supported.
If you wish to override the default math format in a heading or caption, put \verb|\mathversion{normal}| in the heading or caption. (The \texttt{newtxmath} package \cite{sharpe1} includes a complete set of bold math fonts, however, so the need to override should be rare.)
Single-sentence captions should not end with a period. Multi-sentence captions do include periods.
\subsection{Subsection Headings}
-Section, subsection, and subsubsection headings should be in title case (first letter of primary words capitalized). ASME does not use \verb|\paragraph|, so the class file treats this commands like \verb|\subsubsection|.
+Section, subsection, and subsubsection headings should be in title case (first letter of primary words capitalized). ASME does not use \verb|\paragraph|, so the class file equates this command to \verb|\subsubsection|.
-%%%%%%%%%%%%% begin figure %%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%% begin figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% captions go below figures
\begin{figure}
@@ -222,63 +215,16 @@ Section, subsection, and subsubsection headings should be in title case (first l
\caption{A figure caption with math, Eq.~\eqref{eqn:1}: $z = (r,\phi)$ \cite{Lienhard2019b}\label{fig:1}}
\end{figure}
-%%%%%%%%%%%%% end figure %%%%%%%%%%%%%%%%%%%
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{More on Math}
-
-To get bold math outside of the captions, you can use the \verb|\bm{..}| macro from the \texttt{bm} package, which is loaded by the class.
-
-\begin{equation}
-\bm{ S = k \ln w}
-\end{equation}
-
-Math italics are used for roman and lower-case greek letters by default. If you want an upright letter in math, you can use the relevant math alphabet, e.g., \verb|\mathrm, \mathbf, \mathsf|:
-\begin{equation}\label{eqn:newton2}
-\vec{F} = m \vec{a} \quad\textrm{or}\quad \vec{\mathrm{F}} = m \vec{\mathrm{a}} \quad\textrm{or}\quad \mathbf{F} = m \mathbf{a} \quad\textrm{or}\quad \vec{\mathsf{F}} = m \vec{\mathsf{a}}
-\end{equation}
-
-ASME typesets vectors in upright bold, like the third instance in Eq.\ \eqref{eqn:newton2}, and sets matrices in bold italic. In the next equation $\mathbf{w}$ is a vector and $\bm{J}_1$ is a matrix:
-\begin{equation}\label{eqn:dw}
-d\mathbf{w} =
- \begin{pmatrix}
- du \\ dv
- \end{pmatrix} =
- \underbrace{\begin{pmatrix}
- \partial u/\partial x & \partial u/\partial y \\
- \partial v/\partial x & \partial v/\partial y
- \end{pmatrix}}_{=\,\bm{J}_1} \begin{pmatrix}
- dx \\ dy
- \end{pmatrix}
-\end{equation}
-
-The \texttt{newtxmath} package includes a large number of options for mathematics, most of which can be called as options to \verb|\documentclass|. For example, the \texttt{upint} option of \texttt{newtxmath} selects upright integral signs (rather than slanted integral signs):
-\begin{quote}
-\verb|\documentclass[upint]{asmejour}|.
-\end{quote}
-These math options are discussed further in the \texttt{asmejour-template.tex} file.
-
-In addition, many options for calligraphic, script, and fraktur fonts are available as options to the \texttt{mathalfa} package, which is also loaded. These may be invoked, for example, as
-\begin{quote}
-\verb|\documentclass[mathalfa=cal=euler]{asmejour}|
-\end{quote}
-which selects the Euler font for \verb|\mathcal|, as in $A \in \mathcal{P}(A)$. %($\mathcal{T}_1 \subset \mathcal{T}_2$)
-To find all the font options, refer to the \texttt{mathalfa} documentation \cite{sharpe2}.
+%%%%%%%%%%%%% end figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-The typewriter font loaded is \texttt{inconsolata} (which is sans serif), as suggested by the \texttt{newtx} package documentation. The class is not set up for use with the \texttt{fontspec} or \texttt{unicode-math} packages.
-
-\subsection{Units and Nomenclature} ASME requires SI units. U.S.\ style units may be follow in parentheses. Be sure to put your symbols into the nomenclature list, including the SI units.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Tables and Figures}
Table \ref{tab:1} is an example of a simple table. Table captions should be placed above tables.
-The class loads the \texttt{array} and \texttt{dcolumn} packages which provide extended capabilities for columns in the \texttt{tabular} environment (used in Tables \ref{tab:2} and \ref{tab:3}). Table~\ref{tab:3} is designed to have exactly the width of a text column.
+The class loads the \texttt{array} and \texttt{dcolumn} packages which provide extended capabilities for columns in the \texttt{tabular} environment (used in Tables \ref{tab:2} and \ref{tab:3}). Table~\ref{tab:3} is coded to have exactly the width of a text column.
-The \texttt{booktabs} package \cite{fear} is loaded (and customized) to provide versions of \verb|\toprule|, \verb|\midrule|, and \verb|\bottomrule}| appropriate to ASME-style tables.
+The \texttt{booktabs} package \cite{fear} is loaded (and customized) to provide versions of \verb|\toprule|, \verb|\midrule|, and \verb|\bottomrule| appropriate to ASME-style tables.
Table~\ref{tab:4} shows a table that spans both text columns. Figure~\ref{fig:2} shows a figure spanning both columns. Two column tables and figures will always float to the top of a later page. Subframes in figures, such as Fig.~\ref{fig:interior-region}, may be referenced individually.
@@ -286,28 +232,8 @@ Text in the figures should be checked for legibility at either single-column wid
Landscape figures and tables may be produced at full-page size by putting \verb|\usepackage[figuresright]{rotating}| in your \texttt{.tex} file's preamble and using the \texttt{sidewaystable*} and \texttt{sidewaysfigure*} environments~\cite{fairbairns}.
-%%%%%%%%%%%%%%% begin simple table %%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% captions go above tables
-
-\begin{table}[t]
-\caption{A simple table\label{tab:1}}
-\centering{%
-\begin{tabular}{l l r}
-\toprule
-Experiment & $u$ [m/s] & $T$ [\textdegree C] \\
-\midrule
-Run 11 & 12.5 & 103.4 \\
-Run 12 & 24 & 68.3 \\
-\bottomrule
-\end{tabular}
-}%
-\end{table}
-
-%%%%%%%%%%%%%%%% end table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%% begin two column figure %%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% begin two column figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure*}[t]
\begin{subfigure}[t]{0.5\textwidth} % You will get same result using \begin{minipage}[t]{0.5\textwidth}
@@ -318,47 +244,54 @@ Run 12 & 24 & 68.3 \\
}
\vspace*{1.7em}
}
-\subcaption{Interior region\label{fig:interior-region}}
+\subcaption{\label{fig:interior-region}}
\end{subfigure}%
%%%%%%%% don't leave a break here
\begin{subfigure}[t]{0.5\textwidth} % You will get same result using \begin{minipage}[t]{0.5\textwidth}
\centering{
\includegraphics{sample-figure-2b.pdf}
-\subcaption{Exterior region\label{fig:exterior-region}}
+\subcaption{\label{fig:exterior-region}}
}\end{subfigure}%
-\caption{A figure with two subfigures \cite{Lienhard2019b}\label{fig:2}}
+\caption{A figure with two subfigures: \subref{fig:interior-region} interior region, and \subref{fig:exterior-region} exterior region \cite{Lienhard2019b}\label{fig:2}}
\end{figure*}
-%%%%%%%%%%%%%%%%%%% end two column figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%% end two column figure %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Reference Formatting with \texttt{asmejour.bst}}
-The {\upshape\texttt{asmejour.bst}} \hologo{BibTeX} style follows the reference styles observed in ASME journals in early 2020. The vast majority of published references are to journal papers and books. Examples for these and many other entry types are given in the \texttt{asmejour-sample.bib} file, which is part of this distribution. Citations and references are managed by the standard \texttt{natbib} package.
+The {\upshape\texttt{asmejour.bst}} \hologo{BibTeX} style follows the reference styles observed in ASME journals in 2020.\footnote{\texttt{asmejour.bst} is intended as a replacement for the older style \texttt{asmems4.bst}, which does not follow ASME's current reference formats or support DOI and URL.} The vast majority of published references are to journal papers and books. Examples for these and many other entry types are given in the \texttt{asmejour-sample.bib} file, which is part of this distribution. Citations and references are managed by the standard \texttt{natbib} package.
Nevertheless, a few comments are necessary.
-\subsection{Hyperlinked Titles and Numbers} When the entries \verb|@article{..|, \verb|@book{..|, \verb|@inbook{..|, \verb|@incollection{..|, \verb|@proceedings{..|, or \verb|@techreport{..| include \verb|doi={..}|, the document title, paper number, or report number will be hyperlinked to that doi number, and the doi number will not be printed. If no doi is included, but a url or eprint is included, then the title will be hyperlinked to that url or eprint. To display the doi (or the url or eprint when no doi is given), put it into the \verb|note={..}| field (using \verb|\doi{..| or \verb|\url{..| ):
+\subsection{Capitalization of Titles} ASME's bibliography style requires that titles be in title case. The first letters of principal words are capitalized. This must be done when writing the \texttt{.bib} file.
+%(ASME capitalizes ``With'', but not other prepositions).
+
+\subsection{Hyperlinked Titles or Paper Numbers} When the entries \verb|@article{..|, \verb|@book{..|, \verb|@inbook{..|, \verb|@incollection{..|, \verb|@proceedings{..|, or \verb|@techreport{..| include \verb|doi={..}|, the document title, paper number, or report number will be hyperlinked to that doi number, and the doi number will not be printed. If no doi is included, but a url or eprint is included, then the title will be hyperlinked to that url or eprint. To display the doi (or the url or eprint when no doi is given), put it into the \verb|note={..}| field (using \verb|\doi{..| or \verb|\url{..| ):
\begin{quote}
\verb|note = {\doi{10.1115/1.4042912}}|
\end{quote}
Include doi numbers in references whenever possible.
-\subsection{eprint Support} Elementary support for \texttt{eprint} numbers is included, either hyperlinking or generating a url at the end of the citation. The \texttt{archive} type may be specified using the macros \texttt{arxiv, googlebooks, hndl, jstore, oclc}, or \texttt{pubmed} (e.g., \texttt{archive=hndl}, \textit{without} braces). Both \texttt{eprint} and \texttt{archive} fields \textit{must} be given. Other root urls may be invoked using \verb|archive = {http://another.url.org/}|.
+%%%%%%%%%%%%%%% begin simple table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Online Sources} A bibliography field \verb|@online{..| is included for citation of online sources, such as web pages. A \texttt{url}, \texttt{doi}, or \texttt{eprint} with \texttt{archive} should be included. See the examples of use in the \texttt{asmejour-sample.bib} file.
-
-\subsection{Date Accessed} The \verb|urldate={..}| field may be used to provide the date on which a given url was accessed. By default, the text printed will be \texttt{accessed `date',}. The word ``accessed'' may be changed using the \verb|urltype={..}| field.
-
-\subsection{Conference Location and Date} For the entry types \verb|@inproceeedings{..| and \verb|@proceeedings{..|, you may include \verb|venue={..}| and \verb|eventdate={..}| to specify the city and the date of a conference. Omit \verb|address={..}| if \verb|venue={..}| is used.
-
-\subsection{Version Number\protect\footnote{Footnotes can appear in \texttt{\string\section} commands. However, when the \texttt{[lineno]} option is used either: i) write \texttt{\string\protect\string\footnote\{..\}}; or ii) include the optional argument, as in \texttt{\string\section[Foo]\{Foo\string\footnote\{..\}\}}.\label{ftnt:3}}}
-The \verb|version={..}| field may be used with \verb|@book|, \verb|@online|, and \verb|@manual|. By default, the text will read \texttt{Version `number'} as in Refs.~\cite{sharpe1,sharpe2}, but different wording may be selected using the \verb|versiontype={..}| field, to have ``Revision'' or something similar, as in Ref.~\cite{GSL}. ASME often puts the version in the title, as in Refs.~\cite{dlmf, texshop}, so I've left the final decision for discussion between the authors and the copy editor.
-
-\subsection{Capitalization of Titles} ASME's bibliography style requires that titles be in title case. The first letters of principal words are capitalized. This must be done when writing the \texttt{.bib} file.
-%(ASME capitalizes ``With'', but not other prepositions).
+%% captions go above tables
-\subsection{Articles in Collections} In addition to the standard entry, \verb|@incollection{..|, an entry \verb|@inserialcollection{..| is defined for serials in which each volume has a different title. See the \texttt{asmejour-sample.bib} file for discussion and compare Ref.~\cite{clauser56} to Ref.~\cite{DKE70}.
+\begin{table}[t]
+\caption{A simple table\label{tab:1}}
+\centering{%
+\begin{tabular}{l l r}
+\toprule
+Experiment & $u$ [m/s] & $T$ [\textdegree C] \\
+\midrule
+Run 11 & 12.5 & 103.4 \\
+Run 12 & 24 & 68.3 \\
+\bottomrule
+\end{tabular}
+}%
+\end{table}
+%%%%%%%%%%%%%%%%% end table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% begin more complicated table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -377,35 +310,124 @@ Our competitor's data & 72.321 & 141.384\\
}%
\end{table}
-%%%%%%%%%%%%%%%% end table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%% end table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\subsection{eprint Support} Elementary support for \texttt{eprint} numbers is included, either hyperlinking or generating a url at the end of the citation. The \texttt{archive} type may be specified using the macros \texttt{arxiv, googlebooks, hndl, jstore, oclc}, or \texttt{pubmed} (e.g., \texttt{archive=hndl}, \textit{without} braces). Both \texttt{eprint} and \texttt{archive} fields \textit{must} be given. Other root urls may be invoked using \verb|archive = {http://another.url.org/}|.
+
+\subsection{Online Sources} A bibliography field \verb|@online{..| is included for citation of online sources, such as web pages. A \texttt{url}, \texttt{doi}, or \texttt{eprint} with \texttt{archive} should be included. See the examples of use in the \texttt{asmejour-sample.bib} file.
+
+\subsection{Date Accessed} The \verb|urldate={..}| field may be used to provide the date on which a given url was accessed. By default, the text printed will be \texttt{accessed `date',}. The word ``accessed'' may be changed using the \verb|urltype={..}| field.
+
+\subsection{Conference Location and Date} For the entry types \verb|@inproceeedings{..| and \verb|@proceeedings{..|, you may include \verb|venue={..}| and \verb|eventdate={..}| to specify the city and the date of a conference. Omit \verb|address={..}| if \verb|venue={..}| is used.
+
+\subsection{Version Number\protect\footnote{Footnotes can appear in \texttt{\string\section} commands. However, when the \texttt{[lineno]} option is used either: i) write \texttt{\string\protect\string\footnote\{..\}}; or ii) include the optional argument, as in \texttt{\string\section[Foo]\{Foo\string\footnote\{..\}\}}.\label{ftnt:3}}}
+The \verb|version={..}| field may be used with \verb|@book|, \verb|@online|, and \verb|@manual|. By default, the text will read \texttt{Version `number'} as in Refs.~\cite{sharpe1,sharpe2}, but different wording may be selected using the \verb|versiontype={..}| field, to have ``Revision'' or something similar, as in Ref.~\cite{GSL}. ASME often puts the version in the title, as in Refs.~\cite{dlmf, texshop}, so I've left the final decision for discussion between the authors and the copy editor.
+
+\subsection{Articles in Collections} In addition to the standard entry, \verb|@incollection{..|, an entry \verb|@inserialcollection{..| is defined for serials in which each volume has a different title. See the \texttt{asmejour-sample.bib} file for discussion and compare Ref.~\cite{clauser56} to Ref.~\cite{DKE70}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{More on Math}
+Math italics are used for roman and lower-case greek letters by default. If you want an upright letter in math, you can use the relevant math alphabet, e.g., \verb|\mathrm, \mathbf, \mathsf|:
+\begin{equation}\label{eqn:newton2}
+\vec{F} = m \vec{a} \quad\textrm{or}\quad \vec{\mathrm{F}} = m \vec{\mathrm{a}} \quad\textrm{or}\quad \mathbf{F} = m \mathbf{a} \quad\textrm{or}\quad \vec{\mathsf{F}} = m \vec{\mathsf{a}}
+\end{equation}
+
+ASME typesets vectors in upright bold, like the third instance in Eq.\ \eqref{eqn:newton2}, and sets matrices in bold italic. In the next equation, $\mathbf{w}$ is a vector and $\bm{J}_1$ is a matrix:
+\begin{equation}\label{eqn:dw}
+d\mathbf{w} =
+ \begin{pmatrix}
+ du \\ dv
+ \end{pmatrix} =
+ \underbrace{\begin{pmatrix}
+ \partial u/\partial x & \partial u/\partial y \\
+ \partial v/\partial x & \partial v/\partial y
+ \end{pmatrix}}_{=\,\bm{J}_1} \begin{pmatrix}
+ dx \\ dy
+ \end{pmatrix}
+\end{equation}
+
+To get additional symbols in bold math, you can use the \verb|\bm{..}| macro from the \texttt{bm} package, which is loaded by the class
+\begin{equation}
+\mathbf{u}_r = u_r\bm{\hat{\textbf{\i}}}+v_r\bm{\hat{\textbf{\j}}}+w_r\bm{\hat{\textbf{k}}}
+\end{equation}
+or, \textit{very} rarely, \verb|\mathversion{bold}| for an entire equation:
+\mathversion{bold}\begin{equation}
+S = k \ln w = k \ln \biggl(\frac{N!}{\prod_i N_i!}\biggr)
+\end{equation}
+\mathversion{normal}% avoid extra line break with %
+
+In most cases, long equations can be kept below the column width by using one of the multiline equation environments defined by \texttt{amsmath},
+such as \texttt{align}, \texttt{split}, or \texttt{multline}~\cite{amsmath}. The following equation is set with the \texttt{multline} environment:
+\begin{multline}
+\frac{\partial}{\partial t}\left[\rho\Bigl(e + \lVert\mathbf{u}\rVert^2\mspace{-3mu}\big/2\Bigr)\right] + \nabla\cdot\left[\rho\Bigl(h + \lVert\mathbf{u}\rVert^2\mspace{-3mu}\big/2 \Bigr)\mathbf{u}\right]\\
+ ={}-\nabla \cdot \mathbf{q} + \rho \mathbf{u}\cdot\mathbf{g}+ \frac{\partial}{\partial x_j}\bigl(d_{ji}u_i\bigr) + \dot{Q}_v\label{eqn:energy}
+\end{multline}
+An example using \texttt{align} appears in Appendix~\ref{app:zetafunction}.
+
+An alternative solution may be to set large equations into two-column-wide tables or figures. While a package exists for setting equations that span two columns (\texttt{widetext.sty}), that code is erratic in relation to floats and page breaks.
+
+\subsection{\texttt{newtxmath} and \texttt{mathalpha}} The \texttt{newtxmath} package~\cite{sharpe1}, loaded by default, includes a large number of options for mathematics, most of which can be called as options to \verb|\documentclass|. For example, the \texttt{upint} option of \texttt{newtxmath} selects upright integral signs (rather than slanted integral signs):
+\begin{quote}
+\verb|\documentclass[upint]{asmejour}|.
+\end{quote}
+The option \verb|subscriptcorrection| improves the spacing of math subscripts. Math options are discussed further in the \texttt{asmejour-template.tex} file.
+
+In addition, many options for calligraphic, script, and fraktur fonts are available through the \texttt{mathalfa} package, which is also loaded. These may be invoked, for example, as
+\begin{quote}
+\verb|\documentclass[mathalfa=cal=euler]{asmejour}|
+\end{quote}
+which selects the Euler font for \verb|\mathcal|, as in $A \in \mathcal{P}(A)$. %($\mathcal{T}_1 \subset \mathcal{T}_2$)
+To see all the font options, refer to the \texttt{mathalfa} documentation \cite{sharpe2}.
+
+The class is designed for use with \texttt{newtxmath} and does not support the \texttt{unicode-math} package.
+
+%% Dealing with complicated math in a section heading: optional argument of \section provides the pdfbookmark
+%% without losing characters or producing warnings/errors. Note that bookmark can include simple math and \eqref{..}.
+%% newtxmath provides the option for upright Greek letters as \upomega (vs. \omega), etc.
+\subsection[Math in a Section Heading: \omega\cdot U=0]{Math in a Section Heading: $\tilde{\upomega}\cdot\hat{\mathrm{U}}=0$}
+
+To include complicated math in a section heading without producing bookmark-related errors, use the optional argument of \verb|\section| to create the pdfbookmark. The heading above was set with the following command:
+\begin{quote}\raggedright
+\verb|\subsection[Math in a Section Heading:|
+\hspace*{1em}\verb|\omega\cdot U=0]{Math in a Section Heading:|
+\hspace*{1em}\verb|$\tilde{\upomega}\cdot\hat{\mathrm{U}}=0$}|
+\end{quote}
+Note that bookmarks can include simple math. Also note that \texttt{newtxmath} provides the option to obtain upright Greek letters, such as \verb|\upomega| (vs.\ \verb|\omega|).
+
+
+\subsection{Units and Nomenclature} ASME requires SI units. U.~S.\ style units may be follow in parentheses. Be sure to put your symbols into the nomenclature list, including the SI units.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Additional Options for \texttt{asmejour.cls}}
-The class accepts a number of options in addition to those already described.
+%The class accepts a number of options in addition to those already described.
\subsection{Lists of Figures and Tables} A list of figures and a list of tables are generated automatically as the last page. To omit these lists, use the option \texttt{[nolists]}.
\subsection{Final Column Balancing} The option \texttt{[balance]} invokes the the \texttt{flushend} package~\cite{tolusis}.
This package will attempt to give equal height to the two columns on the last page. The performance of this package is sometimes inconsistent (with odd page layout or, very rarely, errors), so use this option with caution.
-\subsection{Line Numbers} The option \texttt{[lineno]} invokes the the \texttt{lineno} package~\cite{bottcher}. This will produce line numbers in the margins. You must run \LaTeX\ twice for proper placement of the numbers. The \texttt{lineno} package is not compatible with the \texttt{flushend} package that makes final short columns the same height. Balancing is disabled when this option is called. See the documentation of the \texttt{lineno} package for further commands to control line numbering. See footnote~\ref{ftnt:3} with regard to footnotes in section headings while this option is in~effect. The abstract, tables, captions, and footnotes will not be numbered.
+\subsection{Line Numbers} The option \texttt{[lineno]} invokes the the \texttt{lineno} package~\cite{bottcher}. This will produce line numbers in the margins. You must run \LaTeX\ \textit{twice} for proper placement of the numbers. The \texttt{lineno} package is not compatible with the \texttt{flushend} package that makes final short columns the same height. Balancing is disabled when this option is called. See the documentation of the \texttt{lineno} package for further commands to control line numbering. See footnote~\ref{ftnt:3} with regard to footnotes in section headings while this option is in~effect. The abstract, tables, captions, and footnotes will not be numbered.
\subsection{Changing the Footer Text}\label{sec:footer} The option \texttt{[nofoot]} will omit everything other than a page number from the page footer. The option \texttt{nocopyright} will omit the ASME copyright from the first page footer. The command \verb|\PreprintString{..}| replaces the words \textsf{PREPRINT FOR REVIEW}. The left and right preprint strings can be changed separately using an optional argument: \verb|\PreprintString{..}[L]| and \verb|\PreprintString{..}[R]|.
The final paper number may be added to the page number using \verb|\PaperNumber{..}|.
-The footers are all generated with the \texttt{fancyhdr} package~\cite{oostrum}, so you can change them in any way you like using the commands of that package.
-
-\subsection{Superiors Font} The \texttt{newtxtext} package includes a superiors font (both numbers and letters) for use in footnote markers and superscripts. To enable this font, use the option \texttt{[nodefaultsups]}. The corresponding author mark in the author block will not change.
+The footers are all generated with the \texttt{fancyhdr} package~\cite{oostrum}, and you can change them using the commands of that package.
\subsection{Vertical Space on Title Page} The space between the author/title/abstract block and the main text defaults to 12.5~mm. Infrequently, a different value may be desirable. The space can be changed using \verb|\AbstractSep{..}|, where the argument is a \LaTeX\ dimension with units (e.g., 5mm).
+\subsection{Federal Copyright Notices} Several types of copyright statement can be placed an unnumbered footnote on the first page. Use the option \texttt{[govt]} when all authors are federal employees, \texttt{[govtsome]} when some authors are federal employees, and \texttt{[contractor]} when the authors are federal contractors.
+
\subsection{Archivability:~PDF/A} Compliance with PDF/A standards can be enabled using the option \texttt{[pdf-a]}
when running with \hologo{pdfLaTeX}. The
default setting is for PDF/A-3u with sRGB OutputIntent (\texttt{sRGB.icc}). If levels 1b, 2b, 2u, or 3b are preferred, use the
options \texttt{[pdfapart=1 or 2 or 3]} and \texttt{[pdfaconformance=b or u]}. Note that accessible
conformance~(\texttt{a}) is not currently possible with \LaTeX.
+\subsection{Superiors Font} The \texttt{newtxtext} package includes a superiors font (numbers and letters) for use in footnote markers and superscripts. The option \texttt{[nodefaultsups]} enables this font. (The corresponding author mark in the author block will not change.)
+
+\subsection{Typewriter Font Options} This font is the sans-serif, monospaced font \texttt{inconsolata}. By default, the word spacing is variable, but option \texttt{[mono]} ends this behavior. A slashed zero is the default; option \texttt{[var0]} removes the slash. Option \texttt{[hyphenate]} enables hyphenation of the typewriter font.%(This option is not available if the \texttt{[fontspec]} option is used.)
+
%%%%%%%%%%%%%%%%%%% begin linewidth table %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -459,28 +481,10 @@ q_\textrm{gray} & q_\textrm{int, $T_1$} & q_\textrm{int, $T_m$} & q_\textrm{exa
\end{table*}
%%%%%%%%%%%%%%%% end two column table %%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Dealing with complicated math in a section heading: optional argument of \section provides the pdfbookmark
-%% without losing characters or producing warnings/errors. Note that bookmark can include simple math and \eqref{..}.
-%%
-%% Newtxmath provides the option for upright Greek letters as \upomega (vs. \omega), etc.
-%%
-\section[Math in a Section Heading: \omega\cdot U=0]{Math in a Section Heading: $\hat{\upomega}\cdot\hat{\mathrm{U}}=0$}
-
-To include complicated math in a section heading without producing bookmark-related errors, use the optional argument of \verb|\section| to create the pdfbookmark. The heading above was set with the following command:
-\begin{quote}\raggedright
-\verb|\section*[Math in a Section Heading:|
-\hspace*{1em}\verb|\omega\cdot U=0]{Math in a Section Heading:|
-\hspace*{1em}\verb|$\hat{\upomega}\cdot\hat{\mathrm{U}}=0$}|
-\end{quote}
-Note that bookmarks can include simple math. Also note that \texttt{newtxmath} provides the option to obtain upright Greek letters as \verb|\upomega| (vs.\ \verb|\omega|), etc.
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Summary}
+\section{Conclusions}
The class \texttt{asmejour} and associated files are for typesetting preprints in the style of ASME journals.
-Documentation is provided in this file and by comments in the \texttt{.tex} source code. Examples of entering references are shown in the \texttt{asmejour-sample.bib} file. The \texttt{asemjour.bst} file produces references following ASME's current formats. This package is not a publication of ASME and is offered without charge under the terms of the \href{https://ctan.org/license/mit}{MIT license}.
+Documentation is provided in this file and by comments in the \texttt{.tex} source code. Examples of references are shown in the \texttt{asmejour-sample.bib} file. The \texttt{asemjour.bst} file produces references following ASME's current formats. The code is compatible with both {\hologo{pdfLaTeX}} and \LuaLaTeX. This package is not a publication of ASME and is offered at no cost under the terms of the \href{https://ctan.org/license/mit}{MIT license}.
\begin{enumerate}
\item First conclusion
@@ -506,7 +510,9 @@ Acknowledge individuals, institutions, or companies that supported the authors i
%%
%% Name of nomenclature can be changed using an optional argument to the environment.
%%
-%% Leave off second argument of \entry to produce a subheading (e.g., \entry{Greek letters} )
+%% \EntryHeading{Greek Letters}
+%% \entry{symbol}{definition}
+%%
%% Must run latex twice to align the columns.
\begin{nomenclature}
@@ -515,14 +521,15 @@ Acknowledge individuals, institutions, or companies that supported the authors i
\entry{$k$}{thermal conductivity (W m$^{-1}$ K$^{-1}$)}
\entry{$\mathbf{q}$}{heat flux vector (W m$^{-2}$)}
-\entry{Greek Letters}
+\EntryHeading{Greek Letters}
\entry{$\alpha$}{thermal diffusivity (m$^2$ s$^{-1}$)}
\entry{$\nu$}{kinematic viscosity (m$^2$ s$^{-1}$)}
-\entry{Dimensionless Groups}
+\EntryHeading{Dimensionless Groups}
\entry{Pr}{Prandtl number, $\nu/\alpha$}
+\entry{Sc}{Schmidt number, $\nu/\mathcal{D}_{1,2}$}
-\entry{Superscripts and Subscripts}
+\EntryHeading{Superscripts and Subscripts}
\entry{b}{bulk value}
\entry{$\infty$}{free stream value}
@@ -539,21 +546,16 @@ Acknowledge individuals, institutions, or companies that supported the authors i
\appendix %%% starting appendices
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Dealing with Wide Equations}
-
-In most cases, the need for a wide equation can be eliminated by using one of the multiline equation environments defined by \texttt{amsmath}, such as \texttt{align}, \texttt{split}, or \texttt{multline}~\cite{amsmath}. An example appears in Appendix~\ref{app:zetafunction}. An alternative solution may be to set large equations into two-column-wide tables or figures. While a package exists for setting equations that span two columns (\texttt{widetext.sty}), that code is erratic in relation to floats and page breaks.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Incomplete Zeta Function~\cite{Lienhard2019c}\label{app:zetafunction}}
-This text is just an illustration. The radiation fractional function may be written in terms of the incomplete zeta function for convenience:
+This text is just for illustration. The radiation fractional function may be written in terms of the incomplete zeta function for convenience:
\begin{align}
f(\lambda T) = {}& \frac{1}{\sigma T^4} \int_0^\lambda\frac{2\pi h c_o^2}{\lambda^5 \left[ \exp (h c_o/k_B T \lambda) - 1\right] } \, d\lambda \\
= {}& \frac{1}{\sigma T^4}\frac{2\pi k_B^4 T^4}{h^3c_o^2}\int^\infty_{c_2/\lambda T}\frac{t^3}{e^t -1}\, dt\label{eqn:zeta}
\end{align}
When $\lambda T \rightarrow \infty$, $f = 1$ and the last equation yields the well-known result
\begin{equation}
- {\sigma T^4} =\frac{2\pi k_B^4 T^4}{h^3c_o^2} \underbrace{\int_0^\infty \frac{t^3}{e^t - 1} \, dt}_{\equiv \zetaup(4)\Gamma(4)}
+ {\sigma T^4} =\frac{2\pi k_B^4 T^4}{h^3c_o^2} \underbrace{\int_0^\infty \frac{t^3}{e^t - 1} \, dt}_{\equiv\mspace{2mu} \zetaup(4)\Gamma(4)}
\end{equation}
where the Gamma function $\Gamma(4) = 3!$ and the Riemann zeta function, $\zetaup(4)$, has the indicated integral representation \cite[\S13.12]{ww1927}. A classical result due to Euler \cite{euler1740} gives $\zetaup(4) = \pi^4/90$ (see also \cite[\S167]{euler1748}), from which we recover the usual definition of the Stefan-Boltzmann constant, $\sigma$.
@@ -561,25 +563,26 @@ where the Gamma function $\Gamma(4) = 3!$ and the Riemann zeta function, $\zetau
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Language Support}
-ASME publishes in English, but the \texttt{babel} package is loaded for
-users who may wish to include other languages. Options are supported to load a primary language, \texttt{lang=}, as well
-as a secondary and tertiary language, \texttt{lang-second} and \texttt{lang-third}. The primary language must be given as the \textit{last} language option in \verb|\documentclass|.
+ASME publishes in English, but the \texttt{babel} package is loaded for users who may wish to include other languages.
+For example, an author might wish to include an appendix that provides the abstract in another language.
-If no language option is given, the package defaults to English. The standard caption and section names will follow \texttt{babel}'s dictionary for primary languages other than English. Users may additionally change ``Keywords'', ``Nomenclature'', and ``Corresponding author'' by renewing the commands \verb|\keywordname|, \verb|\nomname|, and \verb|\CAwords|. Changes to the page footer were described in Sec.~\ref{sec:footer}. The pdf bookmark for ``Appendices'' by be changed by renewing \verb|\appendicesname|.
+When more than one language option is included in \verb|\documentclass[..]{asmejour}|, English will be
+assumed to be the main language of the document. (To choose a different main language, set \texttt{[main=..]}).
+If no language options are given, the package defaults to English. As an example, a passage in French is
+shown in \selectlanguage{french}\appendixname~\ref{app:fourier}\selectlanguage{english}.
-An example of use is shown in \selectlanguage{french}\appendixname\ \ref{app:fourier}.\selectlanguage{english}
+The standard caption and section names will follow \texttt{babel}'s dictionary for primary languages other than English. Users may additionally change ``Keywords'', ``Nomenclature'', and ``Corresponding author'' by renewing the commands \verb|\keywordname|, \verb|\nomname|, and \verb|\CAwords|. Changes to the page footer were described in Sec.~\ref{sec:footer}. The pdf bookmark for ``Appendices'' by be changed by renewing \verb|\appendicesname|.
The font encoding is set to T1 and utf-8 input is supported:
%% If you have trouble with the next line (or the French text that follows), your file may not be saved in utf-8 format. You can delete these lines to resolve the issue.
\typeout{If you have trouble with the next line, your file may not be saved in utf-8 format. You can delete that line to resolve the issue.}
àáâäæãåā èéęëêēė îïíīįì ôöòóœøōõ ûüùúū çćč ł ñń ßśš ÿ žźż
-No effort has been made to support customization of language-specific fonts, although this is possible by modifying the class file (examples are given in the \texttt{newtx} documentation). The bibliography style, \texttt{asmejour.bst}, is designed in English and aimed at \texttt{BibTeX}. Multilingual bibliographies can be supported using \texttt{BibLaTeX}.
+No effort has been made to support customization of language-specific fonts (some fonts can be implemented using the \texttt{substitutefont} package~\cite{milde}). The bibliography style, \texttt{asmejour.bst}, is designed in English and aimed at \texttt{BibTeX}. Multilingual bibliographies can be supported using \texttt{BibLaTeX}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\selectlanguage{french}
\section{Discours Préliminaire de Fourier}\label{app:fourier}
-
Les causes primordiales ne nous sont point con­nues; mais elles sont assujetties à des lois simples et constantes, que l'on peut découvrir par l'obser­vation, et dont l'étude est l'objet de la philosophie naturelle.
La chale ur pénètre, comme la gravité, toutes les substances de l'univers, ses rayons occupent toutes les parties de l'espace. Le but de notre ouvrage est d'exposer les lois mathématiques que suit cet élé­ment. Cette théorie formera désormais une des branches les plus importantes de la physique gé­nérale~\cite{fourier1822}.
diff --git a/macros/latex/contrib/asmejour/asmejour.bst b/macros/latex/contrib/asmejour/asmejour.bst
index 9e28479bec..babfdabbaa 100644
--- a/macros/latex/contrib/asmejour/asmejour.bst
+++ b/macros/latex/contrib/asmejour/asmejour.bst
@@ -4,7 +4,7 @@
%% *** This bibtex style follows ASME journals ***
%%
%%
- %% This file is asmejour.bst, version 1.04 dated 2020/04/15.
+ %% This file is asmejour.bst, fourth 1.04 dated 2020/04/15.
%%
%% This file was generated and edited by John Lienhard.
%% This file is a derivative work under Clause 6 of the LPPL license.
@@ -13,7 +13,7 @@
%% published journal papers in early 2020. Details of the modifications follow.
%%
%% Created entry: @online{...} for web publications (and aliased it to @www and @electronic)
- %% Created fields: eventdate, urldate, urltype, venue, version, versiontype
+ %% Created fields: eventdate, urldate, urltype, venue, fourth, fourthtype
%% Format for url: urlprefix = {}, format.web.urldate, bbl.urldate; urltype = {} changes "accessed" to other text.
%% Added fields: venue and eventdate to @inproceedings
%% Added field: version={}, format.version to @book, @online, @manual; versiontype = {} changes "Version" to other
diff --git a/macros/latex/contrib/asmejour/asmejour.cls b/macros/latex/contrib/asmejour/asmejour.cls
index f7bcc1b215..e5a6b6bdc1 100644
--- a/macros/latex/contrib/asmejour/asmejour.cls
+++ b/macros/latex/contrib/asmejour/asmejour.cls
@@ -1,40 +1,48 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
-%% This file provides the asmejour class for formatting papers in a layout similar to
-%% ASME Journal papers.
-%%
+%% This file provides the asmejour class for formatting papers in a layout similar to ASME Journal papers.
+%%
%% The asmejour.cls file should be used with the files asmejour.bst (for citations) and asmejour-template.tex.
%%
%%
-%% This file is version 1.14 dated 2020/08/12.
- \def\versionno{1.14}
- \def\versiondate{2020/08/12\space}
+%% This file's version and date are:
+ \def\versionno{1.15}
+ \def\versiondate{2021/02/01\space}
%%
%% Author: John H. Lienhard V
%% Department of Mechanical Engineering
%% Massachusetts Institute of Technology
%% Cambridge, MA 02139-4307 USA
%%
-%% This class is compatible with either pdfLaTeX or LuaLaTeX. The class calls a number of packages,
-%% many of which are part of the standard LaTeX distribution, and all of which are in TeXLive and
-%% CTAN (https://ctan.org/).
+%% This class was designed to approach the following aims:
%%
-%% The Times/Helvetica style fonts are from Michael Sharpe's excellent newtxtext and newtxmath packages.
-%% This class is not designed for unicode-math or fontspec.
+%% 1. Match ASME's current layout and font specifications
+%% 2. With amsejour.bst, match ASME's reference formats and support DOI & URL fields
+%% 3. Provide hyperref compatibility for hyperlinks, pdf bookmarks, and metadata
+%% 4. Support citations, footnotes, and bold face math in section headings
+%% 5. Provide optional line numbers for editing and review
+%% 6. Support balancing height of columns on the last page
+%% 7. Support the archival PDF/A standards 1b, 2b, 2u, 3b, and 3u
+%% 8. Provide copyright notices for government employees and government contractors
+%% 9. Enable various math and text features from the newtxmath, mathalfa, and newtxtext packages
+%% 10. Support inclusion of passages in languages other than English
%%
-%% Options for the class are described on lines 61-216.
+%% This class is compatible with either pdfLaTeX or LuaLaTeX. All packages required by the class
+%% are in standard distributions, such as TeXLive, and are also available at CTAN (https://ctan.org/).
%%
-%% The class defines an environment for nomenclature. LaTeX must be run twice to align those columns.
-%%
-%% The title block is set by a specific group of commands which are described in the asmejour-template.tex file.
-%%
-%% The \section[]{} command's optional argument is changed to provide pdf bookmarks when necessary.
+%% The title block is set by specific commands that are described in the asmejour-template.tex file.
%%
+%% The \section[]{} command's optional argument has been changed to better support pdf bookmarks, and
+%% \section*[]{} is similarly modified.
+%%
+%% The class defines abstract environment (with optional keywords) and a nomenclature environment.
+%% (LaTeX must be run twice to align the columns in the nomenclature list).
+%%
%=========================================================
%%
%% LICENSE:
%%
-%% Copyright (c) 2020 John H. Lienhard
+%% Copyright (c) 2021 John H. Lienhard
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
%% associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -58,31 +66,14 @@
\LoadClass[twoside,9pt,twocolumn]{extarticle}
-%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+\RequirePackage{xparse}% \entry{} command uses deprecated g argument; will drop this eventually
+\RequirePackage{etoolbox}% dropped xpatch 28/02/20
\RequirePackage{ifthen}
-\RequirePackage{iftex} % check whether pdftex or another engine is used
-
-\newboolean{DefaultSups}
-\setboolean{DefaultSups}{true}
-
-\newboolean{lineno}
-\setboolean{lineno}{false}
-
-\newboolean{balance}
-\setboolean{balance}{false}
-
-\newboolean{lists}
-\setboolean{lists}{true}
-
-\newboolean{setpdfa}
-\setboolean{setpdfa}{false}
-\newboolean{pdfaone}
-\setboolean{pdfaone}{false}
+\RequirePackage{iftex}% check whether pdftex or another engine is used
+%%%%%%%%%%%%%% Options for the class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\RequirePackage{kvoptions}
-%\RequirePackage{kvsetkeys} %<== this package is called by kvoptions
+\RequirePackage{kvoptions}% this package calls kvsetkeys
\SetupKeyvalOptions{
family=asmejour,
prefix=asmejour@,
@@ -91,67 +82,89 @@
setkeys=\kvsetkeys,
}
-%%% for mathalfa, so we may pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
+%% for mathalfa, so we may pass options in this format: mathalfa=cal=euler, mathalfa=frak=boondox
\define@key{asmejour}{mathalfa}{%
\PassOptionsToPackage{#1}{mathalfa}%
}
-%%% set key [nodefaultsups] to obtain newtx superiors font for footnotes.
+%% set key [nodefaultsups] to obtain newtx superiors font for footnotes.
+\newboolean{DefaultSups}\setboolean{DefaultSups}{true}
\define@key{asmejour}{nodefaultsups}[false]{%
\setboolean{DefaultSups}{#1}
}
-%%% set barcolor= to a value defined by xcolor package
+%% set barcolor= to a color name defined by xcolor package
\newcommand\@ColorName{black} % default
-\define@key{asmejour}{barcolor}[Red4]{%
+\define@key{asmejour}{barcolor}[Goldenrod3]{%
\renewcommand\@ColorName{#1}
}
-%%% set key [lineno] to obtain linenumbers.
-\define@key{asmejour}{lineno}[true]{%
- \setboolean{lineno}{#1}
-}
+%% the key main= passes the choice of main language to babel
-%%% set key [balance] to activate final column balancing.
-\define@key{asmejour}{balance}[true]{%
- \setboolean{balance}{#1}
+\newif\ifaj@mainset\aj@mainsetfalse
+\define@key{asmejour}{main}[english]{%
+ \PassOptionsToPackage{main=#1,#1}{babel}% added #1 resolves conflicts between certain .ldf files under "main=".
+ \aj@mainsettrue
+ \ifthenelse{\equal{#1}{english}}{%
+ \PassOptionsToPackage{pdflang=en}{hyperref}}{%
+ \ClassWarningNoLine{asmejour}{Selecting #1 as the primary language}%
+ }%
}
-%%% set key [lang,lang-second,lang-third] to pass languages to babel.
-
-%% In case language options are dropped during editing, include this. Subsequent choice of lang= will override it.
-\PassOptionsToPackage{english}{babel}
-
-\define@key{asmejour}{lang}[english]{%
- \PassOptionsToPackage{main=#1}{babel}%
+%% only main= is actually needed, but keeping these three legacy commands for backward compatibility
+\define@key{asmejour}{lang}[english]{% deprecated option
+ \PassOptionsToPackage{main=#1,#1}{babel}%
+ \PassOptionsToPackage{pdflang=en}{hyperref}
+ \aj@mainsettrue%
+ \ifthenelse{\equal{#1}{english}}{%
+ \relax}{%
+ \ClassWarningNoLine{asmeconf}{Selecting #1 as the primary language}%
+ }%
}
-\define@key{asmejour}{lang-second}[english]{%
+\define@key{asmejour}{lang-second}[english]{% deprecated option
\PassOptionsToPackage{#1}{babel}%
}
-\define@key{asmejour}{lang-third}[english]{%
+\define@key{asmejour}{lang-third}[english]{% deprecated option
\PassOptionsToPackage{#1}{babel}%
}
-%%% set key [nolists] to suppress lists of figures and tables
-\define@key{asmejour}{nolists}[false]{%
- \setboolean{lists}{#1}
-}
+%% if main language was not chosen explicitly, default to English
+\ifaj@mainset\relax\else
+ \PassOptionsToPackage{main=english}{babel}%
+ \PassOptionsToPackage{pdflang=en}{hyperref}
+ %\ClassWarningNoLine{asmejour}{Selecting English as the primary language, since main= not set}%
+\fi
\ProcessKeyvalOptions{asmejour}
+%% Turn off these keys now that we're done with them
+\def\@KeyFamily{asmejour}
+\NewDocumentCommand\aj@DisableOption{m}{%
+ \DisableKeyvalOption[%
+ action=ignore,%
+ class=asmejour%
+ ]{#1}{\@KeyFamily}%
+}
+\NewDocumentCommand\@DisableKeys{>{\SplitList{;}}m}{\ProcessList{#1}{\aj@DisableOption}}
+\@DisableKeys{nodefaultsups;mathalfa;barcolor;main;lang;lang-second;lang-third}
+
+
+%%%%%%% PDF/A Compliance Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\ifaj@setpdfa\aj@setpdfafalse
+\newif\ifaj@pdfaone\aj@pdfaonefalse
\ifpdftex %% PDF/A compliance has only been configured for pdflatex
%
%%% set key [pdfa] to activate pdf/a compliance (default is pdf/A-3u)
\define@key{pdfaopt}{pdf-a}[true]{%
- \setboolean{setpdfa}{#1}%
+ \aj@setpdfatrue
\PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}%
}
%%% to select part 1, 2 or 3
\define@key{pdfaopt}{pdfapart}[3]{%
\PassOptionsToPackage{pdfapart=#1}{hyperref}%
- \ifthenelse{\equal{#1}{1}}{\setboolean{pdfaone}{true}}{\relax}%
+ \ifthenelse{\equal{#1}{1}}{\aj@pdfaonetrue}{\relax}%
}
%% to select conformance b or u. NB: a is not possible with pdfLaTeX, and u is not possible with 1.
\define@key{pdfaopt}{pdfaconformance}[u]{%
@@ -159,13 +172,28 @@
}
\ProcessKeyvalOptions{pdfaopt}
\else
- \ClassWarningNoLine{asmejour}{PDF/A compliance option requires pdfLaTeX engine}%
+ \ifaj@pdfaone\ClassWarningNoLine{asmejour}{PDF/A compliance option requires pdfLaTeX engine}\fi%
\fi
+%% Done with these keys, so we can now disable them
+\def\@KeyFamily{pdfaopt}
+\@DisableKeys{pdf-a;pdfapart;pdfaconformance}
+
+%%%%%%%%%% Further class options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% Option to obtain line numbers [lineno]
+\newif\ifaj@lineno\aj@linenofalse
+\DeclareOption{lineno}{\aj@linenotrue}
+
+%%% Option to balance column height on last page [balance]
+\newif\ifaj@balance\aj@balancefalse
+\DeclareOption{balance}{\aj@balancetrue}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Option to omit lists of figures and tables
+\newif\ifaj@lists\aj@liststrue
+\DeclareOption{nolists}{\aj@listsfalse}
-%% option to omit ASME footer
+%% Option to omit ASME footer
\DeclareOption{nofoot}{%
\AtBeginDocument{\pagestyle{plain}%
\fancypagestyle{title}{%
@@ -174,8 +202,7 @@
}
}
}
-
-%% option to omit ASME copyright
+%% Option to omit ASME copyright
\DeclareOption{nocopyright}{%
\AtBeginDocument{\fancypagestyle{title}{%
\fancyhf{}
@@ -186,55 +213,78 @@
}
}
-%% Access many options from newtxmath. See newtxmath documentation for details.
-\DeclareOption{upint,smallerops,varvw,varg,slantedGreek,frenchmath,varbb,cmbraces}{\PassOptionsToPackage{}{newtxmath}}
+%% Option for copyright notice if all authors are government employees [govt]
+\newif\ifaj@govt\aj@govtfalse
+\DeclareOption{govt}{\aj@govttrue}
+
+%% Option for copyright notice if some (not all) authors are government employees [govtsome]
+\newif\ifaj@govtsome\aj@govtsomefalse
+\DeclareOption{govtsome}{\aj@govtsometrue}
+
+%% Option for government contractor copyright notice [contractor]
+\newif\ifaj@contractor\aj@contractorfalse
+\DeclareOption{contractor}{\aj@contractortrue}
-%% Option for slightly larger small capitals font [largesc] or to loosen word spacing [looser]
-\DeclareOption{largesc}{\PassOptionsToPackage{}{newtxtext}}
+%% Option for slightly larger small capitals font [largesc], corrected 29 Jan 2021
+\DeclareOption{largesc}{\PassOptionsToPackage{largesc=true}{newtxtext}}% largesc is a boolean key in newtxtext
%% ASME word separation is greater than newtxtext defaults so change these parameters.
-\PassOptionsToPackage{spacing=0.3em, stretch=0.18em, shrink=0.08em}{newtxtext}
+\PassOptionsToPackage{spacing=0.3em, stretch=0.18em, shrink=0.10em}{newtxtext}% increased shrink from 0.08, 30 Jan 21
%% Option not to use latex default superscripts, instead using the newtxtext superiors font [nodefaultsups]
\ifthenelse{\boolean{DefaultSups}}{\PassOptionsToPackage{defaultsups}{newtxtext}}{\relax}
+%% Disable newtxtext osf option, which is not appropriate for documents in this class
+\DeclareOption{osf}{%
+ \PassOptionsToPackage{lining}{newtxtext}%
+}
+
%% Option to hyphenate the typewriter font [hyphenate]
\DeclareOption{hyphenate}{%
\PassOptionsToPackage{hyphenate}{inconsolata}%
\ClassWarningNoLine{asmejour}{Allowing hyphenation of typewriter font}%
}
-
-%%% Option to activate pdf/a-3u compliance [pdfa] (requires hyperxmp package)
-%\ifthenelse{\boolean{setpdfa}}{%
-% \PassOptionsToPackage{pdfa,pdfapart=3,pdfaconformance=u}{hyperref}}{\relax}%
+%% Option to enforce monospacing of words the typewriter font [mono]
+\DeclareOption{mono}{%
+ \PassOptionsToPackage{mono}{inconsolata}%
+}
+%% Option for unslashed zero typewriter font [var0].
+\DeclareOption{var0}{%
+ \PassOptionsToPackage{var0}{inconsolata}% var0 is a key via xkeyval in inconsolata
+}
%% Suppress warnings about mathalfa keys as unused global options
\DeclareOption*{}
\ProcessOptions \relax
-%%%%%%%%%%%%% end options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%% Page size, bibliography, graphics, color, etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[paperheight=285.7mm, paperwidth=215.900mm, left=21.100mm, right=21.100mm, top=15.9mm, bottom = 24mm, footskip=8mm]{geometry}
\setlength\columnsep{4.5mm}
\setlength\parindent{3.5mm}
-% ASME's pdf pages are 11.25 in. tall, not 11.00 in.
+%% ASME's pdf pages are 11.25 in. tall, not 11.00 in.
\RequirePackage[sort&compress,numbers]{natbib}
-\AtBeginDocument{\def\NAT@space{\relax}} % ASME puts no space between numerical references (4/5/20)
-\setlength\bibsep{0pt plus 1pt minus 0pt} % ASME keeps this tight
+\AtBeginDocument{\def\NAT@space{\relax}}% ASME puts no space between numerical references (4/5/20)
+\setlength\bibsep{0pt plus 1pt minus 0pt}% ASME keeps this tight
\renewcommand*{\bibfont}{\footnotesize}
\RequirePackage{graphicx}
-\RequirePackage[hyperref,fixpdftex,dvipsnames,svgnames,x11names]{xcolor}
-\RequirePackage{xparse}
-\RequirePackage{metalogo,hologo} % Access various LaTeX logos if needed
+\ifpdf\def\MyColorOption{fixpdftex}\else\ifluatex\def\MyColorOption{luatex}\else\def\MyColorOption{}\fi\fi
+\RequirePackage[hyperref,\MyColorOption,dvipsnames,svgnames,x11names]{xcolor}
+
+% Nice solution from DPC to prevent aux file errors when switching from pdflatex to lualatex
+\ifx\directlua\undefined
+ \AtBeginDocument{\immediate\write\@auxout{\detokenize{%
+ \ifx\directlua\undefined\else\endinput\fi}}}
+\fi
-%%%%%%%%%%%%%%%% Table related %%%%%%%%
+%%%%%%%%%%%%% Table related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{array}
-\RequirePackage{dcolumn} %% alignment on decimal places
+\RequirePackage{dcolumn}% column alignment on decimal places
\newcolumntype{d}[1]{D{.}{.}{#1}}
%% make \hline in tables heavier than default 0.4pt
@@ -245,34 +295,35 @@
\renewcommand*{\midrule}{\specialrule{0.5pt}{2pt}{3pt}}
\renewcommand*{\bottomrule}{\specialrule{0.5pt}{1pt}{\doublerulesep}\specialrule{0.5pt}{0pt}{0pt}}
-%%%%%%%% FONT related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\RequirePackage[T1]{fontenc}
+%%%%%%%%%%%%% Font related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifpdftex
- \ifthenelse{\boolean{pdfaone}}{
- \pdfminorversion=4}{% for pdf/a-1 need version 4, not 7
- \pdfminorversion=7 % this selection is not really required.
- }
- \RequirePackage[utf8]{inputenc} % for backward compatibility with pre-2018 distributions
+ \ifaj@setpdfa
+ \pdfminorversion=4 % for pdf/a-1 need version 4, not 7
+ \else
+ \pdfminorversion=7 % this selection is not required
+ \fi
+ \RequirePackage[T1]{fontenc}
+ \RequirePackage[utf8]{inputenc}% for backward compatibility with pre-2018 LaTeX distributions
\else
- \relax
+ \relax % will lose some accented characters this way... better to use fontspec... if the systems fonts exist...
\fi
-\RequirePackage{mathtools} % extends amsmath
+\RequirePackage{mathtools}% loads and extends amsmath
\RequirePackage[]{babel}
+
\RequirePackage[]{newtxtext}
-\RequirePackage[varl,varqu]{inconsolata} % sans typewriter font; restored varl, varqu 2020/08/10
+\RequirePackage[varl,varqu]{inconsolata}% sans typewriter font; restored varl, varqu 2020/08/10
\RequirePackage[]{newtxmath}
%% override \textsu if using default superiors
\ifthenelse{\boolean{DefaultSups}}{\let\textsu\textsuperscript}{\relax}
-\RequirePackage[]{mathalfa} % load optional fonts for Calligraphy, Script, etc.
+\RequirePackage[]{mathalfa}% load optional fonts for Calligraphy, Script, etc.
-\RequirePackage{bm} % load after all math to give access to bold math
+\RequirePackage{bm}% load after all math for expanded access to bold math
-%% In addition to the word spacing options declared in line 163...
+%% In addition to the word spacing options declared in line 235...
%% Relative to size9.clo: leading reduced to 10 pt; displayskips made greater
\renewcommand\normalsize{%
\@setfontsize\normalsize\@ixpt{10\p@}% % <== was \@xipt
@@ -283,47 +334,74 @@
\let\@listi\@listI}
\normalsize
-% The article class calls \sloppy in two-column mode (\tolerance 9999, \emergencystretch 3em)
-% These adjustments affect line breaking; the values below are intended to produce
-% fewer lines with large spaces, without creating the problems of using \fussy in two-column mode.
+%% The article class calls \sloppy in two-column mode (\tolerance 9999, \emergencystretch 3em)
+%% These adjustments affect line breaking; the values below are intended to produce
+%% fewer lines with large spaces, without creating the problems of using \fussy in two-column mode.
\tolerance 2500
\emergencystretch 3em
+\setlength{\jot}{10pt}% <== default is 3pt
-\setlength{\jot}{10pt} %<== default is 3pt
+%% multline has an "extra line" above it, so subtract from \abovedisplayskip to remove imbalance
+\BeforeBeginEnvironment{multline}{\addtolength\abovedisplayskip{-7pt}}
+\AfterEndEnvironment{multline}{\addtolength\abovedisplayskip{+7pt}}
-\allowdisplaybreaks % ASME allows these breaks
+\allowdisplaybreaks % ASME allows these breaks
%% This provides sans serif italic and sans serif bold italic math.
-%% It's intended only for use in the figure and table captions.
+%% It's intended for use in the figure and table captions.
%% Fonts are from newtxsf package.
\DeclareMathVersion{sansbold}
-\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}
\SetSymbolFont{letters}{sansbold}{OML}{ntxsfmi}{b}{it}
\SetSymbolFont{lettersA}{sansbold}{U}{ntxsfmia}{b}{it}
\SetSymbolFont{symbols}{sansbold}{LMS}{ntxsy}{b}{n}
+\SetSymbolFont{largesymbols}{sansbold}{LMX}{ntxexx}{b}{n}% added 26 Jan 2021
+\SetSymbolFont{largesymbolsTXA}{sansbold}{U}{ntxexa}{b}{n}% added 26 Jan 2021
\SetSymbolFont{operators}{sansbold}{\encodingdefault}{\sfdefault}{\bfdefault}{n}
-
-%% Text Gyre Heros Condensed is qhvc (regular is qhv).
+\SetMathAlphabet{\mathsf}{sansbold}{\encodingdefault}{\sfdefault}{b}{n}% \mathsf is upright
+
+%% These lines are to provide math accents for the sans and sansbold math versions.
+%% The accents from ntxsfmi work normally with regular times fonts. Added 27 Jan 2021
+\DeclareSymbolFont{lettersAB}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{lettersAB}{normal}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{lettersAB}{bold}{U}{ntxsfmia}{b}{it}
+\SetSymbolFont{lettersAB}{sansbold}{U}{ntxsfmia}{b}{it}
+\DeclareFontSubstitution{U}{ntxsfmia}{m}{it}
+%
+\DeclareMathAccent{\grave}{\mathord}{lettersAB}{254}
+\DeclareMathAccent{\acute}{\mathord}{lettersAB}{255}
+\DeclareMathAccent{\check}{\mathord}{lettersAB}{186}
+\DeclareMathAccent{\breve}{\mathord}{lettersAB}{187}
+\DeclareMathAccent{\bar}{\mathord}{lettersAB}{221}
+\DeclareMathAccent{\mathring}{\mathord}{lettersAB}{222}
+\DeclareMathAccent{\hat}{\mathord}{lettersAB}{223}
+\DeclareMathAccent{\dot}{\mathord}{lettersAB}{224}
+\DeclareMathAccent{\tilde}{\mathord}{lettersAB}{219}
+
+%%% sans math version, potential value with PGFPlots, and provisionally called in subfigure captions.
+%%% this is experimental, still needs stress testing. 30/01/2021
+\DeclareMathVersion{sans}
+\SetSymbolFont{letters}{sans}{OML}{ntxsfmi}{m}{it}
+\SetSymbolFont{lettersA}{sans}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{lettersAB}{sans}{U}{ntxsfmia}{m}{it}
+\SetSymbolFont{symbols}{sans}{LMS}{ntxsy}{m}{n}
+\SetSymbolFont{largesymbols}{sans}{LMX}{ntxexx}{m}{n}
+\SetSymbolFont{largesymbolsTXA}{sans}{U}{ntxexa}{m}{n}
+\SetSymbolFont{operators}{sans}{\encodingdefault}{\sfdefault}{m}{n}
+\SetMathAlphabet{\mathsf}{sans}{\encodingdefault}{\sfdefault}{m}{n}
+
+%% TeX Gyre Heros Condensed is qhvc (regular is qhv).
\newcommand*{\CondSans}{\selectfont\fontfamily{qhvc}\selectfont}
\renewcommand\huge{\@setfontsize\huge{14}{14}} %... for author names only
\newcommand*{\CondSansBold}{\renewcommand\bfdefault{b}\selectfont\fontfamily{qhvc}\selectfont\bfseries}
\renewcommand\Huge{\@setfontsize\Huge{26.5}{26.5}} %... for title font only
+
+\RequirePackage{metalogo,hologo}% Access to various LaTeX logos (for use in the documentation)
-\addto{\captionsenglish}{%
- \renewcommand{\figurename}{Fig.}
- \renewcommand{\tablename}{Table}
-}
- \providecommand{\nomname}{Nomenclature}
- \providecommand{\keywordname}{Keywords}
- \providecommand{\appendicesname}{Appendices}
- \providecommand{\CAwords}{Corresponding Author}
-
-%%%%%%%%%%%%%%%%% EQUATION AND LINE NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% Equation and Line Numbering %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ASME puts equation tags in blue
-\RequirePackage{etoolbox} % dropped xpatch 28/02/20
\patchcmd{\tagform@}{(\ignorespaces#1\unskip\@@italiccorr)}{\color{blue}(\ignorespaces#1\unskip\@@italiccorr)}{}{}
%% Ensure that the current font is used for equation tags, not \normalfont as set by amsmath
@@ -331,47 +409,51 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{lineno}}{%
- \RequirePackage[switch,mathlines]{lineno}
- \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}
- \AtBeginDocument{\linenumbers}
- \ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing is disabled}
-%%% Allow line numbering in AMS math environments.
-%%% postdisplaypenalty adjusted to avoid extra line number at end, see discussion here: https://tex.stackexchange.com/a/461192/
-%%% multline has some problem that puts an extra line number above it.
-%%% Requires xparse and etoolbox
-\NewDocumentCommand{\losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}}
-
-\NewDocumentCommand{\FixAMSMath}{m}{%
- \AtBeginEnvironment{#1}{\losepostpenalty\linenomath}%
- \AtEndEnvironment{#1}{\endlinenomath}%
- \AtBeginEnvironment{#1*}{\losepostpenalty\linenomath}%
- \AtEndEnvironment{#1*}{\endlinenomath}%
-}
-
-\NewDocumentCommand{\FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\FixAMSMath}}
-\FixAll{align;alignat;gather;flalign;multline}
-
- }{%
- \ProvideDocumentEnvironment{linenomath}{}{}{}
- \ifthenelse{\boolean{balance}}{% balancing through flushend can produce weird errors
- \RequirePackage{flushend} % flushend package is NOT compatible with lineno
- \AtEndDocument{\flushcolsend}
- }{\relax}
-}
-\providecommand{\@LN@col}[1]{\relax}
+\ifaj@lineno
+ \RequirePackage[switch,mathlines]{lineno}%
+ \renewcommand{\linenumberfont}{\normalfont\footnotesize\color{red}}%
+ \AtBeginDocument{\linenumbers}%
+ \ifaj@balance
+ \ClassWarningNoLine{asmejour}{Package lineno loaded, so final column balancing will be disabled}%
+ \fi
+ %%% Allow line numbering in AMS math environments.
+ %%% postdisplaypenalty adjusted to avoid extra line number at end, see discussion here: https://tex.stackexchange.com/a/461192/
+ %%% multline has some problem that puts an extra line number above it.
+ %%% Requires xparse and etoolbox
+ \NewDocumentCommand{\aj@losepostpenalty}{}{\patchcmd{\linenomathWithnumbers}{\advance\postdisplaypenalty\linenopenalty}{}{}{}}%
+%
+ \NewDocumentCommand{\aj@FixAMSMath}{m}{%
+ \AtBeginEnvironment{#1}{\aj@losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1}{\endlinenomath}%
+ \AtBeginEnvironment{#1*}{\aj@losepostpenalty\linenomath}%
+ \AtEndEnvironment{#1*}{\endlinenomath}%
+ }%
+%
+ \NewDocumentCommand{\aj@FixAll}{>{\SplitList{;}}m}{\ProcessList{#1}{\aj@FixAMSMath}}%
+ \aj@FixAll{align;alignat;gather;flalign;multline}%
+%
+\else
+ \ProvideDocumentEnvironment{linenomath}{}{}{}%
+ \ifaj@balance % balancing through flushend can produce weird errors
+ \RequirePackage{flushend}% flushend package is NOT compatible with lineno
+ \AtEndDocument{\flushcolsend}%
+ \ClassWarningNoLine{asmejour}{Calling flushend package to balance column height on last page}%
+ \fi%
+\fi
+
+\providecommand{\@LN@col}[1]{\relax}% avoid errors in the aux file when lineno is dropped
\providecommand{\@LN}[2]{\relax}
-%% ASME page proofs seem to align the number at top of the line, rather than bottom as done here.
+%% ASME page proofs seem to align the number at top of the line, rather than bottom as done here.
-%%%%%%%%%%%%%%%%% FOOTER SET UP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% Footer Set Up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%% footer text names %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\JourName}[1]{\gdef\@JourName{#1}}
\providecommand\@JourName{\hbox{ }}
-\DeclareDocumentCommand{\PaperYear}{G{\the\year}}{%
+\NewDocumentCommand{\PaperYear}{m}{%
\gdef\@PaperYear{#1}%
}
\providecommand\@PaperYear{\the\year}
@@ -384,20 +466,20 @@
\gdef\@PreprintStringL{#1}%
\gdef\@PreprintStringR{#1}%
}{%
- \ifx R#2{\gdef\@PreprintStringR{#1}}\else\relax\fi
- \ifx L#2{\gdef\@PreprintStringL{#1}}\else\relax\fi
+ \ifx R#2{\gdef\@PreprintStringR{#1}}\fi
+ \ifx L#2{\gdef\@PreprintStringL{#1}}\fi
}
}
\newcommand{\PaperNumber}[1]{\gdef\@PaperNumber{#1-}}
\providecommand\@PaperNumber{\relax}
-%%%%%%
+%%%%%% Fancyhdr %%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\pagestyle{fancy}
-\fancyhf{} % clear all header and footer fields
+\fancyhf{}% clear all header and footer fields
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[RE]{\large\bfseries\sffamily Transactions of the ASME}
@@ -405,18 +487,16 @@
\fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage}
\fancyfoot[LE]{\large\sffamily {\bfseries \@PaperNumber\thepage\space\space/}\space\space\@PreprintStringL\ }
-
\fancypagestyle{title}{%
-\fancyhf{} % clear all header and footer fields
-\renewcommand{\headrulewidth}{0pt}
-\renewcommand{\footrulewidth}{0pt}
-\fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage}
-\fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName}
-\fancyfoot[CO]{\large\bfseries\sffamily Copyright \textcopyright\ \@PaperYear\ by ASME}
+ \fancyhf{}% clear all header and footer fields
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0pt}
+ \fancyfoot[RO]{\large\sffamily \@PreprintStringR\space\space\bfseries/\space\space\@PaperNumber\thepage}
+ \fancyfoot[LO]{\large\bfseries\sffamily Journal of \@JourName}
+ \fancyfoot[CO]{\large\bfseries\sffamily Copyright \textcopyright\ \@PaperYear\ by ASME}
}
-
-%%%%%% Footnotes %%%%%%%
+%%%%%% Footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fnpos}
\makeFNbottom
@@ -432,15 +512,15 @@
%% reduce indentation of footnotes
\renewcommand\@makefntext[1]{%
- \noindent\makebox[4mm][r]{\@makefnmark}\hyphenpenalty=300\exhyphenpenalty=300 #1} %<== suppress hyphenation
+ \noindent\makebox[4mm][r]{\@makefnmark}\hyphenpenalty=300\exhyphenpenalty=300 #1}% <== suppress hyphenation
%% Produces an unmarked footnote about the revision date.
%% This command is invoked by \date as part of \MakeTitlePage below.
%% Text can be anything given as the argument to \date{..}.
-\NewDocumentCommand{\revfootnote}{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{#1}\end{NoHyper}}
+\NewDocumentCommand{\revfootnote}{m}{\begin{NoHyper}\gdef\@thefnmark{}\@footnotetext{\hspace{-3pt}#1}\end{NoHyper}}
-% Previous is modified to eliminate missing anchor warning from hyperref that following would cause
-%\def\revfootnote{\gdef\@thefnmark{}\@footnotetext}
+%% The above has been offset per style and modified to eliminate missing anchor warning from hyperref that following causes
+%%\def\revfootnote{\gdef\@thefnmark{}\@footnotetext}
%% include a comma for sequential footnotes
@@ -455,29 +535,31 @@
\fi%
}
+%%%%%%%%% Caption Related %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%% CAPTION RELATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\addto{\captionsenglish}{%
+ \renewcommand{\figurename}{Fig.}
+ \renewcommand{\tablename}{Table}
+}
\RequirePackage[labelfont={sf,bf},hypcap=false]{caption}
\RequirePackage[hypcap=false,list=true]{subcaption}
\DeclareCaptionTextFormat{boldmath}{\mathversion{sansbold}#1}
+\DeclareCaptionTextFormat{sansmath}{\mathversion{sans}#1}% strictly speaking, this is unnecessary.
\captionsetup[figure]{labelfont={sf,bf},textfont={sf,bf},textformat=boldmath,labelsep=quad}
\captionsetup[table]{labelfont={sf,bf},textfont={sf,bf},textformat=boldmath,labelsep=quad,skip=0.5\baselineskip}
-%% 4 April 2020. ASME only labels subfigures with a sans serif, italic (a), (b),... no caption text, no bold face.
-%% Could set labelfont={sf},textfont={sf}, and normal math version needed; but would need sans math...
-
-\captionsetup[subfigure]{labelformat=simple} % default: =parens
+%% 30 January 2021. ASME only labels subfigures with a sans serif, italic (a), (b),... no caption text, no bold face.
+\captionsetup[subfigure]{labelfont={sf},textfont={sf},textformat=sansmath,labelformat=simple}% default: =parens
\renewcommand\thesubfigure{(\textit{\alph{subfigure}})}
-\captionsetup[subtable]{labelformat=simple}
+\captionsetup[subtable]{labelfont={sf},textfont={sf},textformat=sansmath,labelformat=simple}
\renewcommand\thesubtable{(\textit{\alph{subtable}})}
-%%%%%%%%%%%% SECTION HEADINGS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% wish to accommodate hyperref
+%%%%%%%%%%%% Section Headings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[raggedright,indentafter]{titlesec}
@@ -494,8 +576,11 @@
\titleformat{\paragraph}[runin]{\itshape}{\thesubsubsection}{0.5em}{}[.]
\titlespacing{\paragraph}{\parindent}{14pt plus 3pt minus 2pt}{0.5em}
-%% Special handling of the appendices
-%% Assumes that appendices are the last technical content in paper
+%% Special handling of the appendices
+%% Assumes that appendices are the last technical content in paper
+
+\providecommand{\appendicesname}{Appendices}
+
\RenewDocumentCommand{\appendix}{}{%
\pdfbookmark[1]{\appendicesname}{appendices}
\setcounter{section}{0}
@@ -505,7 +590,7 @@
\titleformat{\section}[block]{\mathversion{bold}\bfseries\large\raggedright}{\appendixname\ \thesection:}{0.5em}{}[\setcounter{equation}{0}]
}
-% natbib's \bibsection controls section heading for References.
+%% natbib's \bibsection controls section heading for References.
%%%%%%%%%%%%%%%%% List environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -518,7 +603,7 @@
%%%%%%%%%%%%%%%%% Hyperref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{setpdfa}}{%
+\ifaj@setpdfa
%
%%% to assist with unicode glyph mapping, following M. Sharpe's recommendation in newtx documentation.
\pdfgentounicode=1 %% enable CMaps
@@ -538,8 +623,8 @@
/Info (sRGB)
>>
]
-}%
-}{\relax}
+}
+\fi
\RequirePackage{hyperxmp} %% to fix transfer of metadata to Acrobat pdf
@@ -564,11 +649,12 @@
pdfdisplaydoctitle=true%
]{hyperref}
-\urlstyle{same} % don't switch to typewriter font
-
+\urlstyle{same} % don't switch to typewriter font
\RequirePackage{doi} % supports nasty characters in some doi's
\renewcommand{\doitext}{doi:~} % change the default, {doi:}, to this for ASME specification
+\RequirePackage{bookmark} % improves handling of pdf bookmarks
+%%%%%% Adjustments to accommodate hyperref bookmarks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Since \bm is useful in headings, this fix will reduce frequency with which
%% alternate pdfstrings must be given in section command as \section[pdfstring]{texstring}
@@ -618,13 +704,18 @@
}
-%%%%%%%%%%%%% define Nomenclature environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%% Define some section and other names for special environments %%%%%%%
+
+\providecommand{\nomname}{Nomenclature}
+\providecommand{\keywordname}{Keywords}
+\providecommand{\CAwords}{Corresponding Author.}
-%% Nomenclature environment in ASME Journal Style
+%%%%%%%%%%%%% Nomenclature Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Nomenclature environment in ASME Journal Style.
%% Run twice to get proper label width.
-%% Set first optional argument (a dimension) to override automatic label width (e.g., if one label is excessive)
+%% Set first optional argument (a dimension) to override automatic label width (e.g., if one label too wide)
%% Second argument can be used to rename the section, e.g., to List of Symbols.
-%%
\newlength\widest
\newlength\@widest
@@ -632,17 +723,23 @@
\newlength\savitemsep
%% If the second argument of \entry is omitted, a bold section heading is produced, e.g. \entry{Greek Letters}
-\DeclareDocumentCommand{\entry}{m g}{%
- \IfNoValueTF{#2}{%
+\NewDocumentCommand{\entry}{m g}{%
+ \IfNoValueTF{#2}{%
+ \itemsep12\p@ plus 4\p@ minus 4\p@% \bigskip
+ \goodbreak\item[\bfseries#1\hfill]\itemsep3\p@ plus 1\p@ minus 1\p@\@itempenalty=1000%
+ }{%
+ \item[\hfill#1${} = {}$]#2%
+ \@itempenalty=-\@lowpenalty%
+ \setlength\itemsep\savitemsep%
+ \settowidth\@widest{#1${} = {}$}%
+ \ifdim\@widest>\widest \global\setlength\widest\@widest\fi%
+ }
+}
+
+%% A separate command command for nomenclature subheadings (xparse "g" argument used in \entry is deprecated)
+\NewDocumentCommand\EntryHeading{m}{%
\itemsep12\p@ plus 4\p@ minus 4\p@% \bigskip
\goodbreak\item[\bfseries#1\hfill]\itemsep3\p@ plus 1\p@ minus 1\p@\@itempenalty=1000%
- }{%
- \item[\hfill#1${} = {}$]#2%
- \@itempenalty=-\@lowpenalty%
- \setlength\itemsep\savitemsep%
- \settowidth\@widest{#1${} = {}$}%
- \ifdim\@widest>\widest \global\setlength\widest\@widest\fi%
- }
}
\RequirePackage{totcount}
@@ -652,7 +749,7 @@
\AtBeginDocument{\setlength{\nomenwidth}{\totvalue{savedlength}sp}}
% value is the length in scaled points (sp)
-\DeclareDocumentEnvironment{nomenclature}{O{\nomenwidth} O{\nomname}}{%
+\NewDocumentEnvironment{nomenclature}{O{\nomenwidth} O{\nomname}}{%
\setlength{\widest}{0em}
\section*{#2}
\raggedright
@@ -672,9 +769,10 @@
\end{list}%
}
-%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%% List of figures and list of tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ifthenelse{\boolean{lists}}{% ASME requires these lists for production.
+%% ASME requires these lists for production.
+\ifaj@lists
\AtEndDocument{%
\clearpage
\twocolumn[%
@@ -683,26 +781,13 @@
\listoftables
\end{@twocolumnfalse}
]%
- }
- }{%
+ }%
+\else
\ClassWarningNoLine{asmejour}{Omitting lists of figures and tables}%
-}
+\fi
%%%%%%%%%%%%%%%% Author/Title/Abstract block %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\papertitle}[1]{\gdef\@papertitle{#1}}
-\providecommand\@papertitle{\hbox{ }}
-
-\newcommand{\PaperTitle}{%
-\par\vspace*{6mm}%
-\parbox{\linewidth}{\centering{\bfseries\Large%
-\MakeTextUppercase{\@papertitle}%
-\thispagestyle{title}\par} %% <=== \par gets the font leading to stick.
- }%
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%
-
\RequirePackage{xcoffins}
\NewCoffin{\authorblock}
@@ -713,7 +798,7 @@
\NewCoffin{\firstrowauthorblock}
\SetHorizontalCoffin\firstrowauthorblock{}
-\newlength{\coffinsep} %%% space between coffins
+\newlength{\coffinsep}%%% space between coffins
\setlength{\coffinsep}{4.5mm}
\newcounter{authorno}
@@ -724,7 +809,7 @@
\newlength{\rulecofheight}
\newlength{\Titleheight}
-\DeclareDocumentCommand\SetAuthorBlock{m m}{%
+\NewDocumentCommand\SetAuthorBlock{m m}{%
\addtocounter{authorno}{1}%
\SetVerticalCoffin{\authorblock}{48.2mm}{%
\raggedleft\sffamily%
@@ -733,100 +818,95 @@
}
\ifnum\value{authorno}=1
\JoinCoffins\firstrowauthorblock\authorblock
- \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
+ \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
\else
\JoinCoffins\firstrowauthorblock[hc,b]\authorblock[hc,t](0pt,-\coffinsep)
- \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
+ \setlength{\rulecofheight}{\CoffinTotalHeight\firstrowauthorblock}
\fi
}
-\DeclareDocumentCommand\SetTitle{m}{%
+\NewDocumentCommand\SetTitle{m}{%
\SetVerticalCoffin{\Title}{114mm}{%
- \vspace*{0.5mm}% <== ASME doesn't align bar and text
- \noindent\Huge\CondSansBold\raggedright%
- #1%
- \par
+ \vspace*{0.5mm}% <== ASME doesn't align bar and text
+ \noindent\Huge\CondSansBold\raggedright%
+ #1%
+ \par
}
}
\providecommand{\@keywords}{\relax}
-\DeclareDocumentCommand{\keywords}{g}{%
- \IfNoValueTF{#1}{%
- \relax}{%
- \long\def\@keywords{\par\vskip\baselineskip\noindent{\keywordname:} #1}%
- }
+\NewDocumentCommand{\keywords}{m}{% changed to remove g option, 30/01/21
+ \long\def\@keywords{\par\vskip\baselineskip\noindent{\keywordname:} #1}%
}
-\DeclareDocumentCommand\SetAbstract{m}{%
+\NewDocumentCommand\@SetAbstract{+m}{% add + to enable blank lines, etc. 31/01/2021
\SetVerticalCoffin{\Abstract}{114mm}{%
- \noindent\itshape%
- #1
- \@keywords\par%
- \vspace*{4mm}% <== at bottom of abstract to extend rule
-}
+ \noindent\itshape%
+ #1
+ \@keywords\par%
+ \vspace*{4mm}% <== at bottom of abstract to extend rule
+ }
}
-\DeclareDocumentCommand{\ConstructAuthorBlock}{}{%
-\JoinCoffins\Title[l,b]\Abstract[l,t](0pt,-1.5\coffinsep)
-\setlength{\Titleheight}{\CoffinTotalHeight\Title}
-\ifdim\Titleheight>\rulecofheight
- \setlength{\rulecofheight}{\Titleheight}
-\else
- \addtolength{\rulecofheight}{7.0mm}
-\fi
-\SetHorizontalCoffin \ruleblock {\color{\@ColorName}\rule{2.1mm}{\rulecofheight}}
-\JoinCoffins\firstrowauthorblock[vc,r]\ruleblock[vc,l](\coffinsep,0pt)
-\JoinCoffins\firstrowauthorblock[vc,r]\Title[vc,l](\coffinsep,0pt)
-\centerline{\TypesetCoffin\firstrowauthorblock} %% in this instance, \centerline is better than \centering
+\NewDocumentCommand{\@ConstructAuthorBlock}{}{%
+ \JoinCoffins\Title[l,b]\Abstract[l,t](0pt,-1.5\coffinsep)
+ \setlength{\Titleheight}{\CoffinTotalHeight\Title}
+ \ifdim\Titleheight>\rulecofheight
+ \setlength{\rulecofheight}{\Titleheight}
+ \else
+ \addtolength{\rulecofheight}{7.0mm}
+ \fi
+ \SetHorizontalCoffin \ruleblock {\color{\@ColorName}\rule{2.1mm}{\rulecofheight}}
+ \JoinCoffins\firstrowauthorblock[vc,r]\ruleblock[vc,l](\coffinsep,0pt)
+ \JoinCoffins\firstrowauthorblock[vc,r]\Title[vc,l](\coffinsep,0pt)
+ \centerline{\TypesetCoffin\firstrowauthorblock} %% in this instance, \centerline is better than \centering
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Corresponding author gets footnote #1 and subsequent notes are 2, 3, ....
-%%% ASME apparently does not recognize joint first authors...so I have not coded that functionality
-
-%%%% Flag for corresponding author (just one expected, although this code supports more than one)
-%%%% for more than one CA, if including email addresses in the footnote, place them in final the command
-\newif\ifCA\CAfalse
-\newcommand{\CAemail}[1]{\gdef\@CAemail{#1}}
-
-
-% Allow for NO email address to be given by omitting second argument
-% ASME prefers email to be in address block, not CA footnote, although code can support the latter.
-\DeclareDocumentCommand{\CorrespondingAuthor}{g}{%
-\global\CAtrue%
- \IfNoValueTF{#1}{%
- \gdef\@CAsep{\relax}%
- \gdef\@CAemail{\relax}%
- }{%
- \gdef\@CAsep{:\space}%
- \gdef\@CAemail{#1}%
- }%
-\def\@makefnmark{\hbox{\@textsuperscript{\sffamily\@thefnmark}}}%
-\footnotemark%
-\addtocounter{footnote}{-1} % in case of more than one CA
-}
+%% Corresponding author gets footnote #1 and subsequent notes are 2, 3, ....
+%% ASME apparently does not recognize joint first authors...so I have not coded that functionality
+
+%% Flag for corresponding author (only one expected, although this code supports more than one)
+\newif\ifaj@CA\aj@CAfalse
+\newcommand{\CAemail}[1]{\gdef\@CAemail{#1}}% legacy code, drop eventually
+
+%% ASME prefers email to be in address block, not CA footnote; removed option 30/01/21
+\NewDocumentCommand{\CorrespondingAuthor}{}{%
+ \global\aj@CAtrue%
+ \gdef\@CAsep{\relax}% legacy code, drop eventually
+ \gdef\@CAemail{\relax}% legacy code, drop eventually
+ \def\@makefnmark{\hbox{\@textsuperscript{\sffamily\@thefnmark}}}%
+ \footnotemark%
+ \addtocounter{footnote}{-1}% in case of more than one CA
+}
%%%%%%%%%%
-\newlength{\@AbstractSep} %% <== separation of author/abstract coffin from main two-column text.
+\newlength{\@AbstractSep}%% <== separation of author/abstract coffin from main two-column text.
\setlength{\@AbstractSep}{12.5mm}
\NewDocumentCommand\AbstractSep{m}{\setlength{\@AbstractSep}{#1}}
-\DeclareDocumentCommand{\MakeTitlePage}{}{%
-\thispagestyle{title}%
-\twocolumn[
- \begin{@twocolumnfalse}
-\ConstructAuthorBlock
- \vspace*{\@AbstractSep}
- \end{@twocolumnfalse}
-]
-\ifCA
- \addtocounter{footnote}{1}
- \footnotetext{\CAwords\@CAsep \@CAemail}
-\fi
-\ifDate\revfootnote{\@Date} \else\relax \fi
+\NewDocumentCommand{\MakeTitlePage}{}{%
+ \thispagestyle{title}%
+ \twocolumn[
+ \begin{@twocolumnfalse}
+ \@ConstructAuthorBlock
+ \vspace*{\@AbstractSep}
+ \end{@twocolumnfalse}
+ ]
+ \ifaj@CA
+ \addtocounter{footnote}{1}
+ \footnotetext{\CAwords\@CAsep \@CAemail}% includes legacy code, remove \@CA commands eventually
+ \fi
+ \ifaj@Date\revfootnote{\@Date}\else\relax\fi
+ \ifaj@contractor\revfootnote{The United States Government retains, and by accepting the article for publication, the publisher acknowledges that the United States Government retains, a non-exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this work, or allow others to do so, for United States Government purposes.}%
+ \fi
+ \ifaj@govt\revfootnote{This material is declared a work of the U.S. Government and is not subject to copyright protection in the United States. Approved for public release; distribution is unlimited.}%
+ \fi
+ \ifaj@govtsome\revfootnote{This work was authored in part by a U.\ S.\ Government employee in the scope of his/her employment. ASME disclaims all interest in the U.\ S.\ Government's contribution.}%
+ \fi
}
%%%%%%%%%%
@@ -836,23 +916,23 @@
\RenewDocumentCommand{\maketitle}{}{\MakeTitlePage}
\RenewDocumentCommand{\title}{}{\SetTitle}
-\RenewDocumentEnvironment{abstract}{+b}{\gdef\tmp{\SetAbstract{#1}}\aftergroup\tmp}{}
+\RenewDocumentEnvironment{abstract}{+b}{\gdef\tmp{\@SetAbstract{#1}}\aftergroup\tmp}{\ignorespaces}
%% Thanks to DPC for the suggestion of \gdef\tmp{...
%% Put date as an unnumbered footnote at bottom of first column
-\newif\ifDate\Datetrue % If true, print a date.
+\newif\ifaj@Date\aj@Datetrue% If true, print a date.
\ExplSyntaxOn
\RenewDocumentCommand{\date}{m}
{%
- \tl_if_empty:nTF {#1}{\global\Datefalse}{\gdef\@Date{#1}}%
+ \tl_if_empty:nTF {#1}{\global\aj@Datefalse}{\gdef\@Date{#1}}%
}
\providecommand\@Date{\today}
\ExplSyntaxOff
-\RenewDocumentCommand{\thanks}{m}{\relax} %% disabling this standard command, as it is inconsistent with the format
+\RenewDocumentCommand{\thanks}{m}{\relax}%% disabling this standard command, as it is inconsistent with this format
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
diff --git a/macros/latex/contrib/cellprops/LICENSE b/macros/latex/contrib/cellprops/LICENSE
index 19e0cc42ed..cb305a7a0b 100644
--- a/macros/latex/contrib/cellprops/LICENSE
+++ b/macros/latex/contrib/cellprops/LICENSE
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
cellprops
- Copyright (C) 2016-2020 Julien "_FrnchFrgg_" RIVAUD
+ Copyright (C) 2016-2021 Julien "_FrnchFrgg_" RIVAUD
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
- cellprops Copyright (C) 2016-2020 Julien "_FrnchFrgg_" RIVAUD
+ cellprops Copyright (C) 2016-2021 Julien "_FrnchFrgg_" RIVAUD
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
diff --git a/macros/latex/contrib/cellprops/README.md b/macros/latex/contrib/cellprops/README.md
index 5378701f8e..89ae3b3d1f 100644
--- a/macros/latex/contrib/cellprops/README.md
+++ b/macros/latex/contrib/cellprops/README.md
@@ -13,7 +13,7 @@ Look at the PDF documentation to see examples and detailed usage.
-Copyright (C) 2016-2020 Julien "_FrnchFrgg_" RIVAUD
+Copyright (C) 2016-2021 Julien "_FrnchFrgg_" RIVAUD
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/macros/latex/contrib/cellprops/cellprops.dtx b/macros/latex/contrib/cellprops/cellprops.dtx
index 86c1d8ef2c..264361e91e 100644
--- a/macros/latex/contrib/cellprops/cellprops.dtx
+++ b/macros/latex/contrib/cellprops/cellprops.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% vim: tw=80 spl=en
%
-%% File: cellprops.dtx (C) Copyright 2016-2020 RIVAUD Julien
+%% File: cellprops.dtx (C) Copyright 2016-2021 RIVAUD Julien
%%
%% It may be distributed and/or modified under the conditions of the
%% General Public License (GPL), either version 3 of this
@@ -14,8 +14,8 @@
\RequirePackage{expl3}[2018/06/19]
\def\ExplFileName{cellprops}
\def\ExplFileDescription{CSS-like cell and table properties}
-\def\ExplFileDate{2020/06/07}
-\def\ExplFileVersion{1.7a}
+\def\ExplFileDate{2021/01/30}
+\def\ExplFileVersion{2.0}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -66,13 +66,13 @@
%
% I recommend to add globally:
%\begin{verbatim}
-%\cellprops{ td { padding: 1ex; min-height: 0pt; min-depth: 0pt; } }
+% \cellprops{ td { padding: 1ex; min-height: 0pt; min-depth: 0pt; } }
%\end{verbatim}
% so that you get better-looking tables by default.
%
% \subsection{Examples}
%
-% To produce:
+% To produce the (arguably ugly):
% \[
% \cellprops{
% td {
@@ -102,6 +102,15 @@
% math-mode: text;
% text-align: left;
% }
+% tr:nth-child(6) td:nth-child(1) {
+% vertical-align: top; % see remark in usage guide
+% }
+% tr:nth-child(6) td:nth-child(2) {
+% vertical-align: middle;
+% }
+% tr:nth-child(6) td:nth-child(3) {
+% vertical-align: bottom; % see remark in usage guide
+% }
% }
% \begin{array}{nnnp{5em}}
% This is text & A_2 & A_3 & A_4 \\
@@ -109,6 +118,16 @@
% C1 & C_2 & X & Y \\
% D1 & D_2 & DX & v \\
% & F & \int_a^b f(t) dt & v \\
+% \fbox{Top} & \fbox{Middle} & \fbox{Bottom} & \fbox{Baseline}%
+% \textcolor{red}{%
+% \kern -9cm\relax
+% \vrule height 0.1pt depth 0.1pt width 10cm
+% \kern -1cm\relax
+% }\textcolor{blue}{%
+% \kern -9cm\relax
+% \vrule height 0.52ex depth -0.48ex width 10cm
+% \kern -1cm\relax
+% } \\
% \end{array}
% \]
% you can use:
@@ -142,13 +161,32 @@
% math-mode: text;
% text-align: left;
% }
+% tr:nth-child(6) td:nth-child(1) {
+% vertical-align: top; % see remark in usage guide
+% }
+% tr:nth-child(6) td:nth-child(2) {
+% vertical-align: middle;
+% }
+% tr:nth-child(6) td:nth-child(3) {
+% vertical-align: bottom; % see remark in usage guide
+% }
% }
-% \begin{array}{nnnn}
+% \begin{array}{nnnp{5em}}
% This is text & A_2 & A_3 & A_4 \\
% B1 & This is maths & B_3 & \\
% C1 & C_2 & X & Y \\
% D1 & D_2 & DX & v \\
-% E & F & \int_a^b f(t) dt & v \\
+% & F & \int_a^b f(t) dt & v \\
+% \fbox{Top} & \fbox{Middle} & \fbox{Bottom} & \fbox{Baseline}%
+% \textcolor{red}{%
+% \kern -9cm\relax
+% \vrule height 0.1pt depth 0.1pt width 10cm
+% \kern -1cm\relax
+% }\textcolor{blue}{%
+% \kern -9cm\relax
+% \vrule height 0.52ex depth -0.48ex width 10cm
+% \kern -1cm\relax
+% } \\
% \end{array}
% \]
%\end{verbatim}
@@ -200,7 +238,7 @@
%
% This table has been produced by:
%\begin{verbatim}
-%\cellprops{
+% \cellprops{
% td { border: thin solid black; }
% tr:nth-child(-n+3) { background-color: black!10; }
% tr:nth-child(n+8) { background-color: blue!10; }
@@ -210,12 +248,12 @@
% tr:nth-child(4n+3) td:nth-child(4) {
% border: thick solid red;
% }
-%}
-%\begin{longtable}{nnnn}
+% }
+% \begin{longtable}{nnnn}
% aaaaa & baaaa & caaaaa & dbbbb \\
% ...
% aaaaa & baaaa & caaaaa & dbbbb \\
-%\end{longtable}
+% \end{longtable}
%\end{verbatim}
%
% \subsection{Usage guide}
@@ -229,15 +267,16 @@
% ]
% \item[usage] "'\cellprops{'" [ \<selectors> "'{'" \<properties> "'}'" ]* "'}'"
% \item[selectors] \<selector> ["," \<selectors> ]
-% \item[selector] [\<environment> "' '"] \<element1>
-% \item[element1]
-% "'table'" \OR
-% "'tr'"[\<pseudo-class>] ["' '" \<element2>] \OR
-% \<element2>
-% \item[element2] "'td'"[\<pseudo-class>] ["' '" \<parbox>] \OR \<parbox>
-% \item[parbox] "'p'"
-% \item[pseudo-class] "':nth-child('"\<nth>"')"
-% \item[nth] \<number> \OR "'odd'" \OR "'even'" \OR \<number>"'n+'"\<number>
+% \item[selector] [\<table> "' '"] [\<tr> "' '"] [\<td> "' '"] [\<parbox>]
+% \item[table] "'table'" ["'.'" \<class>]* ["':where(.'"\<class>"')'"]*
+% \OR "':where('"\<table>"')'"
+% \item[tr] "'tr'" [\<pseudoclass>]* \OR "':where('"\<tr>"')'"
+% \item[td] "'td'" [\<pseudoclass>]* \OR "':where('"\<td>"')'"
+% \item[parbox] "'p'" \OR "':where('"\<p>"')'"
+% \item[pseudoclass] "':where('"[\<pseudoclass>]*"')'" \OR "':nth-child('"\<nth>"')"
+% \item[nth]
+% "'odd'" \OR "'even'" \OR \<number> \OR
+% \<number>"'n+'"\<number> \OR \<number>"'n-'"\<number>
% \item[properties] [ \<property> "';'" ]*
% \item[property]
% "'padding: '" ( \<dimension> ) \{1,4\} \OR \\
@@ -249,6 +288,7 @@
% "'min-depth: '" \<dimension> \OR \\
% "'min-width: '" \<dimension> \OR \\
% "'text-align: '" ( "'left'" \OR "'right'" \OR "'center'" ) \OR \\
+% "'vertical-align: '" ( "'top'" \OR "'middle'" \OR "'baseline'" \OR "'bottom'" ) \OR \\
% "'math-mode: '" ( "'text'" \OR "'math'" \OR "'auto'" ) \OR \\
% "'color: '" \<color> \OR \\
% "'background-color: '" ( \<color> \OR "'transparent'" ) \OR \\
@@ -323,6 +363,29 @@
% ":nth-child("$B$")" is supported, with arbitrary $A$~and~$B$, including
% nothing for~$A$ (standing for~$A = 1$) or just a minus sign (standing
% for~$A = -1$).
+% \item "vertical-align" values "baseline" and "middle" are following the CSS
+% specification. On the other hand, "top" (resp.~"bottom") align the top
+% (resp.~bottom) of the cell with the row baseline which gives a
+% different result than CSS if there is mixed alignment in the row.
+% The common case where all cells have "vertical-align: top" or
+% "vertical-align: bottom" behaves as expected from the CSS
+% specification.
+%
+% As fas as I can tell, obeying CSS in all cases would require
+% typesetting each row in two passes.
+% \item Class names are matched against the classes defined with
+% \cs{cellpropsclass}, which takes a space-separated list of classes. By
+% default, \cs{cellpropsclass} also add as a class the name of the
+% environment that created the tabular-like structure (that is, "tabular"
+% or "array" or "matrix" or similar). If you do not want that behavior,
+% you can use \cs{cellpropsclass*}. The class list is
+% redefined locally, and \pkg{cellprops} initially calls
+% "\cellpropsclass{}".
+% \item The ":where()" pseudo-class is the same as in CSS selectors level 4,
+% except that it does not accept spaces nor commas. Its only effect is to
+% neutering the specificity of the selectors within while still keeping
+% their matching conditions. This is mainly useful to write default yet
+% specific rules whose specificity would otherwise dwarf simple rules.
% \end{itemize}
%
% \subsection{Compatibility}
@@ -465,20 +528,16 @@
\seq_map_inline:Nn \l_tmpa_seq {
\tl_if_empty:nF {##1} {
\exp_args:NNV \seq_set_split:Nnn \l_tmpb_seq \c_colon_str {##1}
- \int_compare:nNnTF {\seq_count:N \l_tmpb_seq} = { 2 } {
+ \int_compare:nNnT {\seq_count:N \l_tmpb_seq} = { 2 } {
\seq_get_left:NN \l_tmpb_seq \l_tmpa_tl
\exp_args:NNV \str_set:Nn \l_tmpa_str \l_tmpa_tl
\seq_get_right:NN \l_tmpb_seq \l_tmpa_tl
- \cs_if_exist:cTF { _@@_property_type_\l_tmpa_str :nn } {
+ \cs_if_exist:cT { _@@_property_type_\l_tmpa_str :nn } {
\tl_put_right:Nx #1 {
\exp_args:NVV \@@_delegate_setter:nn
\l_tmpa_str \l_tmpa_tl
}
- }{
- % TODO: ERROR-no property with that name
}
- }{
- % TODO: ERROR-too many : or none at all
}
}
}
@@ -615,7 +674,7 @@
}
}{
\quark_if_no_value:nTF {#3} {
- %% TODO: Error, one no-style value, ambiguous
+ %% One no-style value, ambiguous. Ignore the property
}{
\@@_border_setter_isstyle:nTF {#3} {
\@@_delegate_setter:nn {#1-width} {#2}
@@ -676,6 +735,7 @@
\@@_generic_setter:nnn \tl_to_str:n
}{
text-align,
+ vertical-align,
math-mode,
}
% \end{macrocode}
@@ -748,6 +808,17 @@
\cs_new_protected:Nn \@@_parse_css:n {
\@@_parse_css:w #1 \q_mark {\q_nil} \q_stop
+% \end{macrocode}
+%
+% Ensure the already seen specificities is in order without duplicates.
+%
+% \begin{macrocode}
+ \seq_remove_duplicates:N \l_@@_specificities_seq
+ \seq_sort:Nn \l_@@_specificities_seq {
+ \int_compare:nNnTF { ##1 } > { ##2 }
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
}
% \end{macrocode}
%
@@ -761,7 +832,7 @@
\quark_if_nil:nF {#2} {
\@@_parse_properties:Nn \l_@@_parse_properties_tl {#2}
\clist_map_inline:nn {#1} {
- \@@_parse_css_addprops:n {##1}
+ \tl_if_empty:nF {##1} { \@@_parse_css_addprops:n {##1} }
}
\@@_parse_css:w #3 \q_stop
}
@@ -777,16 +848,19 @@
\tl_new:N \l_@@_current_selector_check_tl
\cs_new_protected:Nn \@@_parse_css_addprops:n {
\@@_parse_selector:n {#1}
- \tl_set:Nx \l_tmpa_tl { l_@@_property_group_\l_@@_current_selector_tl _tl }
- \tl_if_exist:cF { \l_tmpa_tl } { \tl_clear:c { \l_tmpa_tl } }
- \tl_if_empty:NTF \l_@@_current_selector_check_tl {
- \tl_put_right:cV { \l_tmpa_tl } \l_@@_parse_properties_tl
- }{
- \tl_put_right:cx { \l_tmpa_tl } {
- \exp_not:N \bool_if:nT {
- \exp_not:V \l_@@_current_selector_check_tl
- }{
- \exp_not:V \l_@@_parse_properties_tl
+ \tl_if_empty:NF \l_@@_current_selector_tl {
+ \tl_set:Nx \l_tmpa_tl
+ { l_@@_property_group_\l_@@_current_selector_tl _tl }
+ \tl_if_exist:cF { \l_tmpa_tl } { \tl_clear:c { \l_tmpa_tl } }
+ \tl_if_empty:NTF \l_@@_current_selector_check_tl {
+ \tl_put_right:cV { \l_tmpa_tl } \l_@@_parse_properties_tl
+ }{
+ \tl_put_right:cx { \l_tmpa_tl } {
+ \exp_not:N \bool_if:nT {
+ \exp_not:V \l_@@_current_selector_check_tl
+ }{
+ \exp_not:V \l_@@_parse_properties_tl
+ }
}
}
}
@@ -822,12 +896,17 @@
% \end{macrocode}
%
% Now that we can sanitize pseudo-classes, parsing the selector is safe. The
-% only construct to protect is currently ":nth-child()".
+% constructs to protect are ":nth-child()" and ":where()" since other supported
+% pseudo-classes have no argument.
%
% \begin{macrocode}
\seq_new:N \l_@@_current_selector_seq
\seq_new:N \l_@@_pseudoclasses_seq
\tl_new:N \l_@@_current_element_tl
+\tl_new:N \l_@@_current_tableclass_tl
+\int_new:N \l_@@_current_level_int
+\int_new:N \l_@@_current_specificity_int
+\seq_new:N \l_@@_specificities_seq
\cs_new_protected:Nn \@@_parse_selector:n {
\tl_set:Nx \l_@@_current_selector_tl { \tl_to_str:n {#1} }
% \end{macrocode}
@@ -839,23 +918,141 @@
\exp_args:NNV \tl_replace_all:Nnn
\l_@@_current_selector_tl \c_colon_str {:}
\@@_parse_selector_sanitize:n {nth-child}
+ \@@_parse_selector_sanitize:n {where}
\seq_set_split:NnV \l_@@_current_selector_seq {~} \l_@@_current_selector_tl
\tl_clear:N \l_@@_current_selector_tl
\tl_clear:N \l_@@_current_selector_check_tl
+ \tl_clear:N \l_@@_current_tableclass_tl
+ \int_set:Nn \l_@@_current_level_int {-1}
+ \int_zero:N \l_@@_current_specificity_int
\seq_map_inline:Nn \l_@@_current_selector_seq {
+ \tl_clear:N \l_@@_current_element_tl
+ \@@_parse_simple_selector:n {##1}
+ }
+% \end{macrocode}
+%
+% Remember the current selector as "<last element>~<specificity>".
+%
+% \begin{macrocode}
+ \tl_if_empty:NF \l_@@_current_element_tl {
+ \tl_if_empty:NF \l_@@_current_tableclass_tl {
+ \tl_set:Nx \l_@@_current_tableclass_tl {
+ l_@@_active_classes_\l_@@_current_tableclass_tl _bool
+ }
+ \bool_if_exist:cF { \l_@@_current_tableclass_tl } {
+ \bool_new:c { \l_@@_current_tableclass_tl }
+ }
+ \@@_add_check:x {
+ \exp_not:n { \bool_if_p:N }
+ {
+ \exp_not:c { \l_@@_current_tableclass_tl }
+ }
+ }
+ }
+ \tl_set:Nx \l_@@_current_selector_tl {
+ \exp_not:V \l_@@_current_element_tl
+ \exp_not:n {~}
+ \int_use:N \l_@@_current_specificity_int
+ }
+ \seq_put_right:Nx \l_@@_specificities_seq {
+ \int_use:N \l_@@_current_specificity_int
+ }
+ }
+}
+
+\tl_new:N \l_@@_maybe_element_tl
+
+\cs_new_protected:Nn \@@_parse_simple_selector:n {
+% \end{macrocode}
+%
+% First we replace "." with ":." so that class selectors can be handled with
+% the same code as pseudo-classes. Then we split the current selector item on
+% ":" to get the base element and the pseudo-classes.
+%
+% \begin{macrocode}
+ \tl_set:Nn \l_tmpa_tl { #1 }
+ \tl_replace_all:Nnn \l_tmpa_tl {.} {:.}
+ \seq_set_split:NnV \l_@@_pseudoclasses_seq {:} \l_tmpa_tl
+ \seq_pop_left:NN \l_@@_pseudoclasses_seq \l_@@_maybe_element_tl
+% \end{macrocode}
+%
+% Known type selectors increase the specificity by one.
+%
+% \begin{macrocode}
+ \str_case:VnTF \l_@@_maybe_element_tl {
+ { table } { \int_set:Nn \l_tmpa_int { 1 } }
+ { tr } { \int_set:Nn \l_tmpa_int { 2 } }
+ { td } { \int_set:Nn \l_tmpa_int { 3 } }
+ { p } { \int_set:Nn \l_tmpa_int { 4 } }
+ }{
+ \int_add:Nn \l_@@_current_specificity_int { 1 }
+ }{
+% \end{macrocode}
+%
+% An empty type selector is accepted to account for ":where()" pseudo-classes.
+% They will be handled in the loop below, but of course there should be a type
+% selector eventually. Map that case to a big positive next level so that we can
+% detect that and keep the current level as-is.
+%
+% Unknown type selectors are mapped to big negative levels
+% so that the descendant check will refuse them, unless we are at the very
+% first type selector in which case we map the deprecated environment
+% selector to a class selector.
+%
+% \begin{macrocode}
+ \tl_if_empty:NTF \l_@@_maybe_element_tl {
+ \int_set:Nn \l_tmpa_int { 10 }
+ }{
+ \int_compare:nNnTF \l_@@_current_level_int = { -1 } {
+ \tl_set_eq:NN
+ \l_@@_current_tableclass_tl
+ \l_@@_maybe_element_tl
+ \tl_set:Nn \l_@@_maybe_element_tl { table }
+ \int_set:Nn \l_tmpa_int { 1 }
+ \int_add:Nn \l_@@_current_specificity_int { 11 }
+ }{
+ \int_set:Nn \l_tmpa_int { -10 }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% If no type selector has been found yet, record the one we may have found
+% now. Else, refuse to have two in the same selector.
+%
+% \begin{macrocode}
+ \tl_if_empty:NTF \l_@@_current_element_tl {
+ \tl_set_eq:NN \l_@@_current_element_tl \l_@@_maybe_element_tl
+ }{
+ \tl_if_empty:NF \l_@@_maybe_element_tl {
+ \int_set:Nn \l_tmpa_int { -10 }
+ }
+ }
% \end{macrocode}
%
-% Split the current selector item on ":" to get the base element and the
-% pseudo-classes.
+% If the detected element is a descendent of the previous one, the selector
+% can match; count the element selector specificity and parse its
+% pseudo-classes. If not, the whole selector cannot match and we discard it
+% early.
%
% \begin{macrocode}
- \seq_set_split:Nnn \l_@@_pseudoclasses_seq {:} {##1}
- \seq_pop_left:NN \l_@@_pseudoclasses_seq \l_@@_current_element_tl
- \tl_put_right:Nn \l_@@_current_selector_tl {~}
- \tl_put_right:NV \l_@@_current_selector_tl \l_@@_current_element_tl
+ \int_compare:nNnTF \l_tmpa_int > \l_@@_current_level_int {
+ \int_compare:nNnT \l_tmpa_int < 10 {
+ \int_set_eq:NN \l_@@_current_level_int \l_tmpa_int
+ }
\seq_map_inline:Nn \l_@@_pseudoclasses_seq {
- \@@_parse_pseudoclass:w ####1{}\q_stop
+ \@@_parse_pseudoclass:w ##1{}\q_stop
}
+ }{
+ \tl_clear:N \l_@@_current_element_tl
+ }
+% \end{macrocode}
+%
+% At the end of the selector parsing, the current element should not be empty.
+%
+% \begin{macrocode}
+ \tl_if_empty:NT \l_@@_current_element_tl {
+ \seq_map_break:
}
}
% \end{macrocode}
@@ -864,11 +1061,25 @@
% brace (if any), and the second argument is the braced content (if any).
% The third argument gobbles any trailing garbage.
%
+% If the pseudo-class starts with a "." this is a class selector. Else, this
+% is an unknown pseudo-class and we reject the complete selector.
+%
% \begin{macrocode}
\NewDocumentCommand \@@_parse_pseudoclass:w { lmu{\q_stop} } {
- \exp_args:Nx \str_case:nn { #1 } {
+ \str_case:nnF { #1 } {
{first-child} { \@@_parse_selector_nth:n {1} }
- {nth-child} { \@@_parse_selector_nth:n {#2} }
+ {nth-child} { \@@_parse_selector_nth:n {#2} }
+ {where} { \@@_parse_where:n {#2} }
+ }{
+ \str_if_eq:eeTF { \str_head:n { #1 } } {.} {
+ \tl_set:Nx \l_@@_current_tableclass_tl {
+ \str_tail:n { #1 }
+ }
+ \int_add:Nn \l_@@_current_specificity_int { 10 }
+ }{
+ \tl_clear:N \l_@@_current_element_tl
+ \seq_map_break:n { \seq_map_break: }
+ }
}
}
@@ -878,11 +1089,10 @@
\cs_new_protected:Nn \@@_parse_selector_nth:n {
% \end{macrocode}
%
-% Put something in the selector token list, for specificity ordering
-% of declarations.
+% Count the pseudo-class in the specificity.
%
% \begin{macrocode}
- \tl_put_right:Nn \l_@@_current_selector_tl { :nth-child }
+ \int_add:Nn \l_@@_current_specificity_int { 10 }
% \end{macrocode}
%
% Now parse the nth-child argument:
@@ -920,7 +1130,7 @@
% At last, generate the condition code.
%
% \begin{macrocode}
- \exp_args:NV \str_case:nn \l_@@_current_element_tl {
+ \str_case:Vn \l_@@_current_element_tl {
{tr} { \@@_generate_check_nth:n {\g_@@_row_int} }
{td} { \@@_generate_check_nth:n {\g_@@_col_int} }
}
@@ -928,9 +1138,11 @@
\cs_new_protected_nopar:Nn \@@_generate_check_nth:n {
\int_compare:nNnTF \l_@@_nth_coeff_int = { 0 } {
- \tl_set:Nx \l_tmpa_tl {
+ \@@_add_check:x {
\exp_not:n { \int_compare_p:nNn #1 = }
- \exp_not:V \l_@@_nth_offset_int
+ {
+ \exp_not:V \l_@@_nth_offset_int
+ }
}
}{
\tl_set:Nx \l_tmpb_tl {
@@ -941,7 +1153,7 @@
\exp_not:V \l_@@_nth_coeff_int
}
}
- \tl_set:Nx \l_tmpa_tl {
+ \@@_add_check:x {
\exp_not:N \bool_lazy_and_p:nn {
\exp_not:n { \int_compare_p:nNn 0 = }
{
@@ -958,26 +1170,48 @@
}
}
}
+}
+
+\cs_new_protected:Nn \@@_parse_where:n {
+ \use:x {
+ \exp_not:n {
+ \@@_parse_simple_selector:n { #1 }
+ \int_set:Nn \l_@@_current_specificity_int
+ }
+ {
+ \int_use:N \l_@@_current_specificity_int
+ }
+ }
+}
+
+\cs_new_protected:Nn \@@_add_check:n {
\tl_if_empty:NTF \l_@@_current_selector_check_tl {
- \tl_set_eq:NN \l_@@_current_selector_check_tl \l_tmpa_tl
+ \tl_set:Nn \l_@@_current_selector_check_tl { #1 }
}{
\tl_set:Nx \l_@@_current_selector_check_tl {
\exp_not:N \bool_lazy_and_p:nn {
\exp_not:V \l_@@_current_selector_check_tl
}{
- \exp_not:V \l_tmpa_tl
+ \exp_not:n { #1 }
}
}
}
}
+\cs_generate_variant:Nn \@@_add_check:n {x}
-\cs_set_protected:Nn \@@_recall_properties:n {
- \tl_if_exist:cT { l_@@_property_group_~#1_tl } {
- \tl_use:c { l_@@_property_group_~#1_tl }
+\seq_new:N \l_@@_classes_seq
+\NewDocumentCommand \cellpropsclass { sm } {
+ \seq_set_split:Nnn \l_@@_classes_seq {~} { #2 }
+ \IfBooleanF {#1} {
+ \seq_put_right:Nn \l_@@_classes_seq { \@currenvir }
}
- \clist_map_inline:nn { \@currenvir } {
- \tl_if_exist:cT { l_@@_property_group_~##1~#1_tl } {
- \tl_use:c { l_@@_property_group_~##1~#1_tl }
+}
+\cellpropsclass{}
+
+\cs_set_protected:Nn \@@_recall_properties:n {
+ \seq_map_inline:Nn \l_@@_specificities_seq {
+ \tl_if_exist:cT { l_@@_property_group_#1~##1_tl } {
+ \tl_use:c { l_@@_property_group_#1~##1_tl }
}
}
}
@@ -988,22 +1222,23 @@
\ExplSyntaxOff
\cellprops{
- td {
+ :where(td) {
padding: 0pt \csname l_@@_colsep_dim\endcsname;
min-height: \csname l_@@_strut_ht_dim\endcsname;
min-depth: \csname l_@@_strut_dp_dim\endcsname;
min-width: 0pt;
text-align: left;
+ vertical-align: baseline;
math-mode: auto;
color: inherit;
background-color: transparent;
border: thin none inherit;
}
- tr {
+ :where(tr) {
color: inherit;
background-color: transparent;
}
- table {
+ :where(table) {
padding: 0pt; % No change at load time
color: inherit;
background-color: transparent;
@@ -1030,7 +1265,8 @@
\tl_new:N \l_@@_color_tl
\tl_new:N \l_@@_bgcolor_tl
-% To count rows and columns
+\seq_new:N \l_@@_classes_at_start_seq
+
\cs_new_protected:Nn \@@_array_init: {
\tl_set:Nx \l_@@_restore_tl {
\bool_if:NTF \g_@@_inrow_bool {
@@ -1049,6 +1285,23 @@
\exp_not:n { \tl_gset:Nn \g_@@_borders_tl }
{ \exp_not:V \g_@@_borders_tl }
}
+% \end{macrocode}
+%
+% Unset all previous active classes, and set current ones as active.
+%
+% \begin{macrocode}
+ \seq_map_inline:Nn \l_@@_classes_at_start_seq {
+ \bool_set_false:c { l_@@_active_classes_##1_bool }
+ }
+ \seq_set_eq:NN \l_@@_classes_at_start_seq \l_@@_classes_seq
+ \seq_map_inline:Nn \l_@@_classes_at_start_seq {
+ \bool_set_true:c { l_@@_active_classes_##1_bool }
+ }
+% \end{macrocode}
+%
+% To count rows and columns.
+%
+% \begin{macrocode}
\int_gzero:N \g_@@_row_int
\bool_gset_false:N \g_@@_inrow_bool
\tl_gclear:N \g_@@_borders_tl
@@ -1080,7 +1333,6 @@
\dim_set_eq:NN \l_@@_tablepadding_bottom_dim \g_tmpb_dim
\tl_set_eq:NN \l_@@_color_tl \g_tmpa_tl
\tl_set_eq:NN \l_@@_bgcolor_tl \g_tmpb_tl
- \@@_recall_properties:n {tr}
\dim_set:Nn \l_@@_strut_ht_dim { \box_ht:N \@arstrutbox }
\dim_set:Nn \l_@@_strut_dp_dim { \box_dp:N \@arstrutbox }
\box_clear:N \@arstrutbox
@@ -1360,13 +1612,7 @@
\global\@minipagefalse
\everypar{}
}
- \@@_recall_properties:n {td~p}
- \@@_recall_properties:n {tr~td~p}
- \@@_recall_properties:n {tr:nth-child~p}
- \@@_recall_properties:n {td:nth-child~p}
- \@@_recall_properties:n {tr:nth-child~td~p}
- \@@_recall_properties:n {tr~td:nth-child~p}
- \@@_recall_properties:n {tr:nth-child~td:nth-child~p}
+ \@@_recall_properties:n {p}
}
}
\cs_new_protected_nopar:Nn \@@_end_par_cell:n {
@@ -1381,14 +1627,9 @@
\cs_new_protected_nopar:Nn \@@_begin_raw_cell:n {
\group_begin:
- \@@_recall_properties:n {tr:nth-child}
+ \@@_recall_properties:n {tr}
\@@_update_colors:
\@@_recall_properties:n {td}
- \@@_recall_properties:n {tr~td}
- \@@_recall_properties:n {td:nth-child}
- \@@_recall_properties:n {tr:nth-child~td}
- \@@_recall_properties:n {tr~td:nth-child}
- \@@_recall_properties:n {tr:nth-child~td:nth-child}
\@@_update_colors:
% Additional init code
#1
@@ -1476,12 +1717,50 @@
\tl_if_empty:NF \g_@@_borders_tl { \exp_not:n {&} }
\exp_not:n { \omit \kern \c_zero_dim }
}
- % Handle padding-top, min-height and border-top
- \@@_get_border_info:n {top}
+ % Handle min-height, min-depth and vertical-align
+ % wrong values are treated as |baseline|.
\box_set_ht:Nn \l_@@_cell_box {
\dim_max:nn
{\box_ht:N \l_@@_cell_box}
{\@@_get_property:n {min-height}}
+ }
+ \box_set_dp:Nn \l_@@_cell_box {
+ \dim_max:nn
+ {\box_dp:N \l_@@_cell_box}
+ {\@@_get_property:n {min-depth}}
+ }
+ \str_case_e:nn {\@@_get_property:n {vertical-align}} {
+ { top } {
+ \hbox_set:Nn \l_@@_cell_box {
+ \vbox_top:n {
+ \kern 0pt\relax
+ \box_use_drop:N \l_@@_cell_box
+ }
+ }
+ }
+ { bottom } {
+ \hbox_set:Nn \l_@@_cell_box {
+ \vbox:n {
+ \box_use_drop:N \l_@@_cell_box
+ \kern 0pt\relax
+ }
+ }
+ }
+ { middle } {
+ \hbox_set:Nn \l_@@_cell_box {
+ \dim_set:Nn \l_tmpa_dim {
+ (\box_dp:N \l_@@_cell_box
+ - \box_ht:N \l_@@_cell_box
+ + 1ex) / 2
+ }
+ \raisebox{\l_tmpa_dim}{\box_use_drop:N \l_@@_cell_box}
+ }
+ }
+ }
+ % Handle padding-top and border-top
+ \@@_get_border_info:n {top}
+ \box_set_ht:Nn \l_@@_cell_box {
+ \box_ht:N \l_@@_cell_box
+ (\@@_get_property:n {padding-top})
+ \l_@@_border_width_dim
}
@@ -1497,12 +1776,10 @@
{ \exp_not:V \l_@@_border_color_tl }
}
}
- % Handle padding-bottom, min-depth and border-bottom
+ % Handle padding-bottom and border-bottom
\@@_get_border_info:n {bottom}
\box_set_dp:Nn \l_@@_cell_box {
- \dim_max:nn
- {\box_dp:N \l_@@_cell_box}
- {\@@_get_property:n {min-depth}}
+ \box_dp:N \l_@@_cell_box
+ (\@@_get_property:n {padding-bottom})
+ \l_@@_border_width_dim
}
diff --git a/macros/latex/contrib/cellprops/cellprops.ins b/macros/latex/contrib/cellprops/cellprops.ins
index 3619d87296..1b50038e33 100644
--- a/macros/latex/contrib/cellprops/cellprops.ins
+++ b/macros/latex/contrib/cellprops/cellprops.ins
@@ -1,6 +1,6 @@
\iffalse meta-comment
-File cellprops.ins (C) Copyright 2016-2020 RIVAUD Julien
+File cellprops.ins (C) Copyright 2016-2021 RIVAUD Julien
It may be distributed and/or modified under the conditions of the
General Public License (GPL), either version 3 of this
diff --git a/macros/latex/contrib/cellprops/cellprops.pdf b/macros/latex/contrib/cellprops/cellprops.pdf
index f315384a17..ae4071a20e 100644
--- a/macros/latex/contrib/cellprops/cellprops.pdf
+++ b/macros/latex/contrib/cellprops/cellprops.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index 6ec49c1b3c..a30d93392e 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index e96706fd81..3d9712293f 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -96,13 +96,12 @@
\edge~\url{https://latexstudio.net} \\
\url{https://ctan.org/pkg/easybook}
}
- \date{2021/02/01\hskip\ccwd\relax v1.22}
+ \date{2021/02/02\hskip\ccwd\relax v1.23}
}
\begin{document}
\frontmatter
\maketitle
-\subfile{pages/preface}
\tableofcontents
\mainmatter
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 4ff8a3ab79..6dac946312 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
index 3da60e77e2..d2a9be0bdf 100644
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ b/macros/latex/contrib/easybook/doc/easybook.tex
@@ -1,14 +1,13 @@
\documentclass{ctxdoc}
\hypersetup
{
- colorlinks,
linkcolor = blue,
urlcolor = blue
}
\title{\sffamily easybook书籍文档类}
\author{瞿毅}
-\date{2021/02/01\hskip\ccwd\relax v1.22\thanks{\url{https://gitee.com/texl3/easybook}}}
+\date{2021/02/02\hskip\ccwd\relax v1.23\thanks{\url{https://gitee.com/texl3/easybook}}}
\begin{document}
\maketitle
@@ -80,7 +79,7 @@
同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
\end{function}
-\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-01]{font}
+\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
\begin{syntax}
font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
\end{syntax}
@@ -112,7 +111,7 @@
\end{function}
\subsection{风格}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-01]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath}
+\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-02]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath}
\begin{syntax}
color = <(none)|forest|energy|cyberpunk>
capdash = <true|(false)>
@@ -123,7 +122,7 @@
notomath = <(true)|false>
\end{syntax}
\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-\changes{v1.22}{2021/02/01}{noto风格的数学字体独立出来,可自定义设置。}
+\changes{v1.23}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
\opt{style} 选项控制文章的风格。
\end{function}
@@ -148,7 +147,7 @@
\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/hyperlink,link/linkcolor,link/linktopage}
\begin{syntax}
hyperlink = <(edge)|various|none>
- linkcolor = <(graphite)|cutepink|skyblue|crimson>
+ linkcolor = <(fresh)|cutepink|skyblue|crimson>
linktopage = <true|(false)>
\end{syntax}
\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter1.tex b/macros/latex/contrib/easybook/doc/pages/chapter1.tex
index ffb86ee290..80157ecaac 100644
--- a/macros/latex/contrib/easybook/doc/pages/chapter1.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter1.tex
@@ -6,21 +6,21 @@
\section{公式}\index{g@公式}
\zhlipsum*[42][name = aspirin]
-\begin{equation}\label{eq1}
+\begin{equation}\label{eq:matrix}
\bm{A} = \left[
- \begin{matrix}
- a_{11} & a_{12} & \cdots & a_{1n} \\
- a_{21} & a_{22} & \cdots & a_{2n} \\
- \vdots & \vdots & \ddots & \vdots \\
- a_{m1} & a_{m2} & \cdots & a_{mn} \\
- \end{matrix}
+ \begin{matrix}
+ a_{11} & a_{12} & \cdots & a_{1n} \\
+ a_{21} & a_{22} & \cdots & a_{2n} \\
+ \vdots & \vdots & \ddots & \vdots \\
+ a_{m1} & a_{m2} & \cdots & a_{mn} \\
+ \end{matrix}
\right] = \left[
\begin{matrix}
\bm{a}_1 & \bm{a}_2 & \cdots & \bm{a}_n
\end{matrix}
\right]
\end{equation}
-可以通过添加标签在正文中引用公式,如带有中文括号的引用\cref{eq1}。
+可以通过添加标签在正文中引用公式,如带有中文括号的引用\cref{eq:matrix}。
\zhlipsum*[56][name = aspirin]
\begin{equation}
@@ -35,16 +35,17 @@
\begin{subnumcases}{y =}
C_1e^{r_1x}+C_2e^{r_2x} & \quad $p^2-4q > 0$
\\
- \left(C_1+C_2\right)e^{r_1x} & \quad $p^2-4q=0$
+ \left(C_1+C_2\right)e^{r_1x} & \quad $p^2-4q = 0$
\\
- e^{\alpha x}\left(C_1\cos\beta x+C_2\sin\beta x\right) & \quad $p^2-4q<0$
+ e^{\alpha x}\left(C_1\cos\beta x+C_2\sin\beta x\right) & \quad $p^2-4q < 0$
\end{subnumcases}
\zhlipsum*[57][name = aspirin]
+\vfill{\small\doclicenseThis}
\clearpage
\section{插图}\index{c@插图}
-当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\cref{fig1}。
+当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\cref{fig:example}。
\begin{figure}[htbp]
\centering
\subcaptionbox{并排子图1}
@@ -52,14 +53,14 @@
\hspace{1.2em}
\subcaptionbox{并排子图2}
{\includegraphics[width=0.4\textwidth]{example-image-4x3}}
- \bicaption[使用subcaption排版子图]{使用subcaption宏包的subcaptionbox命令排版子图}[Use subcaption to typeset subgraphs]{Use the subcaptionbox command of the subcaption package to typeset sub-pictures}\label{fig1}
+ \bicaption[使用subcaption排版子图]{使用subcaption宏包的subcaptionbox命令排版子图}[Use subcaption to typeset subgraphs]{Use the subcaptionbox command of the subcaption package to typeset sub-pictures}\label{fig:example}
\end{figure}
\section{表格}\index{b@表格}
-合并表格列使用 \lstinline{\multicolumn} 命令,合并行使用 \lstinline{\multirowcell} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,设置了\textsf{L、C和R}三个列对齐选项,一个例子如\cref{tab1} 所示。
+合并表格列使用 \lstinline{\multicolumn} 命令,合并行使用 \lstinline{\multirowcell} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,设置了\textsf{L、C和R}三个列对齐选项,一个例子如\cref{tab:example} 所示。
\begin{table}[htbp]
\centering
- \bicaption{使用tabularx创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab1}\small
+ \bicaption{使用tabularx创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab:example}\small
\begin{tabularx}{0.87\textwidth}{@{}llL@{}}
\toprule
Aliquam & Integer & Pellentesque tincidunt purus
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter2.tex b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
index c81e0d01bc..49e9d1e824 100644
--- a/macros/latex/contrib/easybook/doc/pages/chapter2.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
@@ -10,17 +10,17 @@
\end{outline}
\section{定理}\index{d@定理}
-\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{gauss formula}\index{d@定理!g@高斯公式}
+\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{theorem:gauss formula}\index{d@定理!g@高斯公式}
设空间闭区域$\Omega$是由分片光滑的闭曲面$\Sigma$围成,若函数$P(x,y,z)$,$Q(x,y,z)$,$R(x,y,z)$在$\Omega$上具有一节连续偏导数,则有
\begin{align}
\iiint_\Omega\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial x}\right)\mathrm{d}V & =\oiint_\Sigma P\mathrm{d}y\mathrm{d}z+Q\mathrm{d}z\mathrm{d}x+R\mathrm{d}x\mathrm{d}y
\\
& =\oiint_\Sigma \left(P\cos\alpha+Q\cos\beta+R\cos\gamma\right)\mathrm{d}S
\end{align}
-这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{gauss formula}。
+这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{theorem:gauss formula}。
\end{theorem}
-\begin{definition}[(Stokes formula)]\label{defi1}\index{d@定理!s@Stokes formula}
+\begin{definition}[(Stokes formula)]\index{d@定理!s@Stokes formula}
Let $\Gamma$ be a piecewise smooth directed closed curve, $\Sigma$ is a piecewise smooth directed surface bounded by $\Gamma$, the side of $\Gamma$ and the positive direction of $\Sigma$ According to the right-hand rule, if the function $P(x,y,z)$, $Q(x,y,z)$, $R(x,y,z)$ has a first-order continuous deviation on the curve $\Sigma$ Derivative, then
\begin{multline}
\iint_\Sigma\left(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\right)\mathrm{d}y\mathrm{d}z+\left(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\right)\mathrm{d}z\mathrm{d}x+\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\mathrm{d}x\mathrm{d}y
diff --git a/macros/latex/contrib/easybook/doc/pages/preface.tex b/macros/latex/contrib/easybook/doc/pages/preface.tex
deleted file mode 100644
index d913c3abe1..0000000000
--- a/macros/latex/contrib/easybook/doc/pages/preface.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-% Preface
-\documentclass[../easybook-demo]{subfiles}
-\begin{document}
-
-\chapter*{前言}
-
-\lstinline{easybook} 使用\LaTeX 3语法将选项扩展入\CTeX 宏集接口命令 \lstinline{\ctexset} 的列表。如果无法编译以及选项说明细节参见~\href{./easybook.pdf}{easybook用户手册}。
-
-\begin{enumerate}[label = \color{DarkBlue}\protect\circled{\arabic*}]
-\item 增加 \lstinline{bibset} 选项,可以使用 \lstinline{bibtex} 或 \lstinline{biber} 编译参考文献。
-\item 修复单面文档时页眉横线消失的问题。
-\item 修复了 \lstinline{linktopage} 选项关闭时目录中标题编号无超链接的问题。
-\item 增加 \lstinline{elfont} 选项可以自定义图表、代码、脚注和边注的字体。
-\item 增加 \lstinline{config} 选项可以载入用户配置文件。
-\item 优化页眉页脚,单面或双面排版适配了不同风格。
-\item 更改草稿选项,与标准文类行为一致并显示页面边框。
-\item 使用功能更丰富的 \lstinline{thmtools} 设置定理环境。
-\end{enumerate}
-
-\vfill{\small\doclicenseThis}
-
-\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls
index c89eaa7325..3460278512 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.cls
@@ -9,7 +9,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/02/01}{1.22}{}
+\ProvidesExplClass{easybook}{2021/02/02}{1.23}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -137,26 +137,36 @@
notomath .initial:n = true
}
-\RequirePackage[svgnames]{xcolor}
-\RequirePackage{pdfpages,subfiles}
-\includepdfset{fitpaper = true}
-\RequirePackage[hang,stable]{footmisc}
-\RequirePackage{setspace,zhlineskip}
-\RequirePackage{amsthm,thmtools,cases}
-\RequirePackage{chemformula,chemfig,siunitx}
-\RequirePackage[normalem]{ulem}
-\RequirePackage[protrusion = false]{microtype}
-\RequirePackage{geometry,marginnote}
-\RequirePackage{rotfloat,graphicx}
-\RequirePackage{nccfoots,tablefootnote}
-\RequirePackage{fancyhdr,titletoc}
-\RequirePackage{caption,bicaption,subcaption}
-\RequirePackage{zhlipsum,fontawesome,pifont}
-\RequirePackage{tabularx,multirow,makecell,booktabs}
-\RequirePackage{paralist,tasks}
-\RequirePackage[shortlabels,inline]{enumitem}
-\RequirePackage[most]{tcolorbox}
-\RequirePackage[xindy]{imakeidx}
+\clist_map_inline:nn
+ {
+ {svgnames}{xcolor},
+ {hang,stable}{footmisc},
+ {normalem}{ulem},
+ {protrusion = false}{microtype},
+ {shortlabels,inline}{enumitem},
+ {most}{tcolorbox},
+ {xindy}{imakeidx}
+ }{\PassOptionsToPackage#1}
+\RequirePackage
+ {
+ xcolor,
+ pdfpages,subfiles,
+ footmisc,
+ setspace,zhlineskip,
+ amsthm,thmtools,cases,
+ chemformula,chemfig,siunitx,ulem,
+ microtype,
+ geometry,marginnote,
+ rotfloat,graphicx,
+ nccfoots,tablefootnote,
+ fancyhdr,titletoc,
+ caption,bicaption,subcaption,
+ zhlipsum,fontawesome,pifont,
+ tabularx,multirow,makecell,booktabs,
+ paralist,tasks,enumitem,
+ tcolorbox,
+ imakeidx
+ }
\RequirePackage[
lang = {chinese-utf8},
type = {CC},
@@ -265,18 +275,7 @@
}
\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\normalfont}
-\clist_new:N \g__geometry_clist
-\__ctex_define:nn {geoset}
- {
- unknown .code:n =
- {
- \clist_gput_right:Nx \g__geometry_clist
- {
- \l_keys_key_str
- \tl_if_empty:NF \l_keys_value_tl{ = {#1}}
- }
- }
- }
+\includepdfset{fitpaper = true}
\geometry
{
vmargin = 2.54cm,
@@ -289,6 +288,18 @@
marginparsep = 8pt,
marginparwidth = 2.54cm
}
+\clist_new:N \g__geometry_clist
+\__ctex_define:nn {geoset}
+ {
+ unknown .code:n =
+ {
+ \clist_gput_right:Nx \g__geometry_clist
+ {
+ \l_keys_key_str
+ \tl_if_empty:NF \l_keys_value_tl{ = {#1}}
+ }
+ }
+ }
\cs_gset:Npn \cleardoublepage
{
@@ -1148,10 +1159,7 @@
rulecolor = \color{ctex@frame},
commentstyle = \color{gray},
emphstyle = \color{ctex@emph},
- emph =
- {
- bibset,bibtex,biber,caption,config,easybook,elfont,linktopage,subcaption,tabularx,thmtools
- },
+ emph = {caption,subcaption,tabularx},
keywordstyle = \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
morekeywords =
{
@@ -1232,14 +1240,14 @@
linkcolor .choice:,
\clist_map_function:nN
{
- {graphite, 626262,0000B2,005752},
+ {fresh, 62d71f,0000B2,005752},
{cutepink, ff69b4,9d5196,57b5e5},
{skyblue, 0000ff,004986,eb6877},
{crimson, dc143c,00c1c9,afcd20}
}
\__linkcolor_set:n,
- linkcolor .default:n = graphite,
- linkcolor .initial:n = graphite,
+ linkcolor .default:n = fresh,
+ linkcolor .initial:n = fresh,
linktopage .choice:,
linktopage/true .code:n = {\__put_hyperref:n {linktocpage}},
diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md
index ce020127f4..ce8e2d5ab6 100644
--- a/macros/latex/contrib/l3kernel/CHANGELOG.md
+++ b/macros/latex/contrib/l3kernel/CHANGELOG.md
@@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2021-02-02]
+
+### Added
+- `\c_zero_str`
+
## [2021-01-09]
### Added
@@ -826,7 +831,8 @@ this project uses date-based 'snapshot' version identifiers.
- Step func­tions have been added for dim vari­ables,
e.g. `\dim_step_in­line:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2021-01-09...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2021-02-02...HEAD
+[2021-02-02]: https://github.com/latex3/latex3/compare/2021-01-09...2021-02-02
[2021-01-09]: https://github.com/latex3/latex3/compare/2020-12-07...2021-01-09
[2020-12-07]: https://github.com/latex3/latex3/compare/2020-12-05...2020-12-07
[2020-12-05]: https://github.com/latex3/latex3/compare/2020-12-03...2020-12-05
diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md
index 00087c46d8..f3bec88c61 100644
--- a/macros/latex/contrib/l3kernel/README.md
+++ b/macros/latex/contrib/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2021-01-09
+Release 2021-02-02
Overview
--------
@@ -68,11 +68,11 @@ The issue tracker for LaTeX3 is currently located
Please report specific issues with LaTeX3 code there; more general
discussion should be directed to the [LaTeX-L list](#Discussion).
-The LaTeX3 Project
+The LaTeX Project
------------------
Development of LaTeX3 is carried out by
-[The LaTeX3 Project](https://www.latex-project.org/latex3/).
+[The LaTeX Project](https://www.latex-project.org/latex3/).
The development team can be contacted
by e-mail: <latex-team@latex-project.org>; for general LaTeX3 discussion
@@ -80,6 +80,6 @@ the [LaTeX-L list](#Discussion) should be used.
-----
-<p>Copyright (C) 1998-2012,2015-2021 The LaTeX3 Project <br />
+<p>Copyright (C) 1998-2012,2015-2021 The LaTeX Project <br />
<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
All rights reserved.</p>
diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx
index b684859b76..f2951e0c72 100644
--- a/macros/latex/contrib/l3kernel/expl3.dtx
+++ b/macros/latex/contrib/l3kernel/expl3.dtx
@@ -2,7 +2,7 @@
%
%% File: expl3.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2021-01-09}%
+\def\ExplFileDate{2021-02-02}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -43,7 +43,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -74,13 +74,13 @@
% arguments.
% \end{itemize}
% This system is being used as the basis for \TeX{} programming within
-% the \LaTeX3 project. Note that the language is not intended for either
+% The \LaTeX{} Project. Note that the language is not intended for either
% document mark-up or style specification. Instead, it is intended that
% such features will be built on top of the conventions described here.
%
% This document is an introduction to the ideas behind the \pkg{expl3}
% programming interface. For the complete documentation of the programming
-% layer provided by the \LaTeX3 Project, see the accompanying
+% layer provided by The \LaTeX{} Project, see the accompanying
% \texttt{interface3} document.
%
% \end{abstract}
@@ -1006,9 +1006,9 @@
% primitives. In particular, third-party authors may significantly
% extend the primitive coverage requirements.
%
-% \section{The \LaTeX3 Project}
+% \section{The \LaTeX{} Project}
%
-% Development of \LaTeX3 is carried out by The \LaTeX3 Project:
+% Development of \LaTeX3 is carried out by The \LaTeX{} Project:
% \url{https://www.latex-project.org/latex3/}.
%
% \begin{thebibliography}{1}
@@ -1030,7 +1030,7 @@
%
% \bibitem{tub:MR97-1}
% Frank Mittelbach and Chris Rowley.
-% \newblock \enquote{The \LaTeX3 Project}.
+% \newblock \enquote{The \LaTeX{} Project}.
% \newblock \emph{TUGboat},
% Vol.\,18, No.\,3, pp.\,195--198, 1997.
%
diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf
index f87cfdb041..95ce931534 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 7d756df461..556ae911ec 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/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex
index bc2c61ff38..ee49ebfcc3 100644
--- a/macros/latex/contrib/l3kernel/interface3.tex
+++ b/macros/latex/contrib/l3kernel/interface3.tex
@@ -2,7 +2,7 @@
File: interfaces3.tex
-Copyright (C) 1990-2011,2017-2021 The LaTeX3 Project
+Copyright (C) 1990-2011,2017-2021 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
@@ -47,14 +47,14 @@ for those people who are interested.
\title{The \LaTeX3 Interfaces}
\author{%
- The \LaTeX3 Project\thanks
+ The \LaTeX{} Project\thanks
{%
E-mail:
\href{mailto:latex-team@latex-project.org}
{latex-team@latex-project.org}%
}%
}
-\date{Released 2021-01-09}
+\date{Released 2021-02-02}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/l3.ins b/macros/latex/contrib/l3kernel/l3.ins
index f567f2a8c6..d9ecef35e0 100644
--- a/macros/latex/contrib/l3kernel/l3.ins
+++ b/macros/latex/contrib/l3kernel/l3.ins
@@ -2,7 +2,7 @@
File l3.ins
-Copyright (C) 2011,2012,2014-2021 The LaTeX3 Project
+Copyright (C) 2011,2012,2014-2021 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
@@ -35,7 +35,7 @@ license information is placed in the derived files.
\preamble
-Copyright (C) 1990-2021 The LaTeX3 Project
+Copyright (C) 1990-2021 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
@@ -151,7 +151,7 @@ and all files in that bundle must be distributed together.
\def\MetaPrefix{--}
\preamble
-Copyright (C) 1990-2021 The LaTeX3 Project
+Copyright (C) 1990-2021 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
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index dd95416e5a..2992cb6ce3 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -2,7 +2,7 @@
%
%% File: l3basics.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -1293,7 +1293,7 @@
% \end{texnote}
% \end{function}
%
-% \subsection{Debugging support}
+% \section{Debugging support}
%
% \begin{function}[added = 2017-07-16, updated = 2017-08-02]{\debug_on:n, \debug_off:n}
% \begin{syntax}
diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
index 65397d5286..a612c61c75 100644
--- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx
+++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx
@@ -2,7 +2,7 @@
%
%% File: l3bootstrap.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx
index eade06c734..647f5b68dd 100644
--- a/macros/latex/contrib/l3kernel/l3box.dtx
+++ b/macros/latex/contrib/l3kernel/l3box.dtx
@@ -2,7 +2,7 @@
%
%% File: l3box.dtx
%
-% Copyright (C) 2005-2021 The LaTeX3 Project
+% Copyright (C) 2005-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx
index 1a3d67c01e..9c7e925212 100644
--- a/macros/latex/contrib/l3kernel/l3candidates.dtx
+++ b/macros/latex/contrib/l3kernel/l3candidates.dtx
@@ -2,7 +2,7 @@
%
%% File: l3candidates.dtx
%
-% Copyright (C) 2012-2021 The LaTeX3 Project
+% Copyright (C) 2012-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx
index 1d393df1d4..003d1b4467 100644
--- a/macros/latex/contrib/l3kernel/l3cctab.dtx
+++ b/macros/latex/contrib/l3kernel/l3cctab.dtx
@@ -2,7 +2,7 @@
%
%% File: l3cctab.dtx
%
-% Copyright (C) 2018-2021 The LaTeX3 Project
+% Copyright (C) 2018-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx
index f88dd61968..442674eb40 100644
--- a/macros/latex/contrib/l3kernel/l3clist.dtx
+++ b/macros/latex/contrib/l3kernel/l3clist.dtx
@@ -2,8 +2,8 @@
%
%% File: l3clist.dtx
%
-% Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
-% (C) 2012-2021 The LaTeX3 Project
+% Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX Project
+% (C) 2012-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx
index 4c7784cdba..1df2770f86 100644
--- a/macros/latex/contrib/l3kernel/l3coffins.dtx
+++ b/macros/latex/contrib/l3kernel/l3coffins.dtx
@@ -2,7 +2,7 @@
%
%% File: l3coffins.dtx
%
-% Copyright (C) 2010-2021 The LaTeX3 Project
+% Copyright (C) 2010-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3color-base.dtx b/macros/latex/contrib/l3kernel/l3color-base.dtx
index 8612fb9361..3e5eff250c 100644
--- a/macros/latex/contrib/l3kernel/l3color-base.dtx
+++ b/macros/latex/contrib/l3kernel/l3color-base.dtx
@@ -2,7 +2,7 @@
%
%% File: l3color-base.dtx
%
-% Copyright (C) 2011,2012,2014,2016-2021 The LaTeX3 Project
+% Copyright (C) 2011,2012,2014,2016-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx
index bd46449673..198f701b5a 100644
--- a/macros/latex/contrib/l3kernel/l3debug.dtx
+++ b/macros/latex/contrib/l3kernel/l3debug.dtx
@@ -2,7 +2,7 @@
%
%% File: l3debug.dtx
%
-% Copyright (C) 2019-2021 The LaTeX3 Project
+% Copyright (C) 2019-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx
index 77183e8c73..aa9c8178aa 100644
--- a/macros/latex/contrib/l3kernel/l3deprecation.dtx
+++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx
@@ -2,7 +2,7 @@
%
%% File: l3deprecation.dtx
%
-% Copyright (C) 2017-2021 The LaTeX3 Project
+% Copyright (C) 2017-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx
index b0411437b3..397e6f38b2 100644
--- a/macros/latex/contrib/l3kernel/l3doc.dtx
+++ b/macros/latex/contrib/l3kernel/l3doc.dtx
@@ -2,7 +2,7 @@
%
%% File: l3doc.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -31,7 +31,7 @@
\askforoverwritefalse
\preamble
-Copyright (C) 1990-2021 The LaTeX3 Project
+Copyright (C) 1990-2021 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
@@ -79,7 +79,7 @@ and all files in that bundle must be distributed together.
%
% \title{The \cls{l3doc} class}
% \author{\Team}
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
% \maketitle
% \tableofcontents
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx
index 4f5122da27..aed912d754 100644
--- a/macros/latex/contrib/l3kernel/l3docstrip.dtx
+++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx
@@ -2,7 +2,7 @@
%
%% File l3dosctrip.dtx
%
-% Copyright (C) 2012,2014-2021 The LaTeX3 Project
+% Copyright (C) 2012,2014-2021 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
@@ -55,7 +55,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf
index 7cac6864c4..00d32bcd1b 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 b842b242ab..efff4bc496 100644
--- a/macros/latex/contrib/l3kernel/l3expan.dtx
+++ b/macros/latex/contrib/l3kernel/l3expan.dtx
@@ -2,7 +2,7 @@
%
%% File: l3expan.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx
index a97a7a9a76..a34d734039 100644
--- a/macros/latex/contrib/l3kernel/l3file.dtx
+++ b/macros/latex/contrib/l3kernel/l3file.dtx
@@ -2,7 +2,7 @@
%
%% File: l3file.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -548,7 +548,7 @@
% The maximum number of characters in a line to be written
% by the \cs{iow_wrap:nnnN}
% function. This value depends on the \TeX{} system in use: the standard
-% value is $78$, which is typically correct for unmodified \TeX{}live
+% value is $78$, which is typically correct for unmodified \TeX{} Live
% and \hologo{MiKTeX} systems.
% \end{variable}
%
@@ -771,7 +771,7 @@
% \cs{file_get_mdfive_hash:nN} \Arg{file name} \meta{tl var}
% \end{syntax}
% Sets the \meta{tl var} to the result of applying
-% \cs{file_mdfive_hash:n} to the \meta{file}. If the file is not found,
+% \cs{file_mdfive_hash:n} to the \meta{file}. If the file is not found,
% the \meta{tl var} will be set to \cs{q_no_value}.
% \end{function}
%
@@ -791,7 +791,7 @@
% \cs{file_get_size:nN} \Arg{file name} \meta{tl var}
% \end{syntax}
% Sets the \meta{tl var} to the result of applying
-% \cs{file_size:n} to the \meta{file}. If the file is not found,
+% \cs{file_size:n} to the \meta{file}. If the file is not found,
% the \meta{tl var} will be set to \cs{q_no_value}.
% This is not available in older versions of \XeTeX{}.
% \end{function}
@@ -817,7 +817,7 @@
% \cs{file_get_timestamp:nN} \Arg{file name} \meta{tl var}
% \end{syntax}
% Sets the \meta{tl var} to the result of applying
-% \cs{file_timestamp:n} to the \meta{file}. If the file is not found,
+% \cs{file_timestamp:n} to the \meta{file}. If the file is not found,
% the \meta{tl var} will be set to \cs{q_no_value}.
% This is not available in older versions of \XeTeX{}.
% \end{function}
@@ -1647,7 +1647,7 @@
% This is the \enquote{raw} number of characters in a line which
% can be written to the terminal.
% The standard value is the line length typically used by
-% \TeX{}Live and \hologo{MiKTeX}.
+% \TeX{} Live and \hologo{MiKTeX}.
% \begin{macrocode}
\int_new:N \l_iow_line_count_int
\int_set:Nn \l_iow_line_count_int { 78 }
@@ -2488,10 +2488,10 @@
}
\cs_new:Npx \__kernel_file_name_expand_group:nw #1
{
- \c_left_brace_str
+ \c_left_brace_str
\exp_not:N \__kernel_file_name_expand_loop:w
#1
- \c_right_brace_str
+ \c_right_brace_str
}
\exp_last_unbraced:NNo
\cs_new:Npx \__kernel_file_name_expand_space:w \c_space_tl
@@ -2527,7 +2527,7 @@
% Spaces need to be trimmed from the start of the name and from the end of
% any extension. However, the name we are passed might not have an extension:
% that means we have to look for one. If there is no extension, we still use
-% the standard trimming function but deliberately prevent any spaces being
+% the standard trimming function but deliberately prevent any spaces being
% removed at the end.
% \begin{macrocode}
\cs_new:Npn \__kernel_file_name_trim_spaces:n #1
@@ -3040,7 +3040,7 @@
\cs_new_protected:Npn \file_get_hex_dump:nnnN #1#2#3#4
{
\file_get_hex_dump:nnnNF {#1} {#2} {#3} #4
- { \tl_set:Nn #4 { \q_no_value } }
+ { \tl_set:Nn #4 { \q_no_value } }
}
\prg_new_protected_conditional:Npnn \file_get_hex_dump:nnnN #1#2#3#4
{ T , F , TF }
diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx
index 7a7546f27c..193dacb347 100644
--- a/macros/latex/contrib/l3kernel/l3flag.dtx
+++ b/macros/latex/contrib/l3kernel/l3flag.dtx
@@ -2,7 +2,7 @@
%
%% File: l3flag.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
index 12eb397190..2a9dc638a9 100644
--- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-assign.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-assign} package\\
% Floating point expressions}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
index 149ccb46f9..565d9cc0fb 100644
--- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-aux.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
index b040ac3e96..b58e991be8 100644
--- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-basics.dtx
%
-% Copyright (C) 2011-2014,2016-2021 The LaTeX3 Project
+% Copyright (C) 2011-2014,2016-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-basics} package\\
% Floating point arithmetic}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
index 8c4e5270f6..c3b6d9ada2 100644
--- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-convert.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
index 3f7b065f05..28617289ff 100644
--- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-expo.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-expo} package\\
% Floating point exponential-related functions}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
index dcccbe502a..076cfbd6e4 100644
--- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-extended.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-extended} package\\
% Manipulating numbers with extended precision, for internal use}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
index 0b220209a3..80a7a9947a 100644
--- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-logic.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-logic} package\\
% Floating point conditionals}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
index 4d72f67104..37207e1b26 100644
--- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-parse.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-parse} package\\
% Floating point expression parsing}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx
index b5d9012689..4e5d7bf9de 100644
--- a/macros/latex/contrib/l3kernel/l3fp-random.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-random.dtx
%
-% Copyright (C) 2016-2021 The LaTeX3 Project
+% Copyright (C) 2016-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-random} package\\
% Floating point random numbers}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx
index 9a9ff30a58..ef94103115 100644
--- a/macros/latex/contrib/l3kernel/l3fp-round.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-round.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
index 456999ed1b..e0915c63f5 100644
--- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-traps.dtx
%
-% Copyright (C) 2011-2014,2016-2021 The LaTeX3 Project
+% Copyright (C) 2011-2014,2016-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-traps} package\\
% Trapping floating-point exceptions}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
index 57ff263e7d..113c8858a9 100644
--- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp-trig.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -33,14 +33,14 @@
% \title{The \textsf{l3fp-trig} package\\
% Floating point trigonometric functions}
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index 2319504a4a..6d04ac5b6d 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fp.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -41,7 +41,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx
index 6847cb1e0c..457490afcd 100644
--- a/macros/latex/contrib/l3kernel/l3fparray.dtx
+++ b/macros/latex/contrib/l3kernel/l3fparray.dtx
@@ -2,7 +2,7 @@
%
%% File: l3fparray.dtx
%
-% Copyright (C) 2018-2021 The LaTeX3 Project
+% Copyright (C) 2018-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index d5bfaf26b6..b22e7a9ac7 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -2,7 +2,7 @@
%
%% File: l3int.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -919,7 +919,7 @@
% code and so should only be used for short-term storage.
% \end{variable}
%
-% \subsection{Direct number expansion}
+% \section{Direct number expansion}
%
% \begin{function}[EXP, added = 2018-03-27]{\int_value:w}
% \begin{syntax}
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx
index 1dacedc38b..369788f9e3 100644
--- a/macros/latex/contrib/l3kernel/l3intarray.dtx
+++ b/macros/latex/contrib/l3kernel/l3intarray.dtx
@@ -2,7 +2,7 @@
%
%% File: l3intarray.dtx
%
-% Copyright (C) 2017-2021 The LaTeX3 Project
+% Copyright (C) 2017-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -157,7 +157,7 @@
%
% While \LuaTeX{}'s memory is extensible, other engines can
% \enquote{only} deal with a bit less than $4\times 10^6$ entries in all
-% \tn{fontdimen} arrays combined (with default \TeX{}Live settings).
+% \tn{fontdimen} arrays combined (with default \TeX{} Live settings).
%
% \end{documentation}
%
diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
index 68771e076a..bc10c5e5c9 100644
--- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx
@@ -2,7 +2,7 @@
%
%% File: l3kernel-functions.dtx
%
-% Copyright (C) 2018-2021 The LaTeX3 Project
+% Copyright (C) 2018-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx
index 860854cc77..6476398791 100644
--- a/macros/latex/contrib/l3kernel/l3keys.dtx
+++ b/macros/latex/contrib/l3kernel/l3keys.dtx
@@ -2,7 +2,7 @@
%
%% File: l3keys.dtx
%
-% Copyright (C) 2006-2021 The LaTeX3 Project
+% Copyright (C) 2006-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx
index 6bf78a7c4c..e8191b19c9 100644
--- a/macros/latex/contrib/l3kernel/l3legacy.dtx
+++ b/macros/latex/contrib/l3kernel/l3legacy.dtx
@@ -2,7 +2,7 @@
%
%% File: l3legacy.dtx
%
-% Copyright (C) 2019-2021 The LaTeX3 Project
+% Copyright (C) 2019-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx
index 80b3d85591..26892b81c1 100644
--- a/macros/latex/contrib/l3kernel/l3luatex.dtx
+++ b/macros/latex/contrib/l3kernel/l3luatex.dtx
@@ -2,7 +2,7 @@
%
%% File: l3luatex.dtx
%
-% Copyright (C) 2010-2021 The LaTeX3 Project
+% Copyright (C) 2010-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx
index 6e2ff77f36..b9d0c5f4b5 100644
--- a/macros/latex/contrib/l3kernel/l3msg.dtx
+++ b/macros/latex/contrib/l3kernel/l3msg.dtx
@@ -2,7 +2,7 @@
%
%% File: l3msg.dtx
%
-% Copyright (C) 2009-2021 The LaTeX3 Project
+% Copyright (C) 2009-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx
index 24a3fad804..cd70775514 100644
--- a/macros/latex/contrib/l3kernel/l3names.dtx
+++ b/macros/latex/contrib/l3kernel/l3names.dtx
@@ -2,7 +2,7 @@
%
%% File: l3names.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf
index 107af7a97d..9be306f351 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/l3news.tex b/macros/latex/contrib/l3kernel/l3news.tex
index 8b12177a15..b8f0de5c72 100644
--- a/macros/latex/contrib/l3kernel/l3news.tex
+++ b/macros/latex/contrib/l3kernel/l3news.tex
@@ -1,4 +1,4 @@
-% Copyright 2019-2020 The LaTeX3 Project
+% Copyright 2019-2021 The LaTeX Project
\providecommand*{\lastissue}{12}
diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf
index 36b8943235..a58a6b2a9f 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/l3news01.tex b/macros/latex/contrib/l3kernel/l3news01.tex
index 717f12ddbb..b4841ac24b 100644
--- a/macros/latex/contrib/l3kernel/l3news01.tex
+++ b/macros/latex/contrib/l3kernel/l3news01.tex
@@ -18,7 +18,7 @@
\section{Welcome to \LaTeX3}
-Momentum is again starting to build behind the \LaTeX3 project. For the
+Momentum is again starting to build behind The \LaTeX{} Project. For the
last few releases of \TeX~Live, the experimental programming foundation for
\LaTeX3 has been available under the name \package{expl3}. Despite large
warnings that the code would probably change in the future, we wanted to show
@@ -90,7 +90,7 @@ Some new and/or experimental packages will be changing to use the
these latter two in recent times.) There will also be a version of the
\package{siunitx} package written in \package{expl3}, in parallel to the
current \LaTeXe\ version. These developments will provide improvements to
-everyday \LaTeX\ users who haven't even heard of the \LaTeX3 Project.
+everyday \LaTeX\ users who haven't even heard of The \LaTeX{} Project.
Looking towards the long term, \LaTeX3 as a document preparation system needs
to be written almost from scratch. A high-level user syntax needs to be
diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf
index 0e39a68409..a15fbd0f69 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 c48bc3a25f..2621b17d60 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 98d34ef070..f234a371e7 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 71958e1c4b..cb71d32c6a 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 bdec3b54d4..7e1d1b4842 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/l3news06.tex b/macros/latex/contrib/l3kernel/l3news06.tex
index 50484e6142..63ee6c7c75 100644
--- a/macros/latex/contrib/l3kernel/l3news06.tex
+++ b/macros/latex/contrib/l3kernel/l3news06.tex
@@ -32,7 +32,7 @@ Raising interest in \LaTeX3 developments has inevitably led to feedback on
cases where the code base has required attention. It has also attracted new
programmers to using \LaTeX3 ideas, some more than others! Bruno Le Floch has
over the past few months made many useful contributions to \LaTeX3, and we are
-very pleased that he has recently joined the \LaTeX3 Project.
+very pleased that he has recently joined The \LaTeX{} Project.
Bruno has taken a particular interest in improving the performance and
reliability of the \pkg{expl3} language. This has already resulted in new
@@ -46,7 +46,7 @@ In parallel to Bruno's improvements, Joseph Wright initiated a series of `Big
Bang' improvements to \LaTeX3. The aim of the Big Bang was to address a number
of long-standing issues with the \LaTeX3 code base. Development has taken place
over many years, with the status of some of the resulting code being less
-than clear, even to members of The \LaTeX3 Project! At the same time, different
+than clear, even to members of The \LaTeX{} Project! At the same time, different
conventions had been applied to different parts of the code, which made reading
some of the code rather `interesting'. A key part of the Big Bang has been to
address these issues, cleaning up the existing code and ensuring that the
diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf
index 6d8daca1e3..7cf72e1b1a 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 c17dbd5563..85a3340bda 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 2f102b2c54..7da363ec51 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/l3news09.tex b/macros/latex/contrib/l3kernel/l3news09.tex
index c0982a94a6..55ed700a2c 100644
--- a/macros/latex/contrib/l3kernel/l3news09.tex
+++ b/macros/latex/contrib/l3kernel/l3news09.tex
@@ -1136,7 +1136,7 @@ In order to help standardise the prefixes used in \pkg{expl3} modules, we have d
Please contact us via the \texttt{latex-l} mailing list to register your module prefixes and package names; we ask that you avoid using package names that begin with \texttt{l3...}\ since \pkg{expl3} packages use this internally.
Some authors have started using the package prefix \texttt{lt3...}\ as a way of indicating their package builds on \pkg{expl3} in some way but is not maintained by the \LaTeX3 team.
-In the prefix database at present, some thirty package prefixes are registered by fifteen separate individuals (unrelated to the \LaTeX3 project\Dash the number of course grows if you include packages by members of the team).
+In the prefix database at present, some thirty package prefixes are registered by fifteen separate individuals (unrelated to The \LaTeX{} Project\Dash the number of course grows if you include packages by members of the team).
These packages cover a broad range of functionality:
\begin{description}
\item[\ctanpkg{acro}] Interface for creating (classes of) acronyms
@@ -1304,7 +1304,7 @@ Of those four layers, the lowest one\Dash\pkg{expl3}\Dash is available for use a
The middle layers, however, where the rubber meets the road, are still at the level of prototypes and ideas (templates, \pkg{ldb}, galley, \pkg{xor} and all the good stuff) that need to be revised and further developed to arrive at a \LaTeX3 environment that can stand on its own and that is to where we want to return in 2014.
-An overview on this can be found in the answer to "What can *I* do to help the \LaTeX3 project?"\ on Stack Exchange,\footnote{\url{http://tex.stackexchange.com/questions/45838}}
+An overview on this can be found in the answer to "What can *I* do to help The \LaTeX{} Project?"\ on Stack Exchange,\footnote{\url{http://tex.stackexchange.com/questions/45838}}
which is reproduced below in slightly abridged form.
This is of course not the first time that we have discussed such matters, and you can find similar material in other publications such as those at \url{http://latex-project.org}; e.g., the architecture talk given at the TUG 2011 conference.
@@ -1315,7 +1315,7 @@ This is of course not the first time that we have discussed such matters, and yo
\end{center}
\newpage
-\section{What can you do for the \LaTeX3 project?}
+\section{What can you do for The \LaTeX{} Project?}
\textbf{By Frank Mittelbach}
My vision of \LaTeX3 is really a system with multiple layers that provide interfaces for different kinds of roles. These layers are
@@ -1335,7 +1335,7 @@ If you look at it from the perspective of user roles then there are at least thr
\item The Designer (typography and layout)
\item The Author (content)
\end{itemize}
-As a consequence the \LaTeX3 Project needs different kinds of help depending on what layer or role we are looking at.
+As a consequence The \LaTeX{} Project needs different kinds of help depending on what layer or role we are looking at.
The "Author" is using, say, list structures by specifying something like \verb"\begin{itemize} \item" in his documents. Or perhaps by writing \Verb|<ul> ... </ul>| or whatever the UI representation offers to him.
diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf
index 3697b42045..5558d8c2f8 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 637c1df8f0..36cdb2411b 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 7d690fd463..d9d55511a3 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/l3prefixes.csv b/macros/latex/contrib/l3kernel/l3prefixes.csv
index 47a2abf9e0..4259c37c30 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.csv
+++ b/macros/latex/contrib/l3kernel/l3prefixes.csv
@@ -6,72 +6,74 @@ UFca,citeall,Ulrike Fischer,,,,2015-04-09,2016-02-26,
acro,acro,Clemens Niederberger,https://github.com/cgnieder/acro/,https://github.com/cgnieder/acro.git,https://github.com/cgnieder/acro/issues,2013-03-16,2020-04-14,
akshar,akshar,Vu Van Dung,https://github.com/joulev/akshar,https://github.com/joulev/akshar.git,https://github.com/joulev/akshar/issues,2020-05-27,2020-05-27,
algobox,algobox,Julien Rivaud,,,,2018-06-13,2018-06-13,
-alignment,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-alloc,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Internal only but reserved
-ampersand,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+alignment,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+alloc,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Internal only but reserved
+ampersand,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
apfs,apfontspec,Qing Lee,https://github.com/CTeX-org/apfontspec,https://github.com/CTeX-org/apfontspec.git,https://github.com/CTeX-org/apfontspec/issues,2020-05-17,2020-05-17,
arch,archaeologie,Lukas C. Bossert,http://www.biblatex-archaeologie.de,https://github.com/LukasCBossert/biblatex-archaeologie.git,https://github.com/LukasCBossert/biblatex-archaeologie/issues,2017-03-24,2017-03-24,
array,hobby,Andrew Stacey,https://github.com/loopspace/hobby,https://github.com/loopspace/hobby,https://github.com/loopspace/hobby/issues,2013-03-16,2020-10-29,
-atsign,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+atsign,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
avm,langsci-avm,Felix Kopecky,https://ctan.org/pkg/langsci-avm,https://github.com/langsci/langsci-avm,https://github.com/langsci/langsci-avm/issues,2020-03-11,2020-03-11,
-backend,l3backend,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-04,2019-06-04,
-backslash,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+backend,l3backend,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-04,2019-06-04,
+backslash,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
bearwear,bearwear,Ulrike Fischer,https://github.com/u-fischer/bearwear,https://github.com/u-fischer/bearwear,https://github.com/u-fischer/bearwear/issues,2020-04-24,2020-04-24,
-bool,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-box,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+bitset,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-12-26,2020-12-26,
+bool,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+box,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
bxjh,BXjaholiday,Takuto Asakura,https://github.com/wtsnjp/BXjaholiday,https://github.com/wtsnjp/BXjaholiday.git,https://github.com/wtsnjp/BXjaholiday/issues,2018-02-02,2019-02-02,
cascade,cascade,F. Pantigny,,,,2020-07-21,2020-07-21,
-catcode,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-cctab,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+catcode,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+cctab,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
cellprops,cellprops,Julien Rivaud,,,,2018-06-13,2018-06-13,
-char,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+char,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
chemformula,chemformula,Clemens Niederberger,https://github.com/cgnieder/chemformula/,https://github.com/cgnieder/chemformula.git,https://github.com/cgnieder/chemformula/issues,2013-03-16,2020-04-14,
chemmacros,chemmacros,Clemens Niederberger,https://github.com/cgnieder/chemmacros/,https://github.com/cgnieder/chemmacros.git,https://github.com/cgnieder/chemmacros/issues,2013-03-16,2020-04-14,
chemnum,chemnum,Clemens Niederberger,https://github.com/cgnieder/chemnum/,https://github.com/cgnieder/chemnum.git,https://github.com/cgnieder/chemnum/issues,2013-03-16,2020-04-14,
-chk,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Currently internal-only but reserved
-circumflex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+chk,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Currently internal-only but reserved
+circumflex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
classics,classics,Eduardo C. Lourenço de Lima,,,,2013-03-16,2013-03-16,
-clist,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-codedoc,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Somewhat experimental: may change
-coffin,"l3kernel,xcoffins",The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-colon,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-color,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+clist,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+cmd,ltcmd,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2021-01-20,2021-01-20,
+codedoc,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,Somewhat experimental: may change
+coffin,"l3kernel,xcoffins",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+colon,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+color,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
conteq,conteq,Joachim Breitner,https://github.com/nomeata/conteq,https://github.com/nomeata/conteq.git,https://github.com/nomeata/conteq/issues,2013-05-26,2013-05-27,
cookingunits,cooking-units,Ben Vitecek,https://github.com/Vidabe/cooking-units,https://github.com/Vidabe/cooking-units.git,https://github.com/Vidabe/cooking-units/issues,2018-09-26,2018-09-26,
-cs,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+cs,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
csvsim,csvsimple,Thomas F. Sturm,https://github.com/T-F-S/csvsimple,https://github.com/T-F-S/csvsimple.git,https://github.com/T-F-S/csvsimple/issues,2020-02-19,2020-02-19,
ctex,ctex,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2014-03-08,2014-03-08,
ctuthesis,ctuthesis,Tom Hejda,https://github.com/tohecz/ctuthesis,https://github.com/tohecz/ctuthesis.git,https://github.com/tohecz/ctuthesis/issues,2015-07-26,2015-07-26,
-debug,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2017-07-15,2017-07-15,
+debug,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2017-07-15,2017-07-15,
denisbdoc,denisbdoc,Denis Bitouzé,https://github.com/dbitouze/denisbdoc,git@github.com:dbitouze/denisbdoc.git,,2020-05-13,2020-05-13,
deriv,derivative,Simon Jensen,,,,2019-07-24,2019-07-24,
diffcoeff,diffcoeff,Andrew Parsloe,,,,2019-08-26,2019-08-26,
-dim,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-document,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
-dollar,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-driver,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+dim,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+document,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
+dollar,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+driver,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
dry,dry,Michiel Helvensteijn,,,,2013-01-18,2013-01-18,
ducksay,ducksay,Jonathan P. Spratte,https://github.com/Skillmon/ltx_ducksay,git@github.com:Skillmon/ltx_ducksay.git,https://github.com/Skillmon/ltx_ducksay/issues,2019-06-07,2019-06-07,
duckuments,duckuments,Jonathan P. Spratte,https://github.com/Skillmon/ltx_duckuments,git@github.com:Skillmon/ltx_duckuments.git,https://github.com/Skillmon/ltx_duckuments/issues,2019-06-07,2019-06-07,
-e,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-else,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+e,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+else,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
emoji,emoji,Xiangdong Zeng,https://github.com/stone-zeng/latex-emoji,https://github.com/stone-zeng/latex-emoji.git,https://github.com/stone-zeng/latex-emoji/issues,2020-03-08,2020-03-08,
emojicite,emojicite,Leon Sixt,https://github.com/berleon/emojicite,https://github.com/berleon/emojicite.git,https://github.com/berleon/emojicite/issues/,2020-04-14,2020-04-20,
-empty,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+empty,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
enotez,enotez,Clemens Niederberger,https://github.com/cgnieder/enotez/,https://github.com/cgnieder/enotez.git,https://github.com/cgnieder/enotez/issues,2013-03-16,2020-04-14,
-etex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-exp,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-expl,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+etex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+exp,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+expl,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
exsheets,exsheets,Clemens Niederberger,https://bitbucket.org/cgnieder/exsheets/,git@bitbucket.org:cgnieder/exsheets.git,https://bitbucket.org/cgnieder/exsheets/issues,2013-03-16,2013-03-16,
extblx,biblatex-ext,Moritz Wemheuer,https://github.com/moewew/biblatex-ext/,https://github.com/moewew/biblatex-ext.git,https://github.com/moewew/biblatex-ext/issues,2020-02-09,2020-02-09,
exwf,exwrapfig,Takuto Asakura,https://github.com/wtsnjp/exwrapfig,https://github.com/wtsnjp/exwrapfig.git,https://github.com/wtsnjp/exwrapfig/issues,2018-06-07,2018-06-07,
fdu,fduthesis,Xiangdong Zeng,https://github.com/stone-zeng/fduthesis,https://github.com/stone-zeng/fduthesis.git,https://github.com/stone-zeng/fduthesis/issues,2018-06-14,2020-03-08,
fdudoc,fduthesis,Xiangdong Zeng,https://github.com/stone-zeng/fduthesis,https://github.com/stone-zeng/fduthesis.git,https://github.com/stone-zeng/fduthesis/issues,2018-06-14,2020-03-08,
fdulogo,fduthesis,Xiangdong Zeng,https://github.com/stone-zeng/fduthesis,https://github.com/stone-zeng/fduthesis.git,https://github.com/stone-zeng/fduthesis/issues,2018-06-14,2020-03-08,
-fi,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
-file,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-filehook,ltfilehook,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2020-10-01,2020-10-01,
-flag,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2017-02-13,
+fi,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+file,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+filehook,ltfilehook,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2020-10-01,2020-10-01,
+flag,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2017-02-13,
fltr,newlfm,Paul Thomson,,,,2013-01-29,2013-01-29,
fmdug,dashundergaps,Frank Mittelbach,https://www.latex-project.org/,https://github.com/FrankMittelbach/fmitex.git,https://github.com/FrankMittelbach/fmitex/issues,2018-06-24,2018-06-24,
fmuft,unicodefonttable,Frank Mittelbach,https://www.latex-project.org/,https://github.com/FrankMittelbach/fmitex.git,https://github.com/FrankMittelbach/fmitex/issues,2020-02-17,2020-02-17,
@@ -79,151 +81,151 @@ fmwao,widows-and-orphans,Frank Mittelbach,https://www.latex-project.org/,https:/
fnpct,fnpct,Clemens Niederberger,https://github.com/cgnieder/fnpct/,https://github.com/cgnieder/fnpct.git,https://github.com/cgnieder/fnpct/issues,2013-03-16,2020-04-14,
fontsizes,fontsizes,Julien Rivaud,,,,,2018-06-13,
fontspec,fontspec,Will Robertson,https://github.com/wspr/fontspec,https://github.com/wspr/fontspec.git,https://github.com/wspr/fontspec/issues,2013-03-16,2013-03-16,
-fp,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-galley,l3galley,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+fp,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+galley,l3galley,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
gatherenum,gatherenum,Julien Rivaud,,,,2018-06-13,2018-06-14,
getree,genealogytree,Thomas F. Sturm,https://github.com/T-F-S/genealogytree,https://github.com/T-F-S/genealogytree.git,https://github.com/T-F-S/genealogytree/issues,2020-02-19,2020-02-19,
ghsystem,ghsystem,Clemens Niederberger,https://github.com/cgnieder/ghsystem/,https://github.com/cgnieder/ghsystem.git,https://github.com/cgnieder/ghsystem/issues,2013-03-16,2020-04-14,
graph,lt3graph,Michiel Helvensteijn,,,,2014-02-05,2014-02-05,
-group,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+group,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
gtl,gtl,Bruno Le Floch,https://github.com/blefloch/latex-gtl,https://github.com/blefloch/latex-gtl.git,https://github.com/blefloch/latex-gtl/issues,2015-09-22,2015-09-22,
gzt,gzt,Denis Bitouzé,https://github.com/dbitouze/gzt,git@github.com:dbitouze/gzt.git,,2020-05-13,2020-05-13,
-hash,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-hbox,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-hcoffin,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+hash,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+hbox,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+hcoffin,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
hobete,hobete,Tobias Görlach,http://www.disk0s1.de,,,2012-11-07,2012-11-07,
-hook,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-03,2019-06-03,
-hyp,hyperref,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/hyperref.git,https://github.com/latex3/hyperref/issues,2020-11-27,2020-11-27,
-if,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-inf,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-insert,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
-int,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-intarray,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-04-06,2018-04-06,
-ior,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-iow,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+hook,lthooks,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2019-06-03,2021-01-20,
+hyp,hyperref,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/hyperref.git,https://github.com/latex3/hyperref/issues,2020-11-27,2020-11-27,
+if,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+inf,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+insert,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+int,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+intarray,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-04-06,2018-04-06,
+ior,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+iow,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
jiazhu,jiazhu,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2020-05-17,2020-05-17,
-kernel,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-keys,"l3kernel,l3keys2e",The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-keyval,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+kernel,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+keys,"l3kernel,l3keys2e",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+keyval,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
kgl,kantlipsum,Enrico Gregorio,,,,2013-03-16,2013-03-16,
-left,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+left,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
lltxmath,lualatex-math,Philipp Stephani,https://github.com/phst/lualatex-math,https://github.com/phst/lualatex-math.git,https://github.com/phst/lualatex-math/issues,2012-11-07,2012-11-07,
-log,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-lua,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-luatex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-mark,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-marks,l3kernel/xmarks,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-02-17,2020-02-17,
-math,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-max,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+log,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+lua,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+luatex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+mark,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+marks,l3kernel/xmarks,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-02-17,2020-02-17,
+math,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+max,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
mcrule,multicolrule,Karl Hagen,https://github.com/polysyllabic/multicolrule,https://github.com/polysyllabic/multicolrule.git,https://github.com/polysyllabic/multicolrule/issues,2018-12-24,2018-12-24,
mermap,mercatormap,Thomas F. Sturm,https://github.com/T-F-S/mercatormap,https://github.com/T-F-S/mercatormap.git,https://github.com/T-F-S/mercatormap/issues,2020-02-19,2020-02-19,
metrix,metrix,Tobias Weh,https://github.com/tweh/metrix,git@github.com:tweh/metrix.git,https://github.com/tweh/metrix/issues,2020-10-31,2019-10-09,
mhchem,mhchem,Martin Hensel,,,,2014-02-05,2014-02-05,
minibox,minibox,Will Robertson,,https://github.com/wspr/will2e.git,https://github.com/wspr/will2e/issues,2020-04-24,2020-04-24,
-minus,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+minus,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
mix,media9,Alexander Grahn,,https://gitlab.com/agrahn/media9,https://gitlab.com/agrahn/media9/issues,2013-01-18,2020-04-15,
-mode,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+mode,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
morewrites,morewrites,Bruno Le Floch,https://github.com/blefloch/latex-morewrites,https://github.com/blefloch/latex-morewrites.git,https://github.com/blefloch/latex-morewrites/issues,2013-03-16,2015-09-22,
-msg,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+msg,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
msvg,media4svg,Alexander Grahn,,https://gitlab.com/agrahn/media4svg,https://gitlab.com/agrahn/media4svg/issues,2020-04-15,2020-04-15,
-muskip,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+muskip,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
namedef,namedef,Phelype Oleinik,https://github.com/PhelypeOleinik/namedef,https://github.com/PhelypeOleinik/namedef.git,https://github.com/PhelypeOleinik/namedef/issues,2020-06-22,2020-06-22,
-nan,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+nan,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
nicematrix,nicematrix,François Pantigny,,,,2019-12-19,2019-12-19,
-nil,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-no,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+nil,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+no,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
notestobib,notes2bib,Joseph Wright,https://github.com/josephwright/notes2bib,https://github.com/josephwright/notes2bib.git,https://github.com/josephwright/notes2bib/issues,2012-11-07,2012-11-07,
-novalue,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+novalue,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
nwejm,nwejm,Denis Bitouzé,https://github.com/dbitouze/nwejm,git@github.com:dbitouze/nwejm.git,,2020-05-13,2020-05-13,
ocgbase,ocgx2,Alexander Grahn,,https://gitlab.com/agrahn/ocgx2,https://gitlab.com/agrahn/ocgx2/issues,2016-02-26,2020-04-15,
ocgxii,ocgx2,Alexander Grahn,,https://gitlab.com/agrahn/ocgx2,https://gitlab.com/agrahn/ocgx2/issues,2016-02-26,2020-04-15,
-one,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-or,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+one,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+or,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
overleaf,overleaf,Overleaf,https://www.overleaf.com/about,,support+tex-dev@overleaf.com,2020-05-27,2020-05-27,
-parameter,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+parameter,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
pbs,media9,Alexander Grahn,,https://gitlab.com/agrahn/media9,https://gitlab.com/agrahn/media9/issues,2016-02-26,2020-04-15,
-pdf,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
-pdfmanagement,l3pdfmanagement,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-11-27,2020-11-27,
+pdf,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
+pdfmanagement,l3pdfmanagement,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-11-27,2020-11-27,
pdfoverlay,pdfoverlay,David Purton,https://github.com/dcpurton/pdfoverlay,https://github.com/dcpurton/pdfoverlay.git,https://github.com/dcpurton/pdfoverlay/issues,2020-06-22,2020-06-22,
-pdftex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-peek,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-percent,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+pdftex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+peek,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+percent,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
pgf,pgf,The PGF/TikZ Team,https://pgf-tikz.github.io,https://github.com/pgf-tikz/pgf,https://github.com/pgf-tikz/pgf/issues,2020-07-03,2020-07-03,
-pi,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+pi,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
pkgploader,pkgploader,Michiel Helvensteijn,,,,2014-02-05,2014-02-05,
platex,platex,Japanese TeX Development Community,https://github.com/texjporg/platex,https://github.com/texjporg/platex.git,https://github.com/texjporg/platex/issues,2020-09-30,2020-09-30,
polyglossia,polyglossia,Arthur Reutenauer,https://www.polyglossia.org/,https://github.com/reutenauer/polyglossia,https://github.com/reutenauer/polyglossia/issues,2019-09-03,,
prelim,prelim2e,Marei Peischl,https://github.com/TeXhackse/prelim2e,https://github.com/TeXhackse/prelim2e.git,https://github.com/TeXhackse/prelim2e/issues,2020-11-24,2020-11-24,
-prg,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+prg,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
primargs,morewrites,Bruno Le Floch,https://github.com/blefloch/latex-morewrites,https://github.com/blefloch/latex-morewrites.git,https://github.com/blefloch/latex-morewrites/issues,2013-03-16,2015-09-22,
-prop,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+prop,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
pseudo,pseudo,Magnus Lie Hetland,https://github.com/mlhetland/pseudo.sty,https://github.com/mlhetland/pseudo.sty.git,https://github.com/mlhetland/pseudo.sty/issues,2019-06-24,2019-06-24,
-ptex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
+ptex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
ptxcd,ptxcd, Marei Peischl,,,,2020-07-27,2020-07-27,Used for specific corporate design templates
qrbill,qrbill,Marei Peischl,https://github.com/peiTeX/qrbill,https://github.com/peiTeX/qrbill.git,https://github.com/peiTeX/qrbill/issues,2020-06-27,2020-06-27,
-quark,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+quark,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
randomwalk,randomwalk,Bruno Le Floch,https://github.com/blefloch/latex-randomwalk,https://github.com/blefloch/latex-randomwalk.git,https://github.com/blefloch/latex-randomwalk/issues,2013-03-16,2015-09-22,
-recursion,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-ref,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-12-24,2020-12-24,
-regex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2018-04-06,
-reverse,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
-right,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+recursion,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+ref,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-12-24,2020-12-24,
+regex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2018-04-06,
+reverse,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+right,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
rivbook,rivbook,Julien Rivaud,,,,2018-06-13,2018-06-14,
rivmath,rivmath,Julien Rivaud,,,,2018-06-13,2018-06-13,
-scan,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+scan,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
scontents,scontents,Pablo González,https://github.com/pablgonz/scontents,git@github.com:pablgonz/scontents.git,https://github.com/pablgonz/scontents/issues,2019-12-05,2019-12-05,
sdaps,sdaps,Benjamin Berg,https://sdaps.org,https://github.com/sdaps/sdaps-class.git,https://github.com/sdaps/sdaps-class/issues,2020-02-17,2020-02-17,
-seq,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-shipout,ltshipout,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2020-10-01,2020-10-01,
+seq,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+shipout,ltshipout,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2020-10-01,2020-10-01,
siunitx,siunitx,Joseph Wright,https://github.com/josephwright/siunitx,https://github.com/josephwright/siunitx.git,https://github.com/josephwright/siunitx/issues,2012-11-04,2012-11-04,
skel,skeldoc,Magnus Lie Hetland,https://github.com/mlhetland/skeldoc.sty,https://github.com/mlhetland/skeldoc.sty.git,https://github.com/mlhetland/skeldoc.sty/issues,2021-01-04,2021-01-04,
-skip,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-sort,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2017-02-13,
-space,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+skip,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+sort,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2017-02-13,
+space,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
statistics,statistics,Julien Rivaud,https://gitlab.com/frnchfrgg-latex/statistics,https://gitlab.com/frnchfrgg-latex/statistics.git,https://gitlab.com/frnchfrgg-latex/statistics/issues,2018-06-25,2018-06-25,
stm,lt3-stm,CV Radhakrishnan,http://www.cvr.cc/,,,2014-02-26,2014-02-26,
-stop,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-str,"l3kernel,l3str,l3str-format",The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+stop,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+str,"l3kernel,l3str,l3str-format",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
substances,substances,Clemens Niederberger,https://github.com/cgnieder/substances/,https://github.com/cgnieder/substances.git,https://github.com/cgnieder/substances/issues,2013-03-16,2020-04-14,
-sys,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-09-07,2015-09-08,
-tag,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
+sys,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-09-07,2015-09-08,
+tag,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2019-06-02,2019-06-02,
tasks,tasks,Clemens Niederberger,https://github.com/cgnieder/tasks/,https://github.com/cgnieder/tasks.git,https://github.com/cgnieder/cgnieder/tasks/issues,2013-03-16,2020-04-14,
tcobox,tcolorbox,Thomas F. Sturm,https://github.com/T-F-S/tcolorbox,https://github.com/T-F-S/tcolorbox.git,https://github.com/T-F-S/tcolorbox/issues,2020-02-19,2020-02-19,
-term,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-tex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-text,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-01-15,2020-01-15,
+term,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+tex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+text,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-01-15,2020-01-15,
tikzsymbols,tikzsymbols,Ben Vitecek,https://github.com/Vidabe/tikzsymbols,https://github.com/Vidabe/tikzsymbols.git,https://github.com/Vidabe/tikzsymbols/issues,2018-09-26,2018-09-26,
-tilde,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-tl,"l3kernel,l3tl-analysis,l3tl-build",The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-tmpa,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-tmpb,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
-token,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+tilde,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+tl,"l3kernel,l3tl-analysis,l3tl-build",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+tmpa,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+tmpb,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+token,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
twmk,menukeys,Tobias Weh,https://github.com/tweh/menukeys,git@github.com:tweh/menukeys.git,https://github.com/tweh/menukeys/issues,2020-10-31,2020-10-31,“classic” L2 package using only some expl3 code
ufcombo,combofont,Ulrike Fischer,https://github.com/u-fischer/combofont,https://github.com/u-fischer/combofont,https://github.com/u-fischer/combofont/issues,2020-04-24,2020-04-24,
ufgrid,returntogrid,Ulrike Fischer,https://github.com/u-fischer/returntogrid,https://github.com/u-fischer/returntogrid,https://github.com/u-fischer/returntogrid/issues,2020-04-24,2020-04-24,
uftag,tagpdf,Ulrike Fischer,,,,2018-07-15,2018-07-15,
um,unicode-math,Will Robertson,https://github.com/wspr/unicode-math,https://github.com/wspr/unicode-math.git,https://github.com/wspr/unicode-math/issues,2013-03-16,2013-03-16,
-underscore,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+underscore,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
unravel,unravel,Bruno Le Floch,https://github.com/blefloch/latex-unravel,https://github.com/blefloch/latex-unravel.git,https://github.com/blefloch/latex-unravel/issues,2015-09-22,2015-09-22,
-uptex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
-use,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-utex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
-vbox,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-vcoffin,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
+uptex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
+use,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+utex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
+vbox,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+vcoffin,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
withargs,withargs,Michiel Helvensteijn,,,,2014-02-05,2014-02-05,
witharrows,witharrows,François Pantigny,,,,2019-12-19,2019-12-19,
xeCJK,xecjk,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-05-26,2013-05-26,
-xetex,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-xfrac,xfrac,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
-xparse,xparse,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+xetex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+xfrac,xfrac,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+xparse,xparse,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
xpatch,"regexpatch,xpatch",Enrico Gregorio,,,,2013-03-16,2013-03-16,
xpeek,xpeek,Joel C. Salomon,,,,2013-03-16,2013-03-16,
xpinyin,xpinyin,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-03-16,2013-05-26,
xsb,xsavebox,Alexander Grahn,,https://gitlab.com/agrahn/xsavebox,https://gitlab.com/agrahn/xsavebox/issues,2016-02-26,2020-04-15,
xsim,xsim,Clemens Niederberger,https://github.com/cgnieder/xsim/,https://github.com/cgnieder/xsim.git,https://github.com/cgnieder/xsim/issues,2020-04-14,2020-04-14,
-xtemplate,xtemplate,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+xtemplate,xtemplate,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
yoin,yoin,Tom Hejda,https://github.com/tohecz/yoin,https://github.com/tohecz/yoin.git,https://github.com/tohecz/yoin/issues,2016-02-22,2016-02-22,
-zero,l3kernel,The LaTeX3 Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+zero,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
zhlipsum,zhlipsum,Xiangdong Zeng,https://github.com/stone-zeng/zhlipsum,https://github.com/stone-zeng/zhlipsum.git,https://github.com/stone-zeng/zhlipsum/issues,2018-06-14,2018-06-14,
zhnum,zhnumber,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-03-16,2013-05-26,
zxjt,zxjatype,Takayuki Yato,,,,2013-03-16,2013-03-16,
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf
index a71383c327..613ca272b9 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/l3prefixes.tex b/macros/latex/contrib/l3kernel/l3prefixes.tex
index 23c5199f46..6c7cf24244 100644
--- a/macros/latex/contrib/l3kernel/l3prefixes.tex
+++ b/macros/latex/contrib/l3kernel/l3prefixes.tex
@@ -2,7 +2,7 @@
File:l3prefixes.tex
-Copyright (C) 2019 The LaTeX3 Project
+Copyright (C) 2019,2021 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
diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx
index 539bb5489b..0f707ad0e8 100644
--- a/macros/latex/contrib/l3kernel/l3prg.dtx
+++ b/macros/latex/contrib/l3kernel/l3prg.dtx
@@ -2,7 +2,7 @@
%
%% File: l3prg.dtx
%
-% Copyright (C) 2005-2021 The LaTeX3 Project
+% Copyright (C) 2005-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -353,6 +353,8 @@
% check that the \meta{boolean} really is a boolean variable.
% \end{function}
%
+% \subsection{Scratch booleans}
+%
% \begin{variable}{\l_tmpa_bool, \l_tmpb_bool}
% A scratch boolean for local assignment. It is never used by
% the kernel code, and so is safe for use with any \LaTeX3-defined
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index ea5d85a3fa..b278969850 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -2,7 +2,7 @@
%
%% File: l3prop.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx
index 17348c29ee..ab96c815d5 100644
--- a/macros/latex/contrib/l3kernel/l3quark.dtx
+++ b/macros/latex/contrib/l3kernel/l3quark.dtx
@@ -2,7 +2,7 @@
%
%% File: l3quark.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -260,7 +260,7 @@
% \cs[no-index]{\meta{type}_map_break:}.
% \end{function}
%
-% \section{An example of recursion with quarks}
+% \subsection{An example of recursion with quarks}
% \label{sec:l3quark:quark-example}
%
% Quarks are mainly used internally in the \pkg{expl3} code to define
diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx
index 9d52a75857..b9dbe7d270 100644
--- a/macros/latex/contrib/l3kernel/l3regex.dtx
+++ b/macros/latex/contrib/l3kernel/l3regex.dtx
@@ -2,7 +2,7 @@
%
%% File: l3regex.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx
index a7c22d7331..afd444f50d 100644
--- a/macros/latex/contrib/l3kernel/l3seq.dtx
+++ b/macros/latex/contrib/l3kernel/l3seq.dtx
@@ -2,7 +2,7 @@
%
%% File: l3seq.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx
index 13d88972bc..94aca857b0 100644
--- a/macros/latex/contrib/l3kernel/l3skip.dtx
+++ b/macros/latex/contrib/l3kernel/l3skip.dtx
@@ -2,8 +2,8 @@
%
%% File: l3skip.dtx
%
-% Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX3 Project
-% (C) 2012-2021 The LaTeX3 Project
+% Copyright (C) 2004-2011 Frank Mittelbach, The LaTeX Project
+% (C) 2012-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx
index a4fcbcfe6b..07e574abbf 100644
--- a/macros/latex/contrib/l3kernel/l3sort.dtx
+++ b/macros/latex/contrib/l3kernel/l3sort.dtx
@@ -2,7 +2,7 @@
%
%% File l3sort.dtx
%
-% Copyright (C) 2012-2021 The LaTeX3 Project
+% Copyright (C) 2012-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx
index 66c23b73ad..52066270d8 100644
--- a/macros/latex/contrib/l3kernel/l3str-convert.dtx
+++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx
@@ -2,7 +2,7 @@
%
%% File: l3str-convert.dtx
%
-% Copyright (C) 2013-2021 The LaTeX3 Project
+% Copyright (C) 2013-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx
index bbe072d2a0..b8a3186538 100644
--- a/macros/latex/contrib/l3kernel/l3str.dtx
+++ b/macros/latex/contrib/l3kernel/l3str.dtx
@@ -2,7 +2,7 @@
%
%% File: l3str.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -815,7 +815,7 @@
%
% \section{Constant token lists}
%
-% \begin{variable}[added = 2015-09-19]
+% \begin{variable}[added = 2015-09-19,updated=2020-12-22]
% {
% \c_ampersand_str,
% \c_atsign_str,
@@ -828,7 +828,8 @@
% \c_hash_str,
% \c_percent_str,
% \c_tilde_str,
-% \c_underscore_str
+% \c_underscore_str,
+% \c_zero_str
% }
% Constant strings, containing a single character token, with category
% code $12$.
@@ -1943,7 +1944,8 @@
% \c_hash_str,
% \c_percent_str,
% \c_tilde_str,
-% \c_underscore_str
+% \c_underscore_str,
+% \c_zero_str
% }
% For all of those strings, use \cs{cs_to_str:N} to get characters with
% the correct category code without worries
@@ -1960,6 +1962,7 @@
\str_const:Nx \c_percent_str { \cs_to_str:N \% }
\str_const:Nx \c_tilde_str { \cs_to_str:N \~ }
\str_const:Nx \c_underscore_str { \cs_to_str:N \_ }
+\str_const:Nx \c_zero_str { 0 }
% \end{macrocode}
% \end{variable}
%
diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf
index 81ae7f0b4e..2adb562237 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 c5013154a3..336d83c0f9 100644
--- a/macros/latex/contrib/l3kernel/l3styleguide.tex
+++ b/macros/latex/contrib/l3kernel/l3styleguide.tex
@@ -2,7 +2,7 @@
File: l3styleguide.tex
-Copyright (C) 2011,2012,2014-2021 The LaTeX3 Project
+Copyright (C) 2011,2012,2014-2021 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
@@ -25,14 +25,14 @@ The released version of this bundle is available from CTAN.
The \LaTeX3 kernel: style guide for code authors%
}
\author{%
- The \LaTeX3 Project\thanks
+ The \LaTeX{} Project\thanks
{%
E-mail:
\href{mailto:latex-team@latex-project.org}%
{latex-team@latex-project.org}%
}%
}
-\date{Released 2021-01-09}
+\date{Released 2021-02-02}
\begin{document}
diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf
index 9bf1317663..d4bdd5bd8d 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 3ae6759ea5..4a9cd46123 100644
--- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex
+++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex
@@ -2,7 +2,7 @@
File: l3syntax-changes.tex
-Copyright (C) 2011,2012,2017-2021 The LaTeX3 Project
+Copyright (C) 2011,2012,2017-2021 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
@@ -25,14 +25,14 @@ The released version of this bundle is available from CTAN.
Syntax changes in \LaTeX3 functions%
}
\author{%
- The \LaTeX3 Project\thanks
+ The \LaTeX{} Project\thanks
{%
E-mail:
\href{mailto:latex-team@latex-project.org}%
{latex-team@latex-project.org}%
}%
}
-\date{Released 2021-01-09}
+\date{Released 2021-02-02}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx
index 30a86af7d8..538b7b860b 100644
--- a/macros/latex/contrib/l3kernel/l3sys.dtx
+++ b/macros/latex/contrib/l3kernel/l3sys.dtx
@@ -2,7 +2,7 @@
%
%% File: l3sys.dtx
%
-% Copyright (C) 2015-2021 The LaTeX3 Project
+% Copyright (C) 2015-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf
index 8b35fa230c..275d749a38 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/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex
index 88f1bc395c..1825fed3a9 100644
--- a/macros/latex/contrib/l3kernel/l3term-glossary.tex
+++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex
@@ -2,7 +2,7 @@
File: l3term-glossary.tex
-Copyright (C) 2018-2021 The LaTeX3 Project
+Copyright (C) 2018-2021 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
@@ -25,14 +25,14 @@ The released version of this bundle is available from CTAN.
Glossary of \TeX{} terms used to describe \LaTeX3 functions%
}
\author{%
- The \LaTeX3 Project\thanks
+ The \LaTeX{} Project\thanks
{%
E-mail:
\href{mailto:latex-team@latex-project.org}%
{latex-team@latex-project.org}%
}%
}
-\date{Released 2021-01-09}
+\date{Released 2021-02-02}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx
index d1415b5a8c..2b84ae3b5c 100644
--- a/macros/latex/contrib/l3kernel/l3text-case.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-case.dtx
@@ -2,7 +2,7 @@
%
%% File: l3text-case.dtx
%
-% Copyright (C) 2020,2021 The LaTeX3 Project
+% Copyright (C) 2020,2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx
index 0241a11e60..1ded5b386f 100644
--- a/macros/latex/contrib/l3kernel/l3text-purify.dtx
+++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx
@@ -2,7 +2,7 @@
%
%% File: l3text-purify.dtx
%
-% Copyright (C) 2020,2021 The LaTeX3 Project
+% Copyright (C) 2020,2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx
index 7dcf87b3de..c374836616 100644
--- a/macros/latex/contrib/l3kernel/l3text.dtx
+++ b/macros/latex/contrib/l3kernel/l3text.dtx
@@ -2,7 +2,7 @@
%
%% File: l3text.dtx
%
-% Copyright (C) 2020,2021 The LaTeX3 Project
+% Copyright (C) 2020,2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
index 30ebe4814b..4a39de840d 100644
--- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx
@@ -2,7 +2,7 @@
%
%% File: l3tl-analysis.dtx
%
-% Copyright (C) 2011-2021 The LaTeX3 Project
+% Copyright (C) 2011-2021 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
@@ -36,7 +36,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx
index b31fe6e5e9..cc8183c7a1 100644
--- a/macros/latex/contrib/l3kernel/l3tl.dtx
+++ b/macros/latex/contrib/l3kernel/l3tl.dtx
@@ -2,7 +2,7 @@
%
%% File: l3tl.dtx
%
-% Copyright (C) 1990-2021 The LaTeX3 Project
+% Copyright (C) 1990-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -1453,12 +1453,14 @@
{ \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } }
\cs_new_protected:Npn \tl_gset:Nx #1#2
{ \__kernel_tl_gset:Nx #1 {#2} }
-\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Nf }
+\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Nf }
+\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , cf }
\cs_generate_variant:Nn \tl_set:Nx { c }
-\cs_generate_variant:Nn \tl_set:Nn { c, co , cV , cv , cf }
-\cs_generate_variant:Nn \tl_gset:Nn { NV , Nv , Nf }
+\cs_generate_variant:Nn \tl_set:No { c }
+\cs_generate_variant:Nn \tl_gset:Nn { NV , Nv , Nf }
+\cs_generate_variant:Nn \tl_gset:Nn { c, cV , cv , cf }
\cs_generate_variant:Nn \tl_gset:Nx { c }
-\cs_generate_variant:Nn \tl_gset:Nn { c, co , cV , cv , cf }
+\cs_generate_variant:Nn \tl_gset:No { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx
index c01bf675a4..5313d9d8f6 100644
--- a/macros/latex/contrib/l3kernel/l3token.dtx
+++ b/macros/latex/contrib/l3kernel/l3token.dtx
@@ -2,7 +2,7 @@
%
%% File: l3token.dtx
%
-% Copyright (C) 2005-2021 The LaTeX3 Project
+% Copyright (C) 2005-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -414,7 +414,7 @@
% verbatim-like material at the document level as they are not of categories
% \meta{letter} (catcode~$11$) or \meta{other} (catcode~$12$). Each entry in
% the sequence consists of a single escaped token, for example |\\| for the
-% backslash or |\{| for an opening brace.^^A \}
+% backslash or |\{| for an opening brace. ^^A \}
% Escaped tokens should be added to the sequence when they are defined for
% general document use.
% \end{variable}
diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx
index 76384b25a6..11fd169518 100644
--- a/macros/latex/contrib/l3kernel/l3unicode.dtx
+++ b/macros/latex/contrib/l3kernel/l3unicode.dtx
@@ -2,7 +2,7 @@
%
%% File: l3unicode.dtx
%
-% Copyright (C) 2018-2021 The LaTeX3 Project
+% Copyright (C) 2018-2021 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
@@ -35,7 +35,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-01-09}
+% \date{Released 2021-02-02}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf
index 05f9221ca1..87e2f72f2e 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/source3.tex b/macros/latex/contrib/l3kernel/source3.tex
index b1349ddcb7..7a1d21fb4d 100644
--- a/macros/latex/contrib/l3kernel/source3.tex
+++ b/macros/latex/contrib/l3kernel/source3.tex
@@ -2,7 +2,7 @@
File: source3.tex
-Copyright (C) 1990-2012,2017-2021 The LaTeX3 Project
+Copyright (C) 1990-2012,2017-2021 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
@@ -46,14 +46,14 @@ for those people who are interested.
\title{The \LaTeX3 Sources}
\author{%
- The \LaTeX3 Project\thanks
+ The \LaTeX{} Project\thanks
{%
E-mail:
\href{mailto:latex-team@latex-project.org}
{latex-team@latex-project.org}%
}%
}
-\date{Released 2021-01-09}
+\date{Released 2021-02-02}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex
index 483054416e..2f36e993ee 100644
--- a/macros/latex/contrib/l3kernel/source3body.tex
+++ b/macros/latex/contrib/l3kernel/source3body.tex
@@ -2,7 +2,7 @@
File: source3body.tex
-Copyright (C) 1990-2012,2014-2020 The LaTeX3 Project
+Copyright (C) 1990-2012,2014-2021 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
diff --git a/macros/latex/contrib/l3packages/CHANGELOG.md b/macros/latex/contrib/l3packages/CHANGELOG.md
index cc4089d0a4..05ef070996 100644
--- a/macros/latex/contrib/l3packages/CHANGELOG.md
+++ b/macros/latex/contrib/l3packages/CHANGELOG.md
@@ -7,6 +7,12 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2021-02-02]
+
+### Changed
+- Freeze the `xparse` code, and move the development to the LaTeX2e
+ repository as `ltcmd`.
+
## [2020-10-27]
### Changed
@@ -113,7 +119,8 @@ this project uses date-based 'snapshot' version identifiers.
- Switch to ISO date format
- Improve cross-module use of internal functions
-[Unreleased]: https://github.com/latex3/latex3/compare/2020-10-27...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2021-02-02...HEAD
+[2021-02-02]: https://github.com/latex3/latex3/compare/2020-10-27...2021-02-02
[2020-10-27]: https://github.com/latex3/latex3/compare/2020-10-05...2020-10-27
[2020-10-05]: https://github.com/latex3/latex3/compare/2020-05-15...2020-10-05
[2020-05-15]: https://github.com/latex3/latex3/compare/2020-05-14...2020-05-15
diff --git a/macros/latex/contrib/l3packages/README.md b/macros/latex/contrib/l3packages/README.md
index 4e93c60b23..f2629e7937 100644
--- a/macros/latex/contrib/l3packages/README.md
+++ b/macros/latex/contrib/l3packages/README.md
@@ -1,14 +1,14 @@
LaTeX3 High-Level Concepts
==========================
-Release 2020-10-27
+Release 2021-02-02
Overview
--------
The `l3packages` collection contains implementations for aspects of the
LaTeX3 kernel, dealing with higher-level ideas such as the Designer Interface.
-The packages here are considered broadly stable (The LaTeX3 Project does not
+The packages here are considered broadly stable (The LaTeX Project does not
expect the interfaces to alter radically). These packages are build on LaTeX2e
conventions at the interface level, and so may not migrate in the current form
to a stand-alone LaTeX3 format.
@@ -51,13 +51,18 @@ flexible split-level fractions _via_ the `\sfrac` macro. This is both a
demonstration of the power of the template concept and also a useful addition
to the available functionality in LaTeX2e.
-`xparse`
+`xparse` (deprecated)
-------
The `xparse` package provides a high-level interface for declaring document
commands, e.g., a uniform way to define commands taking optional arguments,
optional stars (and others), mandatory arguments and more.
+The development of `xparse` moved to the
+[LaTeX2e repository](https://github.com/latex3/latex2e) as `ltcmd`, which is
+preloaded in the LaTeX format, and the code for `xparse` in this repository
+contains only the deprecated argument types `G`, `l`, and `u`.
+
`xtemplate`
-----------
@@ -90,11 +95,11 @@ The issue tracker for LaTeX3 is currently located
Please report specific issues with LaTeX3 code there; more general
discussion should be directed to the [LaTeX-L list](#Discussion).
-The LaTeX3 Project
+The LaTeX Project
------------------
Development of LaTeX3 is carried out by
-[The LaTeX3 Project](https://www.latex-project.org/latex3/).
+[The LaTeX Project](https://www.latex-project.org/latex3/).
The development team can be contacted
by e-mail: <latex-team@latex-project.org>; for general LaTeX3 discussion
@@ -102,6 +107,6 @@ the [LaTeX-L list](#Discussion) should be used.
-----
-<p>Copyright (C) 1998-2012,2015-2020 The LaTeX3 Project <br />
+<p>Copyright (C) 1998-2012,2015-2021 The LaTeX Project <br />
<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
All rights reserved.</p>
diff --git a/macros/latex/contrib/l3packages/l3keys2e.dtx b/macros/latex/contrib/l3packages/l3keys2e.dtx
index b182df9e3b..cd3f5206a9 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.dtx
+++ b/macros/latex/contrib/l3packages/l3keys2e.dtx
@@ -2,7 +2,7 @@
%
%% File: l3keys2e.dtx
%
-% Copyright (C) 2009,2011-2020 The LaTeX3 Project
+% Copyright (C) 2009,2011-2021 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
@@ -54,7 +54,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -62,7 +62,7 @@
% }^^A
% }
%
-% \date{Released 2020-10-27}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -139,7 +139,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{l3keys2e}{2020-10-27}{}
+\ProvidesExplPackage{l3keys2e}{2021-02-02}{}
{LaTeX2e option processing using LaTeX3 keys}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/l3keys2e.ins b/macros/latex/contrib/l3packages/l3keys2e.ins
index a5d2f4e301..f5b81f896b 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.ins
+++ b/macros/latex/contrib/l3packages/l3keys2e.ins
@@ -2,7 +2,7 @@
File: l3keys2e.ins
-Copyright (C) 2009,2011,2012,2016,2017,2019,2020 The LaTeX3 Project
+Copyright (C) 2009,2011,2012,2016,2017,2019-2021 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
@@ -23,7 +23,7 @@ The released version of this bundle is available from CTAN.
\preamble
-Copyright (C) 2009-2020 The LaTeX3 Project
+Copyright (C) 2009-2021 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
diff --git a/macros/latex/contrib/l3packages/l3keys2e.pdf b/macros/latex/contrib/l3packages/l3keys2e.pdf
index b2b2017b57..4acecdf5e1 100644
--- a/macros/latex/contrib/l3packages/l3keys2e.pdf
+++ b/macros/latex/contrib/l3packages/l3keys2e.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xfp.dtx b/macros/latex/contrib/l3packages/xfp.dtx
index 6a0b66ef5a..7a86c63782 100644
--- a/macros/latex/contrib/l3packages/xfp.dtx
+++ b/macros/latex/contrib/l3packages/xfp.dtx
@@ -2,7 +2,7 @@
%
%% File: xfp.dtx
%
-% Copyright (C) 2017-2020 The LaTeX3 Project
+% Copyright (C) 2017-2021 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
@@ -56,7 +56,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -64,7 +64,7 @@
% }^^A
% }
%
-% \date{Released 2020-10-27}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -167,7 +167,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfp}{2020-10-27}{}
+\ProvidesExplPackage{xfp}{2021-02-02}{}
{L3 Floating point unit}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xfp.ins b/macros/latex/contrib/l3packages/xfp.ins
index 2439b0aae1..736445226b 100644
--- a/macros/latex/contrib/l3packages/xfp.ins
+++ b/macros/latex/contrib/l3packages/xfp.ins
@@ -2,7 +2,7 @@
File: xfp.ins
-Copyright (C) 2017,2019,2020 The LaTeX3 Project
+Copyright (C) 2017,2019-2021 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
@@ -23,7 +23,7 @@ The released version of this bundle is available from CTAN.
\preamble
-Copyright (C) 2017-2020 The LaTeX3 Project
+Copyright (C) 2017-2021 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
diff --git a/macros/latex/contrib/l3packages/xfp.pdf b/macros/latex/contrib/l3packages/xfp.pdf
index eff2203dc9..63d9c3bd2b 100644
--- a/macros/latex/contrib/l3packages/xfp.pdf
+++ b/macros/latex/contrib/l3packages/xfp.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xfrac.dtx b/macros/latex/contrib/l3packages/xfrac.dtx
index c7fe59aba8..dfdbf25f6a 100644
--- a/macros/latex/contrib/l3packages/xfrac.dtx
+++ b/macros/latex/contrib/l3packages/xfrac.dtx
@@ -3,7 +3,7 @@
%% File: xfrac.dtx
%
% Copyright (C) 2004,2008-2010 Morten Hoegholm
-% (C) 2011,2012,2014-2020 The LaTeX3 Project
+% (C) 2011,2012,2014-2021 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
@@ -57,7 +57,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -65,7 +65,7 @@
% }^^A
% }
%
-% \date{Released 2020-10-27}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -535,7 +535,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xfrac}{2020-10-27}{}
+\ProvidesExplPackage{xfrac}{2021-02-02}{}
{L3 Experimental split-level fractions}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xfrac.ins b/macros/latex/contrib/l3packages/xfrac.ins
index 9126baaab7..d08a89b6d3 100644
--- a/macros/latex/contrib/l3packages/xfrac.ins
+++ b/macros/latex/contrib/l3packages/xfrac.ins
@@ -3,7 +3,7 @@
File: xfrac.ins
Copyright (C) 2004,2008-2010 Morten Hoegholm
- (C) 2011,2012,2016,2017,2019,2020 The LaTeX3 Project
+ (C) 2011,2012,2016,2017,2019-2021 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
@@ -25,7 +25,7 @@ The released version of this bundle is available from CTAN.
\preamble
Copyright (C) 2004,2008-2010 Morten Hoegholm
- (C) 2011-2020 The LaTeX3 Project
+ (C) 2011-2021 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
diff --git a/macros/latex/contrib/l3packages/xfrac.pdf b/macros/latex/contrib/l3packages/xfrac.pdf
index 3861a6848a..04b7f9106f 100644
--- a/macros/latex/contrib/l3packages/xfrac.pdf
+++ b/macros/latex/contrib/l3packages/xfrac.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xparse-2018-04-12.sty b/macros/latex/contrib/l3packages/xparse-2018-04-12.sty
new file mode 100644
index 0000000000..ad25a91fe7
--- /dev/null
+++ b/macros/latex/contrib/l3packages/xparse-2018-04-12.sty
@@ -0,0 +1,2402 @@
+%%
+%% This is file `xparse-2018-04-12.sty', generated from
+%% xparse.dtx (with options: `core,package', on 2021-01-20)
+%% then adapted and frozen for compatibility. Development of
+%% xparse.dtx will continue in the LaTeX2e kernel as ltcmd.dtx.
+%%
+%% Copyright (C) 2009-2021 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:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3packages bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% File: xparse.dtx
+\RequirePackage{expl3}[2018-04-12]
+\@ifpackagelater{expl3}{2018-04-12}
+ {}
+ {%
+ \PackageError{xparse}{Support package l3kernel too old}
+ {%
+ Please install an up to date version of l3kernel\MessageBreak
+ using your TeX package manager or from CTAN.\MessageBreak
+ \MessageBreak
+ Loading xparse will abort!%
+ }%
+ \endinput
+ }
+% \ProvidesExplPackage{xparse}{2021-01-09}{}
+% {L3 Experimental document command parser}
+\expandafter\protected@xdef\csname ver@xparse.sty\endcsname
+ {2021-01-09 L3 Experimental document command parser}
+\ExplSyntaxOn
+\clist_new:N \l__xparse_options_clist
+\DeclareOption* { \clist_put_right:NV \l__xparse_options_clist \CurrentOption }
+\ProcessOptions \relax
+\keys_define:nn { xparse }
+ {
+ log-declarations .bool_set:N = \l__xparse_log_bool ,
+ log-declarations .initial:n = false
+ }
+\keys_set:nV { xparse } \l__xparse_options_clist
+\bool_if:NF \l__xparse_log_bool
+ { \msg_redirect_module:nnn { LaTeX / xparse } { info } { none } }
+\tl_new:N \l__xparse_arg_spec_tl
+\tl_new:N \l__xparse_args_tl
+\tl_new:N \l__xparse_args_i_tl
+\tl_new:N \l__xparse_args_ii_tl
+\int_new:N \l__xparse_current_arg_int
+\bool_new:N \l__xparse_defaults_bool
+\tl_new:N \l__xparse_defaults_tl
+\bool_new:N \l__xparse_environment_bool
+\str_new:N \l__xparse_environment_str
+\bool_new:N \l__xparse_expandable_bool
+\tl_new:N \l__xparse_expandable_aux_name_tl
+\tl_set:Nn \l__xparse_expandable_aux_name_tl
+ {
+ \l__xparse_function_tl \c_space_tl
+ ( arg~ \int_use:N \l__xparse_current_arg_int )
+ }
+\int_new:N \g__xparse_grabber_int
+\tl_new:N \l__xparse_fn_tl
+\tl_new:N \l__xparse_fn_code_tl
+\tl_new:N \l__xparse_function_tl
+\bool_new:N \l__xparse_grab_expandably_bool
+\bool_new:N \l__xparse_obey_spaces_bool
+\tl_new:N \l__xparse_last_delimiters_tl
+\bool_new:N \l__xparse_long_bool
+\int_new:N \l__xparse_m_args_int
+\bool_new:N \l__xparse_prefixed_bool
+\tl_new:N \l__xparse_process_all_tl
+\tl_new:N \l__xparse_process_one_tl
+\bool_new:N \l__xparse_process_some_bool
+\tl_new:N \l__xparse_saved_args_tl
+\tl_new:N \l__xparse_signature_tl
+\bool_new:N \l__xparse_some_obey_spaces_bool
+\bool_new:N \l__xparse_some_long_bool
+\bool_new:N \l__xparse_some_short_bool
+\prop_new:N \l__xparse_tmp_prop
+\tl_new:N \l__xparse_tmpa_tl
+\tl_new:N \l__xparse_tmpb_tl
+\cs_new_eq:NN \__xparse_tmp:w ?
+\cs_new_protected:Npn \__xparse_declare_cmd:Nnn
+ {
+ \bool_set_false:N \l__xparse_expandable_bool
+ \__xparse_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__xparse_declare_expandable_cmd:Nnn
+ {
+ \bool_set_true:N \l__xparse_expandable_bool
+ \__xparse_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_aux:Nnn #1#2#3
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_info:nnxx { xparse } { redefine-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ {
+ \bool_lazy_or:nnT
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ code } }
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ defaults } }
+ {
+ \__kernel_msg_warning:nnx { xparse } { unsupported-let }
+ { \token_to_str:N #1 }
+ }
+ \__kernel_msg_info:nnxx { xparse } { define-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__xparse_environment_bool
+ \__xparse_declare_cmd_internal:Nnnn #1 {#2} {#3} { }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_internal:Nnnn #1#2#3#4
+ {
+ \tl_set:Nx \l__xparse_function_tl { \cs_to_str:N #1 }
+ \tl_set:Nx \l__xparse_fn_tl
+ { \exp_not:c { \l__xparse_function_tl \c_space_tl } }
+ \__xparse_normalize_arg_spec:n {#2}
+ \exp_args:No \__xparse_prepare_signature:n \l__xparse_arg_spec_tl
+ \__xparse_declare_cmd_code:Nnn #1 {#2} {#3}
+ #4
+ \__xparse_break_point:n {#2}
+ }
+\cs_generate_variant:Nn \__xparse_declare_cmd_internal:Nnnn { cnx }
+\cs_new_eq:NN \__xparse_break_point:n \use_none:n
+\cs_new_protected:Npn \__xparse_declare_cmd_code:Nnn
+ {
+ \bool_if:NTF \l__xparse_grab_expandably_bool
+ { \__xparse_declare_cmd_code_expandable:Nnn }
+ { \__xparse_declare_cmd_code_aux:Nnn }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_code_aux:Nnn #1#2#3
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__xparse_function_tl \c_space_tl code }
+ \cs_set_protected:Npn \l__xparse_current_arg_int {#3}
+ \cs_set_protected_nopar:Npx #1
+ {
+ \bool_if:NTF \l__xparse_environment_bool
+ {
+ \__xparse_start_env:nnnnn { \exp_not:n {#2} }
+ { \l__xparse_environment_str }
+ }
+ {
+ \__xparse_start:nNNnnn { \exp_not:n {#2} }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl code }
+ }
+ { \exp_not:o \l__xparse_signature_tl }
+ {
+ \bool_if:NT \l__xparse_defaults_bool
+ { \exp_not:o \l__xparse_defaults_tl }
+ }
+ {
+ \bool_if:NT \l__xparse_process_some_bool
+ { \exp_not:o \l__xparse_process_all_tl }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_code_expandable:Nnn #1#2#3
+ {
+ \exp_args:Ncc \cs_generate_from_arg_count:NNnn
+ { \l__xparse_function_tl \c_space_tl code }
+ { cs_set \bool_if:NF \l__xparse_expandable_bool { _protected } :Npn }
+ \l__xparse_current_arg_int {#3}
+ \bool_if:NT \l__xparse_defaults_bool
+ {
+ \use:x
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__xparse_function_tl \c_space_tl defaults }
+ \cs_set:Npn \l__xparse_current_arg_int
+ { \exp_not:o \l__xparse_defaults_tl }
+ }
+ }
+ \bool_if:NTF \l__xparse_expandable_bool
+ { \cs_set_nopar:Npx } { \cs_set_protected_nopar:Npx } #1
+ {
+ \exp_not:N \__xparse_start_expandable:nNNNNn
+ { \exp_not:n {#2} }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl }
+ \exp_not:c
+ {
+ \l__xparse_function_tl \c_space_tl
+ \bool_if:NT \l__xparse_some_short_bool
+ { \bool_if:NT \l__xparse_some_long_bool { \c_space_tl } }
+ }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl code }
+ \bool_if:NTF \l__xparse_defaults_bool
+ { \exp_not:c { \l__xparse_function_tl \c_space_tl defaults } }
+ { ? }
+ { \exp_not:o \l__xparse_signature_tl }
+ }
+ \bool_if:NTF \l__xparse_some_long_bool
+ {
+ \bool_if:NT \l__xparse_some_short_bool
+ {
+ \cs_set_nopar:cpx { \l__xparse_function_tl \c_space_tl \c_space_tl }
+ ##1##2 { ##1 {##2} }
+ }
+ \cs_set:cpx
+ }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_function_tl \c_space_tl } ##1##2 { ##1 {##2} }
+ }
+\cs_new_protected:Npn \__xparse_declare_env:nnnn #1#2
+ {
+ \str_set:Nx \l__xparse_environment_str {#1}
+ \str_set:Nx \l__xparse_environment_str
+ { \tl_trim_spaces:o { \l__xparse_environment_str } }
+ \cs_if_exist:cTF { \l__xparse_environment_str }
+ {
+ \__kernel_msg_info:nnxx { xparse } { redefine-environment }
+ { \l__xparse_environment_str } { \tl_to_str:n {#2} }
+ }
+ {
+ \__kernel_msg_info:nnxx { xparse } { define-environment }
+ { \l__xparse_environment_str } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__xparse_expandable_bool
+ \bool_set_true:N \l__xparse_environment_bool
+ \exp_args:NV \__xparse_declare_env_internal:nnnn
+ \l__xparse_environment_str {#2}
+ }
+\cs_new_protected:Npn \__xparse_declare_env_internal:nnnn #1#2#3#4
+ {
+ \__xparse_declare_cmd_internal:cnxn { environment~ #1 } {#2}
+ {
+ \cs_set_nopar:Npx \exp_not:c { environment~ #1 ~end~aux }
+ {
+ \exp_not:N \exp_not:N \exp_not:c { environment~ #1~end~aux~ }
+ \exp_not:n { \exp_not:o \l__xparse_args_tl }
+ }
+ \exp_not:n {#3}
+ }
+ {
+ \cs_set_nopar:cpx { environment~ #1 ~end }
+ { \exp_not:c { environment~ #1 ~end~aux } }
+ \cs_generate_from_arg_count:cNnn
+ { environment~ #1 ~end~aux~ } \cs_set:Npn
+ \l__xparse_current_arg_int {#4}
+ \cs_set_eq:cc {#1} { environment~ #1 }
+ \cs_set_eq:cc { end #1 } { environment~ #1 ~end }
+ }
+ }
+\cs_new_protected:Npn \__xparse_start_env:nnnnn #1#2
+ {
+ \cs_if_exist_use:N \conditionally@traceoff
+ \group_align_safe_begin:
+ \str_set:Nn \l__xparse_environment_str {#2}
+ \bool_set_true:N \l__xparse_environment_bool
+ \__xparse_start_aux:ccnnnn
+ { environment~ \l__xparse_environment_str \c_space_tl }
+ { environment~ \l__xparse_environment_str \c_space_tl code }
+ {#1}
+ }
+\cs_new_protected:Npx \__xparse_start:nNNnnn #1#2#3
+ {
+ \exp_not:c { xparse~function~is~not~expandable }
+ \exp_not:n { \cs_if_exist_use:N \conditionally@traceoff }
+ \exp_not:N \group_align_safe_begin:
+ \exp_not:n { \bool_set_false:N \l__xparse_environment_bool }
+ \exp_not:N \__xparse_start_aux:NNnnnn
+ #2 #3 {#1}
+ }
+\cs_new_protected:Npn \__xparse_start_aux:NNnnnn #1#2#3#4#5#6
+ {
+ \tl_clear:N \l__xparse_args_tl
+ \tl_set:Nn \l__xparse_fn_tl {#1}
+ \tl_set:Nn \l__xparse_fn_code_tl {#2}
+ \tl_set:Nn \l__xparse_defaults_tl {#5}
+ \tl_set:Nn \l__xparse_process_all_tl {#6}
+ #4 \__xparse_run_code:
+ }
+\cs_generate_variant:Nn \__xparse_start_aux:NNnnnn { cc }
+\cs_new_protected:Npn \__xparse_run_code:
+ {
+ \tl_if_empty:NF \l__xparse_defaults_tl { \__xparse_defaults: }
+ \tl_if_empty:NF \l__xparse_process_all_tl { \__xparse_args_process: }
+ \group_align_safe_end:
+ \cs_if_exist_use:N \conditionally@traceon
+ \exp_after:wN \l__xparse_fn_code_tl \l__xparse_args_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults:
+ {
+ \__xparse_defaults_def:
+ \tl_set_eq:NN \l__xparse_args_i_tl \l__xparse_args_tl
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_error:w
+ \q_recursion_stop
+ \tl_set_eq:NN \l__xparse_args_tl \l__xparse_args_i_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults_aux:
+ {
+ \tl_set:Nx \l__xparse_args_ii_tl
+ { \exp_after:wN \__xparse_tmp:w \l__xparse_args_i_tl }
+ \tl_if_eq:NNT \l__xparse_args_ii_tl \l__xparse_args_i_tl
+ { \use_none_delimit_by_q_recursion_stop:w }
+ \tl_set_eq:NN \l__xparse_args_i_tl \l__xparse_args_ii_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults_error:w \q_recursion_stop
+ {
+ \__kernel_msg_error:nnx { xparse } { loop-in-defaults }
+ { \__xparse_environment_or_command: }
+ }
+\cs_new_protected:Npn \__xparse_defaults_def:
+ {
+ \tl_clear:N \l__xparse_tmpa_tl
+ \int_zero:N \l__xparse_current_arg_int
+ \__xparse_tl_mapthread_function:NNN \l__xparse_args_tl \l__xparse_defaults_tl
+ \__xparse_defaults_def:nn
+ \cs_generate_from_arg_count:NNVo \__xparse_tmp:w \cs_set:Npn
+ \l__xparse_current_arg_int \l__xparse_tmpa_tl
+ }
+\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo }
+\cs_new_protected:Npn \__xparse_defaults_def:nn
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \exp_args:NV \__xparse_defaults_def:nnn \l__xparse_current_arg_int
+ }
+\cs_new_protected:Npn \__xparse_defaults_def:nnn #1#2#3
+ {
+ \tl_put_right:Nx \l__xparse_tmpa_tl
+ {
+ {
+ \exp_not:N \exp_not:n
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_not:o {#3} }
+ { \exp_not:n { ## #1 } }
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_args_process:
+ {
+ \tl_clear:N \l__xparse_args_ii_tl
+ \__xparse_tl_mapthread_function:NNN
+ \l__xparse_args_tl
+ \l__xparse_process_all_tl
+ \__xparse_args_process_loop:nn
+ \tl_set_eq:NN \l__xparse_args_tl \l__xparse_args_ii_tl
+ }
+\cs_new_protected:Npn \__xparse_args_process_loop:nn #1#2
+ {
+ \tl_set:Nn \ProcessedArgument {#1}
+ \tl_if_novalue:nF {#1}
+ { \tl_map_function:nN {#2} \__xparse_args_process_aux:n }
+ \tl_put_right:No \l__xparse_args_ii_tl
+ { \exp_after:wN { \ProcessedArgument } }
+ }
+\cs_new_protected:Npn \__xparse_args_process_aux:n #1
+ {
+ \cs_generate_from_arg_count:NNnn \__xparse_tmp:w \cs_set:Npn
+ { \tl_count:N \l__xparse_args_tl } {#1}
+ \exp_args:NNNo \exp_after:wN \__xparse_tmp:w \l__xparse_args_tl
+ { \ProcessedArgument }
+ }
+\cs_new:Npn \__xparse_start_expandable:nNNNNn #1#2#3#4#5#6
+ {
+ \group_align_safe_begin:
+ #6 \__xparse_end_expandable:NNw #5 #4 \q__xparse #2#3
+ }
+\cs_new:Npn \__xparse_end_expandable:NNw #1#2
+ { \__xparse_end_expandable_aux:w #1#2 \prg_do_nothing: }
+\cs_new:Npn \__xparse_end_expandable_aux:w #1#2#3 \q__xparse
+ { \exp_args:No \__xparse_end_expandable_aux:nNNNN {#3} #1 #2 }
+\cs_new:Npn \__xparse_end_expandable_aux:nNNNN #1#2#3#4#5
+ {
+ \token_if_eq_charcode:NNT ? #2 { \exp_after:wN \use_iv:nnnn }
+ \__xparse_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3
+ { } { } { } { } { } { } { } { } { } { }
+ {
+ \__kernel_msg_expandable_error:nnf
+ { xparse } { loop-in-defaults }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } }
+ \use_iv:nnnn
+ }
+ \q_stop
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nnnNNn #1#2#3#4#5#6
+ {
+ #6
+ \str_if_eq:nnTF {#1} {#2}
+ { \use_i_delimit_by_q_stop:nw { \group_align_safe_end: #5 #1 } }
+ {
+ \exp_args:No \__xparse_tl_mapthread_function:nnN
+ { #4 #1 } {#3}
+ \__xparse_end_expandable_defaults:nnw
+ \__xparse_end_expandable_defaults:nnnNNn { } {#1} {#3} #4 #5
+ }
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nnw #1#2
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_args:No \__xparse_end_expandable_defaults:nw {#1} }
+ { \__xparse_end_expandable_defaults:nw {#2} }
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nw
+ #1#2 \__xparse_end_expandable_defaults:nnnNNn #3
+ { #2 \__xparse_end_expandable_defaults:nnnNNn { #3 {#1} } }
+\cs_new_protected:Npn \__xparse_normalize_arg_spec:n #1
+ {
+ \int_zero:N \l__xparse_current_arg_int
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \tl_clear:N \l__xparse_arg_spec_tl
+ \bool_set_true:N \l__xparse_grab_expandably_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_some_obey_spaces_bool
+ \bool_set_false:N \l__xparse_some_long_bool
+ \bool_set_false:N \l__xparse_some_short_bool
+ \__xparse_normalize_arg_spec_loop:n #1
+ \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop
+ \int_compare:nNnT \l__xparse_current_arg_int > 9
+ {
+ \__kernel_msg_error:nnxx { xparse } { too-many-arguments }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \tl_if_empty:NF \l__xparse_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx { xparse } { expandable-ending-optional }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+ \bool_if:NT \l__xparse_expandable_bool
+ { \bool_set_true:N \l__xparse_grab_expandably_bool }
+ \bool_if:NT \l__xparse_environment_bool
+ { \bool_set_false:N \l__xparse_grab_expandably_bool }
+ }
+\cs_new_protected:Npn \__xparse_normalize_arg_spec_loop:n #1
+ {
+ \quark_if_recursion_tail_stop:n {#1}
+ \int_incr:N \l__xparse_current_arg_int
+ \cs_if_exist_use:cF { __xparse_normalize_type_ \tl_to_str:n {#1} :w }
+ {
+ \__kernel_msg_error:nnxx { xparse } { unknown-argument-type }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new_protected:Npn \__xparse_normalize_type_d:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_D:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_e:w ##1
+ {
+ \quark_if_recursion_tail_stop_do:nn {##1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_E:w {##1} { }
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_o:w
+ { \__xparse_normalize_type_D:w [ ] {#1} }
+ \cs_new_protected:Npn \__xparse_normalize_type_O:w
+ { \__xparse_normalize_type_D:w [ ] }
+ \cs_new_protected:Npn \__xparse_normalize_type_r:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_R:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_s:w
+ { \__xparse_normalize_type_t:w * }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new_protected:Npx \__xparse_normalize_type_g:w
+ { \exp_not:N \__xparse_normalize_type_G:w { \exp_not:V \c_novalue_tl } }
+\cs_new_protected:cpn { __xparse_normalize_type_>:w } #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { processor-in-expandable }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \tl_put_right:Nx \l__xparse_arg_spec_tl { > { \tl_trim_spaces:n {#1} } }
+ \int_decr:N \l__xparse_current_arg_int
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_normalize_arg_spec_loop:n {#2}
+ }
+\cs_new_protected:cpn { __xparse_normalize_type_+:w } #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_long_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { two-markers }
+ { \__xparse_environment_or_command: } { + }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_true:N \l__xparse_long_bool
+ \int_decr:N \l__xparse_current_arg_int
+ \__xparse_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:cpn { __xparse_normalize_type_!:w } #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { two-markers }
+ { \__xparse_environment_or_command: } { ! }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_true:N \l__xparse_obey_spaces_bool
+ \bool_set_true:N \l__xparse_some_obey_spaces_bool
+ \int_decr:N \l__xparse_current_arg_int
+ \__xparse_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_D:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_token_check:n {#1} \__xparse_allowed_token_check:N #1
+ \__xparse_single_token_check:n {#2}
+ \__xparse_add_arg_spec:n { D #1 #2 {#3} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_E:w #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__xparse_bad_arg_spec:wn }
+ \tl_if_blank:nT {#1} { \__xparse_bad_arg_spec:wn }
+ \tl_map_function:nN {#1} \__xparse_single_token_check:n
+ \tl_map_function:nN {#1} \__xparse_allowed_token_check:N
+ \__xparse_normalize_E_unique_check:w #1 \q_nil \q_stop
+ \int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} }
+ { \__xparse_bad_arg_spec:wn }
+ \__xparse_add_arg_spec:n { E {#1} {#2} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \int_add:Nn \l__xparse_current_arg_int { \tl_count:n {#1} - 1 }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_E_unique_check:w #1#2 \q_stop
+ {
+ \quark_if_nil:NF #1
+ {
+ \tl_if_in:nnT {#2} {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_E_unique_check:w #2 \q_stop
+ }
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_G:w #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_check_gv:N G
+ \__xparse_add_arg_spec:n { G {#1} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl { { } }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_t:w #1
+ {
+ \quark_if_recursion_tail_stop_do:Nn #1 { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_token_check:n {#1} \__xparse_allowed_token_check:N #1
+ \tl_put_right:Nx \l__xparse_arg_spec_tl
+ {
+ \bool_if:NT \l__xparse_obey_spaces_bool { ! }
+ t \exp_not:n {#1}
+ }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \bool_set_false:N \l__xparse_long_bool
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_l:w
+ {
+ \__xparse_normalize_check_lu:N l
+ \__xparse_add_arg_spec_mandatory:n { l }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_m:w
+ {
+ \__xparse_delimiter_check:nnn { } { m } { \iow_char:N \{ }
+ \__xparse_add_arg_spec_mandatory:n { m }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_R:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_token_check:n {#1} \__xparse_allowed_token_check:N #1
+ \__xparse_single_token_check:n {#2}
+ \__xparse_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_add_arg_spec_mandatory:n { R #1 #2 {#3} }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_u:w #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_check_lu:N u
+ \__xparse_add_arg_spec_mandatory:n { u {#1} }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_v:w
+ {
+ \__xparse_normalize_check_gv:N v
+ \__xparse_add_arg_spec_mandatory:n { v }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_b:w #1
+ {
+ \bool_if:NF \l__xparse_environment_bool
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-command-arg }
+ { \__xparse_environment_or_command: } { b }
+ \__xparse_bad_def:wn
+ }
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \__xparse_add_arg_spec:n { b }
+ \quark_if_recursion_tail_stop:n {#1}
+ \__kernel_msg_error:nnxx { xparse } { arg-after-body }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+\cs_new_protected:Npn \__xparse_single_token_check:n #1
+ {
+ \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nF
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-single-token }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__xparse_allowed_token_check:N #1
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_begin_token
+ { \use:n }
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_end_token
+ { \use:n }
+ { \use_none:n }
+ }
+ {
+ \__kernel_msg_error:nnxxx
+ { xparse } { forbidden-implicit-group-token }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_begin_token
+ { begin } { end }
+ }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__xparse_normalize_check_gv:N #1
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-expandable-argument-type }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ }
+\cs_new_protected:Npn \__xparse_normalize_check_lu:N #1
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \tl_if_empty:NF \l__xparse_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-after-optional-expandably }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_delimiter_check:nnn #1#2#3
+ {
+ \tl_map_inline:Nn \l__xparse_last_delimiters_tl
+ {
+ \tl_if_eq:nnT {##1} {#1}
+ {
+ \__kernel_msg_warning:nnxx { xparse } { optional-mandatory }
+ {#2} {#3}
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_bad_arg_spec:wn #1 \__xparse_break_point:n #2
+ {
+ \__kernel_msg_error:nnxx { xparse } { bad-arg-spec }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#2} }
+ }
+\cs_new_protected:Npn \__xparse_bad_def:wn #1 \__xparse_break_point:n #2 { }
+\cs_new_protected:Npn \__xparse_add_arg_spec:n #1
+ {
+ \bool_lazy_and:nnT
+ { ! \l__xparse_long_bool }
+ { \l__xparse_some_long_bool }
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnx { xparse } { inconsistent-long }
+ { \iow_char:N \\ \l__xparse_function_tl }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ }
+ \bool_if:NTF \l__xparse_long_bool
+ { \bool_set_true:N \l__xparse_some_long_bool }
+ { \bool_set_true:N \l__xparse_some_short_bool }
+ \tl_put_right:Nx \l__xparse_arg_spec_tl
+ {
+ \bool_if:NT \l__xparse_long_bool { + }
+ \bool_if:NT \l__xparse_obey_spaces_bool { ! }
+ \exp_not:n {#1}
+ }
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ }
+\cs_new_protected:Npn \__xparse_add_arg_spec_mandatory:n #1
+ {
+ \bool_if:NT \l__xparse_some_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \__xparse_add_arg_spec:n {#1}
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature:n #1
+ {
+ \int_zero:N \l__xparse_current_arg_int
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \int_zero:N \l__xparse_m_args_int
+ \bool_set_false:N \l__xparse_defaults_bool
+ \tl_clear:N \l__xparse_defaults_tl
+ \tl_clear:N \l__xparse_process_all_tl
+ \tl_clear:N \l__xparse_process_one_tl
+ \bool_set_false:N \l__xparse_process_some_bool
+ \tl_clear:N \l__xparse_signature_tl
+ \__xparse_prepare_signature:N #1 \q_recursion_tail \q_recursion_stop
+ \bool_if:NF \l__xparse_expandable_bool { \__xparse_flush_m_args: }
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature:N
+ {
+ \bool_set_false:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature_bypass:N #1
+ {
+ \quark_if_recursion_tail_stop:N #1
+ \use:c
+ {
+ __xparse_add
+ \bool_if:NT \l__xparse_grab_expandably_bool { _expandable }
+ _type_ \token_to_str:N #1 :w
+ }
+ }
+\cs_new_protected:cpn { __xparse_add_type_+:w }
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_long_bool
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __xparse_add_type_!:w }
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_obey_spaces_bool
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __xparse_add_type_>:w } #1
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \bool_set_true:N \l__xparse_process_some_bool
+ \tl_put_left:Nn \l__xparse_process_one_tl { {#1} }
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_b:w
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N b
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_D:w #1#2#3
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#3}
+ \__xparse_add_grabber:N D
+ \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_E:w #1#2
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default_E:nn {#1} {#2}
+ \__xparse_add_grabber:N E
+ \tl_put_right:Nn \l__xparse_signature_tl { {#1} }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_G:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#1}
+ \__xparse_add_grabber:N G
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_l:w
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N l
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_m:w
+ {
+ \__xparse_add_default:
+ \bool_if:NTF \l__xparse_prefixed_bool
+ { \__xparse_add_grabber:N m }
+ { \int_incr:N \l__xparse_m_args_int }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_R:w #1#2#3
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#3}
+ \__xparse_add_grabber:N R
+ \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_t:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N t
+ \tl_put_right:Nn \l__xparse_signature_tl {#1}
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_u:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N u
+ \tl_put_right:Nn \l__xparse_signature_tl { {#1} }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_v:w
+ {
+ \__xparse_flush_m_args:
+ \exp_args:No \__xparse_add_default:n \c_novalue_tl
+ \__xparse_add_grabber:N v
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_flush_m_args:
+ {
+ \int_compare:nNnT \l__xparse_m_args_int > 0
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ { \exp_not:c { __xparse_grab_m_ \int_use:N \l__xparse_m_args_int :w } }
+ \tl_put_right:Nx \l__xparse_process_all_tl
+ { \prg_replicate:nn { \l__xparse_m_args_int } { { } } }
+ }
+ \int_zero:N \l__xparse_m_args_int
+ }
+\cs_new_protected:Npn \__xparse_add_grabber:N #1
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ {
+ \exp_not:c
+ {
+ __xparse_grab_ #1
+ \bool_if:NT \l__xparse_long_bool { _long }
+ \bool_if:NT \l__xparse_obey_spaces_bool { _obey_spaces }
+ :w
+ }
+ }
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \tl_put_right:Nx \l__xparse_process_all_tl
+ { { \exp_not:o \l__xparse_process_one_tl } }
+ \tl_clear:N \l__xparse_process_one_tl
+ }
+\cs_new_protected:Npn \__xparse_add_default:n #1
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__xparse_add_default: }
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \bool_set_true:N \l__xparse_defaults_bool
+ \tl_put_right:Nn \l__xparse_defaults_tl { { \prg_do_nothing: #1 } }
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_default:
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \tl_put_right:Nn \l__xparse_defaults_tl { \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_add_default_E:nn #1#2
+ {
+ \tl_map_function:nN {#2} \__xparse_add_default:n
+ \prg_replicate:nn
+ { \tl_count:n {#1} - \tl_count:n {#2} }
+ { \__xparse_add_default: }
+ }
+\cs_new_protected:cpn { __xparse_add_expandable_type_+:w }
+ {
+ \bool_set_true:N \l__xparse_long_bool
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D:w
+ { \__xparse_add_expandable_type_D_aux:NNNn D }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NNNn #1#2#3#4
+ {
+ \__xparse_add_default:n {#4}
+ \tl_if_eq:nnTF {#2} {#3}
+ { \__xparse_add_expandable_type_D_aux:NN #1 #2 }
+ { \__xparse_add_expandable_type_D_aux:NNN #1 #2 #3 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NNN #1#2#3
+ {
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_expandable_aux_name_tl } ##1 ##2 #2 ##3 \q__xparse ##4 #3
+ { ##1 {##2} {##3} {##4} }
+ \__xparse_add_expandable_grabber:nn {#1}
+ {
+ \exp_not:c { \l__xparse_expandable_aux_name_tl }
+ \exp_not:n { #2 #3 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NN #1#2
+ {
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_expandable_aux_name_tl } ##1 #2 ##2 #2
+ { ##1 {##2} }
+ \__xparse_add_expandable_grabber:nn { #1_alt }
+ {
+ \exp_not:c { \l__xparse_expandable_aux_name_tl }
+ \exp_not:n {#2}
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_E:w #1#2
+ {
+ \__xparse_add_default_E:nn {#1} {#2}
+ \tl_clear:N \l__xparse_tmpb_tl
+ \tl_map_function:nN {#1} \__xparse_add_expandable_type_E_aux:n
+ \__xparse_add_expandable_grabber:nn
+ { E \bool_if:NT \l__xparse_long_bool { _long } }
+ {
+ { \exp_not:o \l__xparse_tmpb_tl }
+ {
+ \prg_replicate:nn { \tl_count:n {#1} }
+ { { \c_novalue_tl } }
+ }
+ }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_E_aux:n #1
+ {
+ \__xparse_get_grabber:NN #1 \l__xparse_tmpa_tl
+ \tl_put_right:Nx \l__xparse_tmpb_tl
+ { \exp_not:o \l__xparse_tmpa_tl \exp_not:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_l:w
+ { \__xparse_add_expandable_type_u:w ## }
+\cs_new_protected:Npn \__xparse_add_expandable_type_m:w
+ {
+ \__xparse_add_default:
+ \__xparse_add_expandable_grabber:nn
+ { m \bool_if:NT \l__xparse_long_bool { _long } } { }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_R:w
+ { \__xparse_add_expandable_type_D_aux:NNNn R }
+\cs_new_protected:Npn \__xparse_add_expandable_type_t:w #1
+ {
+ \__xparse_add_default:
+ \__xparse_get_grabber:NN #1 \l__xparse_tmpa_tl
+ \__xparse_add_expandable_grabber:nn { t }
+ {
+ \exp_not:o \l__xparse_tmpa_tl
+ \exp_not:N #1
+ }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_u:w #1
+ {
+ \__xparse_add_default:
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpn }
+ { \cs_set_nopar:cpn }
+ { \l__xparse_expandable_aux_name_tl } ##1 \q__xparse ##2 ##3 ##4 #1
+ { ##1 {##4} \q__xparse ##2 ##3 }
+ \__xparse_add_expandable_grabber:nn { u }
+ { \exp_not:c { \l__xparse_expandable_aux_name_tl } }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_grabber:nn #1#2
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ { \exp_not:c { __xparse_expandable_grab_ #1 :w } #2 }
+ }
+\cs_new_protected:Npn \__xparse_get_grabber:NN #1#2
+ {
+ \cs_set:Npn \__xparse_tmp:w ##1 #1 {##1}
+ \exp_args:Nc \__xparse_get_grabber_auxi:NN
+ { __xparse_grabber_ \token_to_str:N #1 :w } #2
+ }
+\cs_new_protected:Npn \__xparse_get_grabber_auxi:NN #1#2
+ {
+ \cs_if_eq:NNTF \__xparse_tmp:w #1
+ { \tl_set:Nn #2 {#1} }
+ {
+ \cs_if_exist:NTF #1
+ {
+ \int_gincr:N \g__xparse_grabber_int
+ \exp_args:Nc \__xparse_get_grabber_auxi:NN
+ {
+ __xparse_grabber_
+ - \int_use:N \g__xparse_grabber_int :w
+ }
+ #2
+ }
+ { \__xparse_get_grabber_auxii:NN #1 #2 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_get_grabber_auxii:NN #1#2
+ {
+ \cs_set_eq:NN #1 \__xparse_tmp:w
+ \tl_set:Nn #2 {#1}
+ }
+\cs_new_protected:Npn \__xparse_grab_b:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__xparse_grab_b_long:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__xparse_grab_b_obey_spaces:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n }
+\cs_new_protected:Npn \__xparse_grab_b_long_obey_spaces:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n }
+\cs_new_protected:Npn \__xparse_grab_b_aux:NNw #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnN \begin \end {#3} #1
+ \tl_put_left:Nn \l__xparse_signature_tl { \__xparse_grab_b_end:Nw #2 }
+ \tl_set_eq:NN \l__xparse_saved_args_tl \l__xparse_args_tl
+ \tl_clear:N \l__xparse_args_tl
+ \exp_args:Nc \l__xparse_fn_tl { begin ~ }
+ }
+\cs_new_protected:Npn \__xparse_grab_b_end:Nw #1#2 \__xparse_run_code:
+ {
+ \tl_set:Nx \l__xparse_args_tl
+ {
+ \exp_not:V \l__xparse_saved_args_tl
+ { \exp_after:wN #1 \l__xparse_args_tl }
+ }
+ #2
+ \__xparse_run_code:
+ \end
+ }
+\cs_new_protected:Npn \__xparse_grab_D:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_long:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_obey_spaces:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_long_obey_spaces:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_aux:NNnNN #1#2#3#4#5
+ {
+ \__xparse_grab_D_aux:NNnN #1#2 {#3} #4
+ #5 #1
+ { \__xparse_grab_D_call:Nw #1 }
+ { \__xparse_add_arg:o \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_D_aux:NNnN #1#2#3#4
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#3}
+ \exp_after:wN #4 \l__xparse_fn_tl ##1 #2
+ {
+ \tl_if_in:nnTF {##1} {#1}
+ { \__xparse_grab_D_nested:NNnN #1 #2 {##1} #4 }
+ {
+ \tl_if_blank:oTF { \use_none:n ##1 }
+ { \__xparse_add_arg:o { \use_none:n ##1 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n ##1 } }
+ { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } }
+ { \__xparse_add_arg:o { \use_ii:nn ##1 } }
+ { \__xparse_add_arg:o { \use_none:n ##1 } }
+ }
+ }
+ }
+ }
+\tl_new:N \l__xparse_nesting_a_tl
+\tl_new:N \l__xparse_nesting_b_tl
+\quark_new:N \q__xparse
+\cs_new_protected:Npn \__xparse_grab_D_nested:NNnN #1#2#3#4
+ {
+ \tl_clear:N \l__xparse_nesting_a_tl
+ \tl_clear:N \l__xparse_nesting_b_tl
+ \exp_after:wN #4 \l__xparse_fn_tl ##1 #1 ##2 \q__xparse ##3 #2
+ {
+ \tl_put_right:No \l__xparse_nesting_a_tl { \use_none:n ##1 #1 }
+ \tl_put_right:No \l__xparse_nesting_b_tl { \use_i:nn #2 ##3 }
+ \tl_if_in:nnTF {##2} {#1}
+ {
+ \l__xparse_fn_tl
+ \q_nil ##2 \q__xparse \ERROR
+ }
+ {
+ \tl_put_right:Nx \l__xparse_nesting_a_tl
+ { \__xparse_grab_D_nested:w \q_nil ##2 \q_stop }
+ \tl_if_in:NnTF \l__xparse_nesting_b_tl {#1}
+ {
+ \tl_set_eq:NN \l__xparse_tmpa_tl \l__xparse_nesting_b_tl
+ \tl_clear:N \l__xparse_nesting_b_tl
+ \exp_after:wN \l__xparse_fn_tl \exp_after:wN
+ \q_nil \l__xparse_tmpa_tl \q_nil \q__xparse \ERROR
+ }
+ {
+ \tl_put_right:No \l__xparse_nesting_a_tl
+ \l__xparse_nesting_b_tl
+ \__xparse_add_arg:V \l__xparse_nesting_a_tl
+ }
+ }
+ }
+ \l__xparse_fn_tl #3 \q_nil \q__xparse \ERROR
+ }
+\cs_new:Npn \__xparse_grab_D_nested:w #1 \q_nil \q_stop
+ { \exp_not:o { \use_none:n #1 } }
+\cs_new_protected_nopar:Npn \__xparse_grab_D_call:Nw #1
+ {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \l__xparse_fn_tl \char_generate:nn { `#1 } { 11 }
+ }
+ {
+ \__xparse_token_if_cs:NTF #1
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \cs:w \cs_to_str:N #1 ~ \cs_end:
+ }
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \token_to_str:N #1
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_E:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_long:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_obey_spaces:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_long_obey_spaces:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E:nnNN #1#2#3#4
+ {
+ \exp_after:wN #3 \l__xparse_fn_tl ##1##2##3
+ {
+ \prop_put:Nnn \l__xparse_tmp_prop {##1} {##3}
+ \__xparse_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop
+ }
+ \prop_clear:N \l__xparse_tmp_prop
+ \tl_set:Nn \l__xparse_signature_tl {#2}
+ \cs_set_protected:Npn \__xparse_grab_E_finalise:
+ {
+ \tl_map_inline:nn {#1}
+ {
+ \prop_get:NnNF \l__xparse_tmp_prop {####1} \l__xparse_tmpb_tl
+ { \tl_set_eq:NN \l__xparse_tmpb_tl \c_novalue_tl }
+ \tl_put_right:Nx \l__xparse_args_tl
+ { { \exp_not:V \l__xparse_tmpb_tl } }
+ }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+ \__xparse_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new_protected:Npn \__xparse_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop
+ {
+ \cs_if_eq:NNTF #3 \q_recursion_tail
+ { \__xparse_grab_E_finalise: }
+ {
+ #1 #3
+ { \l__xparse_fn_tl #3 {#2#4} }
+ { \__xparse_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_E_finalise: { }
+\cs_new_protected:Npn \__xparse_grab_G:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_long:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn
+ \__xparse_peek_nonspace:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_obey_spaces:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
+ \peek_meaning:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_long_obey_spaces:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn
+ \peek_meaning:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_aux:nNN #1#2#3
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN #2 \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ #3 \c_group_begin_token
+ { \l__xparse_fn_tl }
+ { \__xparse_add_arg:o \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_l:w #1 \__xparse_run_code:
+ { \__xparse_grab_l_aux:nN {#1} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_l_long:w #1 \__xparse_run_code:
+ { \__xparse_grab_l_aux:nN {#1} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_l_aux:nN #1#2
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN #2 \l__xparse_fn_tl ##1##
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_m:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_protected_nopar:Npn \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_m_long:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_protected:Npn \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected_nopar:Npn \__xparse_grab_m_aux:Nnnnnnnnn #1#2#3#4#5#6#7#8#9
+ {
+ \tl_put_right:No \l__xparse_args_tl
+ { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+\cs_new_protected:cpn { __xparse_grab_m_1:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnnnn { } { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_2:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnnn { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_3:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnn { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_4:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnn { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_5:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnn { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_6:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nn { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_7:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:n { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_8:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \prg_do_nothing:
+ }
+\cs_new_protected:cpx { __xparse_grab_m_9:w }
+ {
+ \exp_not:c { __xparse_grab_m_5:w }
+ \exp_not:c { __xparse_grab_m_4:w }
+ }
+\cs_new_protected:Npn \__xparse_grab_R:w #1#2#3 \__xparse_run_code:
+ { \__xparse_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_R_long:w #1#2#3 \__xparse_run_code:
+ { \__xparse_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_R_aux:NNnN #1#2#3#4
+ {
+ \__xparse_grab_D_aux:NNnN #1 #2 {#3} #4
+ \__xparse_peek_nonspace_remove:NTF #1
+ { \__xparse_grab_D_call:Nw #1 }
+ {
+ \__kernel_msg_error:nnxx { xparse } { missing-required }
+ { \__xparse_environment_or_command: }
+ { \token_to_str:N #1 }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_t:w
+ { \__xparse_grab_t_aux:NNw \__xparse_peek_nonspace_remove:NTF }
+\cs_new_protected:Npn \__xparse_grab_t_obey_spaces:w
+ { \__xparse_grab_t_aux:NNw \__xparse_peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__xparse_grab_t_aux:NNw #1#2#3 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#3}
+ \exp_after:wN \cs_set_protected:Npn \l__xparse_fn_tl
+ {
+ #1 #2
+ { \__xparse_add_arg:n { \BooleanTrue } }
+ { \__xparse_add_arg:n { \BooleanFalse } }
+ }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_u:w #1#2 \__xparse_run_code:
+ { \__xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_u_long:w #1#2 \__xparse_run_code:
+ { \__xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_u_aux:nnN #1#2#3
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#2}
+ \exp_after:wN #3 \l__xparse_fn_tl ##1 #1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\tl_new:N \l__xparse_v_arg_tl
+\cs_new_protected:Npn \__xparse_grab_v:w
+ {
+ \bool_set_false:N \l__xparse_long_bool
+ \__xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__xparse_grab_v_long:w
+ {
+ \bool_set_true:N \l__xparse_long_bool
+ \__xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \group_begin:
+ \tex_escapechar:D = 92 \scan_stop:
+ \tl_clear:N \l__xparse_v_arg_tl
+ \peek_remove_spaces:n
+ {
+ \peek_meaning_remove:NTF \c_group_begin_token
+ {
+ \group_align_safe_end:
+ \__xparse_grab_v_bgroup:
+ }
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_aux_test:N }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_group_end:
+ {
+ \exp_args:NNNo
+ \group_end:
+ \tl_set:Nn \l__xparse_v_arg_tl { \l__xparse_v_arg_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_test:N #1
+ {
+ \__xparse_grab_v_token_if_char:NTF #1
+ {
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_aux_catcodes:
+ \__xparse_grab_v_aux_loop:N #1
+ }
+ { \__xparse_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop:N #1
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_aux_loop:NN #1 }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop:NN #1#2
+ {
+ \__xparse_grab_v_token_if_char:NTF #2
+ {
+ \token_if_eq_charcode:NNTF #1 #2
+ { \__xparse_grab_v_aux_loop_end: }
+ {
+ \__xparse_grab_v_aux_put:N #2
+ \__xparse_grab_v_aux_loop:N #1
+ }
+ }
+ { \__xparse_grab_v_aux_abort:n {#2} #2 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop_end:
+ {
+ \__xparse_grab_v_group_end:
+ \__xparse_add_arg:x { \tl_tail:N \l__xparse_v_arg_tl }
+ }
+\int_new:N \l__xparse_v_nesting_int
+\cs_new_protected:Npx \__xparse_grab_v_bgroup:
+ {
+ \exp_not:N \__xparse_grab_v_aux_catcodes:
+ \exp_not:n { \int_set:Nn \l__xparse_v_nesting_int { 1 } }
+ \exp_not:N \__xparse_grab_v_aux_put:N \iow_char:N \{
+ \exp_not:N \__xparse_grab_v_bgroup_loop:
+ }
+\cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_bgroup_loop:N }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:N #1
+ {
+ \__xparse_grab_v_token_if_char:NTF #1
+ {
+ \token_if_eq_charcode:NNTF \c_group_end_token #1
+ {
+ \int_decr:N \l__xparse_v_nesting_int
+ \int_compare:nNnTF \l__xparse_v_nesting_int > 0
+ {
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_bgroup_loop:
+ }
+ { \__xparse_grab_v_aux_loop_end: }
+ }
+ {
+ \token_if_eq_charcode:NNT \c_group_begin_token #1
+ { \int_incr:N \l__xparse_v_nesting_int }
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_bgroup_loop:
+ }
+ }
+ { \__xparse_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_catcodes:
+ {
+ \cs_set_eq:NN \do \char_set_catcode_other:N
+ \dospecials
+ \tex_endlinechar:D = `\^^M \scan_stop:
+ \bool_if:NTF \l__xparse_long_bool
+ { \char_set_catcode_other:n { \tex_endlinechar:D } }
+ { \char_set_catcode_parameter:n { \tex_endlinechar:D } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_abort:n #1
+ {
+ \__xparse_grab_v_group_end:
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 }
+ {
+ \__kernel_msg_error:nnxxx { xparse } { verbatim-newline }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:N \l__xparse_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ {
+ \__kernel_msg_error:nnxxx { xparse } { verbatim-tokenized }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:N \l__xparse_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_put:N #1
+ {
+ \tl_put_right:Nx \l__xparse_v_arg_tl
+ {
+ \token_if_active:NTF #1
+ { \exp_not:N #1 } { \token_to_str:N #1 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_token_if_char:NTF #1
+ { \str_if_eq:eeTF { } { \str_tail:n {#1} } }
+\cs_new_protected:Npn \__xparse_add_arg:n #1
+ {
+ \tl_put_right:Nn \l__xparse_args_tl { {#1} }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+\cs_generate_variant:Nn \__xparse_add_arg:n { V , o , x }
+\cs_new:Npn \__xparse_expandable_grab_D:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_D:NNNwNNn #1 \q__xparse #2 #3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_D:NNNwNNn ##1##2##3##4 \q__xparse ##5##6##7
+ {
+ \str_if_eq:nnTF {##2} {##7}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__xparse ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__xparse ##5##6 }
+ \q_nil { } ##2 \ERROR \q__xparse \ERROR
+ }
+ { ##4 {#1} \q__xparse ##5 ##6 {##7} }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_D:NNNwNNnnn #1#2#3#4 \q__xparse #5#6#7#8#9
+ {
+ \exp_args:Nof \__xparse_expandable_grab_D:nnNNNwNN
+ { \use_ii:nn #7 #2 }
+ { \__xparse_expandable_grab_D:Nw #3 \exp_stop_f: #8 #9 }
+ #1#2#3 #4 \q__xparse #5 #6
+ }
+\cs_new:Npn \__xparse_expandable_grab_D:Nw #1#2 \ERROR \ERROR { #2 #1 }
+\cs_new:Npn \__xparse_expandable_grab_D:nnNNNwNN #1#2#3#4#5#6 \q__xparse #7#8
+ {
+ \exp_args:No \tl_if_empty:oTF
+ { #3 { \use_none:nnn } #2 \q__xparse #5 #4 \q__xparse #5 }
+ {
+ \tl_if_blank:oTF { \use_none:nn #1#2 }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:nn #1#2 } }
+ { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_iii:nnn #1#2 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ }
+ #6 \q__xparse #7 #8
+ }
+ {
+ #3
+ { \__xparse_expandable_grab_D:NNNwNNnnn #3#4#5#6 \q__xparse #7 #8 }
+ \q_nil {#1} #2 \ERROR \q__xparse \ERROR
+ }
+ }
+\cs_new:Npn \__xparse_expandable_grab_D_alt:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_D_alt:NNwNNn #1 \q__xparse #2 #3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_D_alt:NNwNNn ##1##2##3 \q__xparse ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__xparse }
+ ##6 \ERROR
+ }
+ { ##3 {#1} \q__xparse ##4 ##5 {##6} }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_D_alt:NNwn #1#2#3 \q__xparse #4
+ {
+ \tl_if_blank:oTF { \use_none:n #4 }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #4 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n #4 } }
+ { { \exp_not:o { \use_ii:nnn #4 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_ii:nn #4 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #4 } }
+ }
+ #3 \q__xparse #1 #2
+ }
+\cs_new:Npn \__xparse_expandable_grab_E:w #1 \q__xparse #2#3
+ { \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2 #3 #3 }
+\cs_new:Npn \__xparse_expandable_grab_E_long:w #1 \q__xparse #2#3
+ { \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2 #3 #2 }
+\cs_new:Npn \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2#3#4
+ { #2 { \__xparse_expandable_grab_E_test:nnw #1 \q__xparse #2 #3 #4 } }
+\cs_new:Npn \__xparse_expandable_grab_E_test:nnw #1#2#3 \q__xparse #4#5#6#7
+ {
+ \__xparse_expandable_grab_E_loop:nnnNNw {#7} { } { }
+ #1 \q_nil \q_nil \q_nil \q_mark #2 \q_nil
+ #3 \q__xparse #4 #5 #6
+ }
+\cs_new:Npn \__xparse_expandable_grab_E_loop:nnnNNw
+ #1#2#3#4#5#6 \q_nil #7 \q_mark #8
+ {
+ \quark_if_nil:NTF #4
+ { \__xparse_expandable_grab_E_end:nnw {#1} {#3} }
+ {
+ \tl_if_novalue:nTF {#8}
+ { \str_if_eq:onTF { #4 { } #1 #5 } {#5} }
+ { \use_ii:nn }
+ { \__xparse_expandable_grab_E_find:w { #2 #4 #5 #6 } {#3} ~ }
+ {
+ \__xparse_expandable_grab_E_loop:nnnNNw
+ {#1} { #2 #4 #5 } { #3 {#8} }
+ #6 \q_nil #7 \q_mark
+ }
+ }
+ }
+\cs_new:Npn \__xparse_expandable_grab_E_find:w #1 \q__xparse #2#3#4
+ { #4 { \__xparse_expandable_grab_E_find:nnw #1 \q__xparse #2 #3 #4 } }
+\cs_new:Npn \__xparse_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q__xparse #5#6#7#8
+ { \__xparse_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q__xparse #5 #6 #7 }
+\cs_new:Npn \__xparse_expandable_grab_E_end:nnw #1#2#3 \q__xparse #4#5#6
+ { #3 #2 \q__xparse #4 #5 {#1} }
+\cs_new:Npn \__xparse_expandable_grab_m:w #1 \q__xparse #2#3
+ { #3 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_m_long:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2#3#4
+ { #1 {#4} \q__xparse #2 #3 }
+\cs_new:Npn \__xparse_expandable_grab_R:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_R_aux:NNNwNNn #1 \q__xparse #2#3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_R_aux:NNNwNNn ##1##2##3##4 \q__xparse ##5##6##7
+ {
+ \str_if_eq:nnTF {##7} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__xparse ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__xparse ##5##6 }
+ \q_nil { } ##2 \ERROR \q__xparse \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { xparse } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } }
+ { \tl_to_str:n {##2} }
+ ##4 {#1} \q__xparse ##5 ##6 {##7}
+ }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_R_alt:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_R_alt_aux:NNwNNn #1 \q__xparse #2#3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_R_alt_aux:NNwNNn ##1##2##3 \q__xparse ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__xparse }
+ ##6 \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { xparse } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } }
+ { \tl_to_str:n {##2} }
+ ##3 {#1} \q__xparse ##4 ##5 {##6}
+ }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_t:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_t_aux:NNwn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_t_aux:NNwn #1#2#3 \q__xparse #4#5#6
+ {
+ \str_if_eq:onTF { #1 { } #6 #2 } {#2}
+ { #3 { \BooleanTrue } \q__xparse #4 #5 }
+ { #3 { \BooleanFalse } \q__xparse #4 #5 {#6} }
+ }
+\cs_new_eq:NN \__xparse_expandable_grab_u:w \prg_do_nothing:
+\cs_new:Npn \__xparse_put_arg_expandable:nw #1#2 \q__xparse { #2 {#1} \q__xparse }
+\cs_generate_variant:Nn \__xparse_put_arg_expandable:nw { o }
+\cs_new_protected:Npn \__xparse_bool_reverse:N #1
+ {
+ \bool_if:NTF #1
+ { \tl_set:Nn \ProcessedArgument { \c_false_bool } }
+ { \tl_set:Nn \ProcessedArgument { \c_true_bool } }
+ }
+\seq_new:N \l__xparse_split_list_seq
+\tl_new:N \l__xparse_split_list_tl
+\cs_new_protected:Npn \__xparse_split_list:nn #1#2
+ {
+ \tl_if_single:nTF {#1}
+ {
+ \token_if_cs:NTF #1
+ { \__xparse_split_list_multi:nn {#1} {#2} }
+ { \__xparse_split_list_single:Nn #1 {#2} }
+ }
+ { \__xparse_split_list_multi:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__xparse_split_list_multi:nn #1#2
+ {
+ \seq_set_split:Nnn \l__xparse_split_list_seq {#1} {#2}
+ \tl_clear:N \ProcessedArgument
+ \seq_map_inline:Nn \l__xparse_split_list_seq
+ { \tl_put_right:Nn \ProcessedArgument { {##1} } }
+ }
+\cs_generate_variant:Nn \__xparse_split_list_multi:nn { nV }
+\group_begin:
+\char_set_catcode_active:N \^^@
+\cs_new_protected:Npn \__xparse_split_list_single:Nn #1#2
+ {
+ \tl_set:Nn \l__xparse_split_list_tl {#2}
+ \group_begin:
+ \char_set_lccode:nn { `\^^@ } { `#1 }
+ \tex_lowercase:D
+ {
+ \group_end:
+ \tl_replace_all:Nnn \l__xparse_split_list_tl { ^^@ }
+ } {#1}
+ \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
+ }
+\group_end:
+\cs_new_protected:Npn \__xparse_split_argument:nnn #1#2#3
+ {
+ \__xparse_split_list:nn {#2} {#3}
+ \exp_args:Nf \__xparse_split_argument_aux:nnnn
+ { \tl_count:N \ProcessedArgument }
+ {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \__xparse_split_argument_aux:nnnn #1#2#3#4
+ {
+ \int_compare:nNnF {#1} = { #2 + 1 }
+ {
+ \int_compare:nNnTF {#1} > { #2 + 1 }
+ {
+ \tl_set:Nx \ProcessedArgument
+ {
+ \exp_last_unbraced:NnNo
+ \__xparse_split_argument_aux:n
+ { #2 + 1 }
+ \use_none_delimit_by_q_stop:w
+ \ProcessedArgument
+ \q_stop
+ }
+ \__kernel_msg_error:nnxxx { xparse } { split-excess-tokens }
+ { \tl_to_str:n {#3} } { \int_eval:n { #2 + 1 } }
+ { \tl_to_str:n {#4} }
+ }
+ {
+ \tl_put_right:Nx \ProcessedArgument
+ {
+ \prg_replicate:nn { #2 + 1 - (#1) }
+ { { \exp_not:V \c_novalue_tl } }
+ }
+ }
+ }
+ }
+\cs_new:Npn \__xparse_split_argument_aux:n #1
+ { \prg_replicate:nn {#1} { \__xparse_split_argument_aux:wn } }
+\cs_new:Npn \__xparse_split_argument_aux:wn #1 \use_none_delimit_by_q_stop:w #2
+ {
+ \exp_not:n { {#2} }
+ #1
+ \use_none_delimit_by_q_stop:w
+ }
+\cs_new_protected:Npn \__xparse_trim_spaces:n #1
+ { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error:N #1
+ {
+ \bool_set_false:N \l__xparse_environment_bool
+ \tl_set:Nn \l__xparse_fn_tl {#1}
+ \__xparse_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error:n #1
+ {
+ \bool_set_true:N \l__xparse_environment_bool
+ \str_set:Nx \l__xparse_environment_str {#1}
+ \__xparse_get_arg_spec_error_aux:n
+ { \cs_if_exist:cTF { \l__xparse_environment_str } }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error_aux:n #1
+ {
+ #1
+ {
+ \__kernel_msg_error:nnx { xparse } { non-xparse }
+ { \__xparse_environment_or_command: }
+ }
+ {
+ \__kernel_msg_error:nnx { xparse } { unknown }
+ { \__xparse_environment_or_command: }
+ }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:NTF #1#2#3
+ {
+ \__xparse_cmd_if_xparse:NTF #1
+ {
+ \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ #2
+ }
+ {#3}
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:N #1
+ {
+ \__xparse_get_arg_spec:NTF #1 { }
+ { \__xparse_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:n #1
+ {
+ \exp_args:Nc \__xparse_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { }
+ { \__xparse_get_arg_spec_error:n {#1} }
+ }
+\tl_new:N \ArgumentSpecification
+\cs_new_protected:Npn \__xparse_show_arg_spec:N #1
+ {
+ \__xparse_get_arg_spec:NTF #1
+ { \tl_show:N \ArgumentSpecification }
+ { \__xparse_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_show_arg_spec:n #1
+ {
+ \exp_args:Nc \__xparse_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { \tl_show:N \ArgumentSpecification }
+ { \__xparse_get_arg_spec_error:n {#1} }
+ }
+\cs_new_protected:Npn \__xparse_check_definable:nNT #1
+ { \tl_trim_spaces_apply:nN {#1} \__xparse_check_definable_aux:nN }
+\group_begin:
+ \char_set_catcode_active:n { `? }
+ \cs_new_protected:Npn \__xparse_check_definable_aux:nN #1#2
+ {
+ \group_begin:
+ \tl_if_single_token:nTF {#1}
+ {
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `? }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
+ { \group_end: \use_iii:nnn }
+ { \group_end: \use_i:nnn }
+ }
+ { \group_end: \use_iii:nnn }
+ }
+ { \group_end: \use_ii:nnn }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-definable }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-one-token }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ }
+\group_end:
+\cs_new_protected:Npn \__xparse_token_if_cs:NTF #1
+ {
+ \group_begin:
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ { \group_end: \use_ii:nn }
+ { \group_end: \use_i:nn }
+ }
+\cs_new:Npn \__xparse_tl_mapthread_function:NNN #1#2#3
+ {
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN \__xparse_tl_mapthread_loop:w
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN #3
+ \exp_after:wN #1
+ \exp_after:wN \q_recursion_tail
+ \exp_after:wN \q_mark
+ #2
+ \q_recursion_tail
+ \q_recursion_stop
+ }
+\cs_new:Npn \__xparse_tl_mapthread_function:nnN #1#2#3
+ {
+ \__xparse_tl_mapthread_loop:w #3
+ #1 \q_recursion_tail \q_mark
+ #2 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new:Npn \__xparse_tl_mapthread_loop:w #1#2#3 \q_mark #4
+ {
+ \quark_if_recursion_tail_stop:n {#2}
+ \quark_if_recursion_tail_stop:n {#4}
+ #1 {#2} {#4}
+ \__xparse_tl_mapthread_loop:w #1#3 \q_mark
+ }
+\cs_new_protected:Npn \__xparse_cmd_if_xparse:NTF #1
+ {
+ \exp_args:Nf \str_case_e:nnTF
+ {
+ \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
+ {
+ \exp_last_unbraced:Nf \__xparse_cmd_if_xparse_aux:w
+ { \cs_replacement_spec:N #1 } ~ \q_stop
+ }
+ }
+ {
+ { \token_to_str:N \__xparse_start:nNNnnn } { }
+ { \token_to_str:N \__xparse_start_expandable:nNNNNn } { }
+ { \token_to_str:N \__xparse_start_env:nnnnn } { }
+ }
+ }
+\cs_new:Npn \__xparse_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1}
+\cs_new_protected:Npn \__xparse_peek_nonspace:NTF
+ { \__xparse_peek_nonspace_aux:nNNTF { } \__xparse_peek_meaning:NTF }
+\cs_new_protected:Npn \__xparse_peek_nonspace_remove:NTF
+ { \__xparse_peek_nonspace_aux:nNNTF { } \__xparse_peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__xparse_peek_nonspace_aux:nNNTF #1#2#3#4#5
+ {
+ \peek_meaning_remove:NTF \c_space_token
+ { \__xparse_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} }
+ { #2 #3 { #4 } { #5 #1 } }
+ }
+\cs_new_protected:Npn \__xparse_peek_meaning:NTF
+ { \__xparse_peek_meaning_aux:NNTF \c_false_bool }
+\cs_new_protected:Npn \__xparse_peek_meaning_remove:NTF
+ { \__xparse_peek_meaning_aux:NNTF \c_true_bool }
+\cs_new_protected:Npn \__xparse_peek_meaning_aux:NNTF #1#2#3#4
+ {
+ \tl_set:Nn \l__xparse_tmpa_tl {#3}
+ \tl_set:Nn \l__xparse_tmpb_tl {#4}
+ \peek_meaning:NTF #2
+ {
+ \token_if_eq_meaning:NNTF #2 \c_group_begin_token
+ { \__xparse_peek_true_remove:Nw #1 }
+ {
+ \__xparse_token_if_cs:NTF #2
+ { \__xparse_peek_cs_check_equal:NNN #1 #2 }
+ { \__xparse_peek_true_remove:Nw #1 }
+ }
+ }
+ { \l__xparse_tmpb_tl }
+ }
+\cs_new_protected:Npn \__xparse_peek_cs_check_equal:NNN #1#2#3
+ {
+ \str_if_eq:nnTF {#2} {#3}
+ { \__xparse_peek_true_remove:Nw #1 }
+ { \l__xparse_tmpb_tl }
+ #3
+ }
+\cs_new_protected:Npn \__xparse_peek_true_remove:Nw #1
+ {
+ \bool_if:NTF #1
+ {
+ \tex_afterassignment:D \l__xparse_tmpa_tl
+ \cs_set_eq:NN \__xparse_tmp:w
+ }
+ { \l__xparse_tmpa_tl }
+ }
+\cs_new:Npn \__xparse_environment_or_command:
+ {
+ \bool_if:NTF \l__xparse_environment_bool
+ { environment ~ ' \l__xparse_environment_str ' }
+ {
+ command ~ '
+ \exp_args:Nf \tl_trim_spaces:n
+ { \exp_after:wN \token_to_str:N \l__xparse_fn_tl }
+ '
+ }
+ }
+\tl_const:Nn \c__xparse_ignore_def_tl
+ { \\ \\ LaTeX~will~ignore~this~entire~definition. }
+\__kernel_msg_new:nnnn { xparse } { arg-after-body }
+ { In~the~definition~of~#1,~b~(body)~argument~must~be~last. }
+ {
+ The~'body'~argument~type~is~followed~by~'#2'~in~the~argument~
+ specification~of~the~#1.~This~is~not~allowed.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { bad-arg-spec }
+ { Bad~argument~specification~'#2'~for~#1. }
+ {
+ The~argument~specification~provided~was~not~valid:~
+ one~or~more~mandatory~pieces~of~information~were~missing.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { command-already-defined }
+ { Command~'#1'~already~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { xparse } { command-not-yet-defined }
+ { Command ~'#1'~not~yet~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~was~never~defined.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { environment-already-defined }
+ { Environment~'#1'~already~defined! }
+ {
+ You~have~used~\NewDocumentEnvironment
+ with~an~environment~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { xparse } { environment-not-yet-defined }
+ { Environment~'#1'~not~yet~defined! }
+ {
+ You~have~used~\RenewDocumentEnvironment
+ with~an~environment~that~was~never~defined.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { expandable-ending-optional }
+ {
+ Argument~specification~'#2'~for~expandable~command~'#1'~
+ ends~with~optional~argument.
+ }
+ {
+ Expandable~commands~must~have~a~final~mandatory~argument~
+ (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
+ argument~with~expandable~commands.
+ }
+\__kernel_msg_new:nnnn { xparse } { inconsistent-long }
+ { Inconsistent~long~arguments~for~expandable~command~'#1'. }
+ {
+ The~arguments~for~an~expandable~command~must~not~involve~short~
+ arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types.
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-command-arg }
+ { Argument~type~'#2'~not~available~for~#1. }
+ {
+ The~letter~'#2'~can~only~be~used~in~environment~argument~
+ specifications,~not~for~commands.
+ \\ \\
+ LaTeX~will~ignore~this~entire~definition.
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-expandable-argument-type }
+ { Argument~type~'#2'~not~available~for~expandable~command~'#1'. }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-after-optional-expandably }
+ {
+ Argument~type~'#2'~not~available~after~optional~argument~
+ for~expandable~command~'#1'.
+ }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command~after~an~optional~argument.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces }
+ { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. }
+ {
+ The~prefix~'!'~can~only~apply~to~trailing~optional~arguments.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-definable }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~
+ backslash~is~missing?
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-one-token }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~contains~more~than~one~
+ token.~Perhaps~a~backslash~is~missing?
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-single-token }
+ {
+ Argument~delimiter~'#2'~for~the~#1~should~be~
+ a~single~non-space~token.
+ }
+ {
+ The~argument~specification~provided~was~not~valid:~in~a~place~
+ where~a~single~token~is~required,~LaTeX~found~'#2'.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { forbidden-implicit-group-token }
+ { Argument~delimiter~'#2'~for~the~#1~is~not~allowed. }
+ {
+ The~argument~specification~provided~was~not~valid:~the~implicit~
+ #3-group~token~'#2'~is~not~allowed~as~an~argument~delimiter.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { processor-in-expandable }
+ { Argument~processor~'>{#2}'~cannot~be~used~for~the~expandable~command~'#1'. }
+ {
+ The~argument~specification~for~#1~contains~a~processor~function:~
+ this~is~only~supported~for~standard~robust~commands.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { too-many-arguments }
+ { Too~many~arguments~in~argument~specification~'#2'~of~#1. }
+ {
+ The~argument~specification~provided~has~more~than~9~arguments.~
+ This~cannot~be~implemented.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { two-markers }
+ { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~#1. }
+ {
+ The~argument~specification~provided~has~two~markers~'#2'~applying~
+ to~the~same~argument;~these~are~redundant.
+ }
+\__kernel_msg_new:nnnn { xparse } { unknown-argument-type }
+ { Unknown~argument~type~'#2'~for~the~#1. }
+ {
+ The~letter~'#2'~does~not~specify~a~known~argument~type.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { xparse-argument-type }
+ { Deprecated~argument~type~'#2'~for~the~#1~requires~xparse. }
+ {
+ The~letter~'#2'~specifies~a~known~argument~type~that~requires~
+ the~xparse~package.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnn { xparse } { if-boolean }
+ { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
+\__kernel_msg_new:nnnn { xparse } { loop-in-defaults }
+ { Defaults~of~#1~have~circular~dependency. }
+ {
+ The~default~values~of~two~or~more~arguments~of~the~#1~
+ depend~on~each~other~in~a~way~that~cannot~be~resolved.
+ }
+\__kernel_msg_new:nnnn { xparse } { missing-required }
+ { Missing~required~argument~for~#1. }
+ {
+ The~current~#1~expects~an~argument~starting~with~'#2'.~
+ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed.
+ }
+\__kernel_msg_new:nnnn { xparse } { non-xparse }
+ { \str_uppercase:n #1~not~defined~using~xparse. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~this~was~not~defined~using~xparse.
+ }
+\__kernel_msg_new:nnnn { xparse } { split-excess-tokens }
+ { Too~many~'#1'~tokens~when~trying~to~split~argument. }
+ {
+ LaTeX~was~asked~to~split~the~input~'#3'~
+ at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~
+ There~were~too~many~'#1'~tokens.
+ }
+\__kernel_msg_new:nnnn { xparse } { unknown }
+ { Unknown~document~#1. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~it~is~not~defined.
+ }
+\__kernel_msg_new:nnnn { xparse } { verbatim-newline }
+ { Verbatim~argument~of~#1~ended~by~end~of~line. }
+ {
+ The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
+ but~the~end~
+ of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
+ closing~delimiter.
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnnn { xparse } { verbatim-tokenized }
+ { The~verbatim~#1~cannot~be~used~inside~an~argument. }
+ {
+ The~#1~takes~a~verbatim~argument.~
+ It~may~not~appear~within~the~argument~of~another~function.~
+ It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnn { xparse } { define-command }
+ {
+ Defining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { define-environment }
+ {
+ Defining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { redefine-command }
+ {
+ Redefining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { redefine-environment }
+ {
+ Redefining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { optional-mandatory }
+ {
+ Since~the~mandatory~argument~'#1'~has~the~same~delimiter~'#2'~
+ as~a~previous~optional~argument,~it~will~not~be~possible~to~
+ omit~all~optional~arguments~when~calling~this~command.
+ }
+\__kernel_msg_new:nnn { xparse } { unsupported-let }
+ {
+ The~command~'#1'~was~undefined~but~not~the~associated~commands~
+ '#1~code'~and/or~'#1~defaults'.~Maybe~you~tried~using~
+ \iow_char:N\\let.~This~may~lead~to~an~infinite~loop.
+ }
+\cs_new_eq:NN \BooleanFalse \c_false_bool
+\cs_new_eq:NN \BooleanTrue \c_true_bool
+\cs_new_protected:Npn \NewDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \NewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewDocumentCommand }
+ }
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \RenewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \ProvideDocumentCommand
+ { \cs_if_exist:NF #1 { \__xparse_declare_cmd:Nnn #1 {#2} {#3} } }
+ }
+\cs_new_protected:Npn \DeclareDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \DeclareDocumentCommand
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__kernel_msg_error:nnx { xparse } { environment-already-defined } {#1} }
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ { \__kernel_msg_error:nnx { xparse } { environment-not-yet-defined } {#1} }
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ { \cs_if_exist:cF {#1} { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} } }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \NewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewExpandableDocumentCommand }
+ }
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \RenewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewExpandableDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \ProvideExpandableDocumentCommand
+ {
+ \cs_if_exist:NF #1
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \DeclareExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \DeclareExpandableDocumentCommand
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new:Npn \IfBooleanTF #1
+ {
+ \tl_if_single:nF {#1}
+ { \prg_break:n { \use:n } }
+ \tl_if_single_token:nF #1
+ { \prg_break:n { \use:n } }
+ \token_if_eq_meaning:NNT #1 \c_true_bool
+ { \prg_break:n { \use_ii:nnn } }
+ \token_if_eq_meaning:NNT #1 \c_false_bool
+ { \prg_break:n { \use_iii:nnn } }
+ \prg_break:n { \use:n }
+ \prg_break_point:
+ {
+ \__kernel_msg_expandable_error:nnn { xparse } { if-boolean } {#1}
+ \use_ii:nn
+ }
+ }
+\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
+\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
+\cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF
+\cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT
+\cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF
+\cs_new:Npn \IfValueF { \tl_if_novalue:nT }
+\cs_new:Npn \IfValueT { \tl_if_novalue:nF }
+\cs_new:Npn \IfValueTF #1#2#3 { \tl_if_novalue:nTF {#1} {#3} {#2} }
+\tl_new:N \ProcessedArgument
+\cs_new_eq:NN \ReverseBoolean \__xparse_bool_reverse:N
+\cs_new_eq:NN \SplitArgument \__xparse_split_argument:nnn
+\cs_new_eq:NN \SplitList \__xparse_split_list:nn
+\cs_new_eq:NN \TrimSpaces \__xparse_trim_spaces:n
+\cs_new_eq:NN \ProcessList \tl_map_function:nN
+\cs_new_protected:Npn \GetDocumentCommandArgSpec #1
+ {
+ \__xparse_check_definable:nNT {#1} \GetDocumentCommandArgSpec
+ { \__xparse_get_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \GetDocumentEnvironmentArgSpec \__xparse_get_arg_spec:n
+\cs_new_protected:Npn \ShowDocumentCommandArgSpec #1
+ {
+ \__xparse_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
+ { \__xparse_show_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \__xparse_show_arg_spec:n
+%%
+%%
+%% End of file `xparse-2018-04-12.sty'.
diff --git a/macros/latex/contrib/l3packages/xparse-2020-10-01.sty b/macros/latex/contrib/l3packages/xparse-2020-10-01.sty
new file mode 100644
index 0000000000..e5054dbda9
--- /dev/null
+++ b/macros/latex/contrib/l3packages/xparse-2020-10-01.sty
@@ -0,0 +1,174 @@
+%%
+%% This is file `xparse-2020-10-01.sty', generated from
+%% xparse.dtx (with options: `package', on 2021-01-20)
+%% then adapted and frozen for compatibility. Development of
+%% xparse.dtx will continue in the LaTeX2e kernel as ltcmd.dtx.
+%%
+%% Copyright (C) 2009-2021 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:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3packages bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% File: xparse.dtx
+\RequirePackage{expl3}[2018-04-12]
+\@ifpackagelater{expl3}{2018-04-12}
+ {}
+ {%
+ \PackageError{xparse}{Support package l3kernel too old}
+ {%
+ Please install an up to date version of l3kernel\MessageBreak
+ using your TeX package manager or from CTAN.\MessageBreak
+ \MessageBreak
+ Loading xparse will abort!%
+ }%
+ \endinput
+ }
+% \ProvidesExplPackage{xparse}{2021-01-09}{}
+% {L3 Experimental document command parser}
+\expandafter\protected@xdef\csname ver@xparse.sty\endcsname
+ {2021-01-09 L3 Experimental document command parser}
+\ExplSyntaxOn
+\clist_new:N \l__xparse_options_clist
+\DeclareOption* { \clist_put_right:NV \l__xparse_options_clist \CurrentOption }
+\ProcessOptions \relax
+\keys_define:nn { xparse }
+ {
+ log-declarations .bool_set:N = \l__xparse_log_bool ,
+ log-declarations .initial:n = false
+ }
+\keys_set:nV { xparse } \l__xparse_options_clist
+\bool_if:NF \l__xparse_log_bool
+ { \msg_redirect_module:nnn { LaTeX / xparse } { info } { none } }
+\input xparse-generic.tex ~
+\cs_gset_protected:Npn \__xparse_normalize_arg_spec_loop:n #1
+ {
+ \quark_if_recursion_tail_stop:n {#1}
+ \int_incr:N \l__xparse_current_arg_int
+ \cs_if_exist_use:cF { __xparse_normalize_type_ \tl_to_str:n {#1} :w }
+ {
+ \__kernel_msg_error:nnxx { xparse } { unknown-argument-type }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_new_protected:Npx \__xparse_normalize_type_g:w
+ { \exp_not:N \__xparse_normalize_type_G:w { \exp_not:V \c_novalue_tl } }
+\cs_new_protected:Npn \__xparse_normalize_type_G:w #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_check_gv:N G
+ \__xparse_add_arg_spec:n { G {#1} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl { { } }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_l:w
+ {
+ \__xparse_normalize_check_lu:N l
+ \__xparse_add_arg_spec_mandatory:n { l }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_u:w #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_check_lu:N u
+ \__xparse_add_arg_spec_mandatory:n { u {#1} }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_add_type_G:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#1}
+ \__xparse_add_grabber:N G
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_l:w
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N l
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_u:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N u
+ \tl_put_right:Nn \l__xparse_signature_tl { {#1} }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_l:w
+ { \__xparse_add_expandable_type_u:w ## }
+\cs_new_protected:Npn \__xparse_add_expandable_type_u:w #1
+ {
+ \__xparse_add_default:
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpn }
+ { \cs_set_nopar:cpn }
+ { \l__xparse_expandable_aux_name_tl } ##1 \q__xparse ##2 ##3 ##4 #1
+ { ##1 {##4} \q__xparse ##2 ##3 }
+ \__xparse_add_expandable_grabber:nn { u }
+ { \exp_not:c { \l__xparse_expandable_aux_name_tl } }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_grab_G:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_long:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn
+ \__xparse_peek_nonspace:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_obey_spaces:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
+ \peek_meaning:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_long_obey_spaces:w #1 \__xparse_run_code:
+ {
+ \__xparse_grab_G_aux:nNN {#1} \cs_set_protected:Npn
+ \peek_meaning:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_G_aux:nNN #1#2#3
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN #2 \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ #3 \c_group_begin_token
+ { \l__xparse_fn_tl }
+ { \__xparse_add_arg:o \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_l:w #1 \__xparse_run_code:
+ { \__xparse_grab_l_aux:nN {#1} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_l_long:w #1 \__xparse_run_code:
+ { \__xparse_grab_l_aux:nN {#1} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_l_aux:nN #1#2
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN #2 \l__xparse_fn_tl ##1##
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_u:w #1#2 \__xparse_run_code:
+ { \__xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_u_long:w #1#2 \__xparse_run_code:
+ { \__xparse_grab_u_aux:nnN {#1} {#2} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_u_aux:nnN #1#2#3
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#2}
+ \exp_after:wN #3 \l__xparse_fn_tl ##1 #1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_eq:NN \__xparse_expandable_grab_u:w \prg_do_nothing:
+%%
+%%
+%% End of file `xparse-2020-10-01.sty'.
diff --git a/macros/latex/contrib/l3packages/xparse-generic.tex b/macros/latex/contrib/l3packages/xparse-generic.tex
new file mode 100644
index 0000000000..7263475814
--- /dev/null
+++ b/macros/latex/contrib/l3packages/xparse-generic.tex
@@ -0,0 +1,2286 @@
+%%
+%% This is file `xparse-generic.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xparse.dtx (with options: `core')
+%%
+%% Copyright (C) 2009-2021 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:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This file is part of the "l3packages bundle" (The Work in LPPL)
+%% and all files in that bundle must be distributed together.
+%%
+%% File: xparse.dtx
+\if_charcode:w xx
+ \cs_gset:Npn \__xparse_file_end_hook: { }
+\else
+ \ExplSyntaxOn
+ \cs_gset:Npn \__xparse_file_end_hook: { \ExplSyntaxOff }
+\fi:
+\cs_if_exist:NT \NewDocumentCommand
+ { \file_input_stop: }
+\tl_new:N \l__xparse_arg_spec_tl
+\tl_new:N \l__xparse_args_tl
+\tl_new:N \l__xparse_args_i_tl
+\tl_new:N \l__xparse_args_ii_tl
+\int_new:N \l__xparse_current_arg_int
+\bool_new:N \l__xparse_defaults_bool
+\tl_new:N \l__xparse_defaults_tl
+\bool_new:N \l__xparse_environment_bool
+\str_new:N \l__xparse_environment_str
+\bool_new:N \l__xparse_expandable_bool
+\tl_new:N \l__xparse_expandable_aux_name_tl
+\tl_set:Nn \l__xparse_expandable_aux_name_tl
+ {
+ \l__xparse_function_tl \c_space_tl
+ ( arg~ \int_use:N \l__xparse_current_arg_int )
+ }
+\int_new:N \g__xparse_grabber_int
+\tl_new:N \l__xparse_fn_tl
+\tl_new:N \l__xparse_fn_code_tl
+\tl_new:N \l__xparse_function_tl
+\bool_new:N \l__xparse_grab_expandably_bool
+\bool_new:N \l__xparse_obey_spaces_bool
+\tl_new:N \l__xparse_last_delimiters_tl
+\bool_new:N \l__xparse_long_bool
+\int_new:N \l__xparse_m_args_int
+\bool_new:N \l__xparse_prefixed_bool
+\tl_new:N \l__xparse_process_all_tl
+\tl_new:N \l__xparse_process_one_tl
+\bool_new:N \l__xparse_process_some_bool
+\tl_new:N \l__xparse_saved_args_tl
+\tl_new:N \l__xparse_signature_tl
+\bool_new:N \l__xparse_some_obey_spaces_bool
+\bool_new:N \l__xparse_some_long_bool
+\bool_new:N \l__xparse_some_short_bool
+\prop_new:N \l__xparse_tmp_prop
+\tl_new:N \l__xparse_tmpa_tl
+\tl_new:N \l__xparse_tmpb_tl
+\cs_new_eq:NN \__xparse_tmp:w ?
+\cs_new_protected:Npn \__xparse_declare_cmd:Nnn
+ {
+ \bool_set_false:N \l__xparse_expandable_bool
+ \__xparse_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__xparse_declare_expandable_cmd:Nnn
+ {
+ \bool_set_true:N \l__xparse_expandable_bool
+ \__xparse_declare_cmd_aux:Nnn
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_aux:Nnn #1#2#3
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_info:nnxx { xparse } { redefine-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ {
+ \bool_lazy_or:nnT
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ code } }
+ { \cs_if_exist_p:c { \cs_to_str:N #1 ~ defaults } }
+ {
+ \__kernel_msg_warning:nnx { xparse } { unsupported-let }
+ { \token_to_str:N #1 }
+ }
+ \__kernel_msg_info:nnxx { xparse } { define-command }
+ { \token_to_str:N #1 } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__xparse_environment_bool
+ \__xparse_declare_cmd_internal:Nnnn #1 {#2} {#3} { }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_internal:Nnnn #1#2#3#4
+ {
+ \tl_set:Nx \l__xparse_function_tl { \cs_to_str:N #1 }
+ \tl_set:Nx \l__xparse_fn_tl
+ { \exp_not:c { \l__xparse_function_tl \c_space_tl } }
+ \__xparse_normalize_arg_spec:n {#2}
+ \exp_args:No \__xparse_prepare_signature:n \l__xparse_arg_spec_tl
+ \__xparse_declare_cmd_code:Nnn #1 {#2} {#3}
+ #4
+ \__xparse_break_point:n {#2}
+ }
+\cs_generate_variant:Nn \__xparse_declare_cmd_internal:Nnnn { cnx }
+\cs_new_eq:NN \__xparse_break_point:n \use_none:n
+\cs_new_protected:Npn \__xparse_declare_cmd_code:Nnn
+ {
+ \bool_if:NTF \l__xparse_grab_expandably_bool
+ { \__xparse_declare_cmd_code_expandable:Nnn }
+ { \__xparse_declare_cmd_code_aux:Nnn }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_code_aux:Nnn #1#2#3
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__xparse_function_tl \c_space_tl code }
+ \cs_set_protected:Npn \l__xparse_current_arg_int {#3}
+ \cs_set_protected_nopar:Npx #1
+ {
+ \bool_if:NTF \l__xparse_environment_bool
+ {
+ \__xparse_start_env:nnnnn { \exp_not:n {#2} }
+ { \l__xparse_environment_str }
+ }
+ {
+ \__xparse_start:nNNnnn { \exp_not:n {#2} }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl code }
+ }
+ { \exp_not:o \l__xparse_signature_tl }
+ {
+ \bool_if:NT \l__xparse_defaults_bool
+ { \exp_not:o \l__xparse_defaults_tl }
+ }
+ {
+ \bool_if:NT \l__xparse_process_some_bool
+ { \exp_not:o \l__xparse_process_all_tl }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_declare_cmd_code_expandable:Nnn #1#2#3
+ {
+ \exp_args:Ncc \cs_generate_from_arg_count:NNnn
+ { \l__xparse_function_tl \c_space_tl code }
+ { cs_set \bool_if:NF \l__xparse_expandable_bool { _protected } :Npn }
+ \l__xparse_current_arg_int {#3}
+ \bool_if:NT \l__xparse_defaults_bool
+ {
+ \use:x
+ {
+ \cs_generate_from_arg_count:cNnn
+ { \l__xparse_function_tl \c_space_tl defaults }
+ \cs_set:Npn \l__xparse_current_arg_int
+ { \exp_not:o \l__xparse_defaults_tl }
+ }
+ }
+ \bool_if:NTF \l__xparse_expandable_bool
+ { \cs_set_nopar:Npx } { \cs_set_protected_nopar:Npx } #1
+ {
+ \exp_not:N \__xparse_start_expandable:nNNNNn
+ { \exp_not:n {#2} }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl }
+ \exp_not:c
+ {
+ \l__xparse_function_tl \c_space_tl
+ \bool_if:NT \l__xparse_some_short_bool
+ { \bool_if:NT \l__xparse_some_long_bool { \c_space_tl } }
+ }
+ \exp_not:c { \l__xparse_function_tl \c_space_tl code }
+ \bool_if:NTF \l__xparse_defaults_bool
+ { \exp_not:c { \l__xparse_function_tl \c_space_tl defaults } }
+ { ? }
+ { \exp_not:o \l__xparse_signature_tl }
+ }
+ \bool_if:NTF \l__xparse_some_long_bool
+ {
+ \bool_if:NT \l__xparse_some_short_bool
+ {
+ \cs_set_nopar:cpx { \l__xparse_function_tl \c_space_tl \c_space_tl }
+ ##1##2 { ##1 {##2} }
+ }
+ \cs_set:cpx
+ }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_function_tl \c_space_tl } ##1##2 { ##1 {##2} }
+ }
+\cs_new_protected:Npn \__xparse_declare_env:nnnn #1#2
+ {
+ \str_set:Nx \l__xparse_environment_str {#1}
+ \str_set:Nx \l__xparse_environment_str
+ { \tl_trim_spaces:o { \l__xparse_environment_str } }
+ \cs_if_exist:cTF { \l__xparse_environment_str }
+ {
+ \__kernel_msg_info:nnxx { xparse } { redefine-environment }
+ { \l__xparse_environment_str } { \tl_to_str:n {#2} }
+ }
+ {
+ \__kernel_msg_info:nnxx { xparse } { define-environment }
+ { \l__xparse_environment_str } { \tl_to_str:n {#2} }
+ }
+ \bool_set_false:N \l__xparse_expandable_bool
+ \bool_set_true:N \l__xparse_environment_bool
+ \exp_args:NV \__xparse_declare_env_internal:nnnn
+ \l__xparse_environment_str {#2}
+ }
+\cs_new_protected:Npn \__xparse_declare_env_internal:nnnn #1#2#3#4
+ {
+ \__xparse_declare_cmd_internal:cnxn { environment~ #1 } {#2}
+ {
+ \cs_set_nopar:Npx \exp_not:c { environment~ #1 ~end~aux }
+ {
+ \exp_not:N \exp_not:N \exp_not:c { environment~ #1~end~aux~ }
+ \exp_not:n { \exp_not:o \l__xparse_args_tl }
+ }
+ \exp_not:n {#3}
+ }
+ {
+ \cs_set_nopar:cpx { environment~ #1 ~end }
+ { \exp_not:c { environment~ #1 ~end~aux } }
+ \cs_generate_from_arg_count:cNnn
+ { environment~ #1 ~end~aux~ } \cs_set:Npn
+ \l__xparse_current_arg_int {#4}
+ \cs_set_eq:cc {#1} { environment~ #1 }
+ \cs_set_eq:cc { end #1 } { environment~ #1 ~end }
+ }
+ }
+\cs_new_protected:Npn \__xparse_start_env:nnnnn #1#2
+ {
+ \cs_if_exist_use:N \conditionally@traceoff
+ \group_align_safe_begin:
+ \str_set:Nn \l__xparse_environment_str {#2}
+ \bool_set_true:N \l__xparse_environment_bool
+ \__xparse_start_aux:ccnnnn
+ { environment~ \l__xparse_environment_str \c_space_tl }
+ { environment~ \l__xparse_environment_str \c_space_tl code }
+ {#1}
+ }
+\cs_new_protected:Npx \__xparse_start:nNNnnn #1#2#3
+ {
+ \exp_not:c { xparse~function~is~not~expandable }
+ \exp_not:n { \cs_if_exist_use:N \conditionally@traceoff }
+ \exp_not:N \group_align_safe_begin:
+ \exp_not:n { \bool_set_false:N \l__xparse_environment_bool }
+ \exp_not:N \__xparse_start_aux:NNnnnn
+ #2 #3 {#1}
+ }
+\cs_new_protected:Npn \__xparse_start_aux:NNnnnn #1#2#3#4#5#6
+ {
+ \tl_clear:N \l__xparse_args_tl
+ \tl_set:Nn \l__xparse_fn_tl {#1}
+ \tl_set:Nn \l__xparse_fn_code_tl {#2}
+ \tl_set:Nn \l__xparse_defaults_tl {#5}
+ \tl_set:Nn \l__xparse_process_all_tl {#6}
+ #4 \__xparse_run_code:
+ }
+\cs_generate_variant:Nn \__xparse_start_aux:NNnnnn { cc }
+\cs_new_protected:Npn \__xparse_run_code:
+ {
+ \tl_if_empty:NF \l__xparse_defaults_tl { \__xparse_defaults: }
+ \tl_if_empty:NF \l__xparse_process_all_tl { \__xparse_args_process: }
+ \group_align_safe_end:
+ \cs_if_exist_use:N \conditionally@traceon
+ \exp_after:wN \l__xparse_fn_code_tl \l__xparse_args_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults:
+ {
+ \__xparse_defaults_def:
+ \tl_set_eq:NN \l__xparse_args_i_tl \l__xparse_args_tl
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_aux: \__xparse_defaults_aux: \__xparse_defaults_aux:
+ \__xparse_defaults_error:w
+ \q_recursion_stop
+ \tl_set_eq:NN \l__xparse_args_tl \l__xparse_args_i_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults_aux:
+ {
+ \tl_set:Nx \l__xparse_args_ii_tl
+ { \exp_after:wN \__xparse_tmp:w \l__xparse_args_i_tl }
+ \tl_if_eq:NNT \l__xparse_args_ii_tl \l__xparse_args_i_tl
+ { \use_none_delimit_by_q_recursion_stop:w }
+ \tl_set_eq:NN \l__xparse_args_i_tl \l__xparse_args_ii_tl
+ }
+\cs_new_protected:Npn \__xparse_defaults_error:w \q_recursion_stop
+ {
+ \__kernel_msg_error:nnx { xparse } { loop-in-defaults }
+ { \__xparse_environment_or_command: }
+ }
+\cs_new_protected:Npn \__xparse_defaults_def:
+ {
+ \tl_clear:N \l__xparse_tmpa_tl
+ \int_zero:N \l__xparse_current_arg_int
+ \__xparse_tl_mapthread_function:NNN \l__xparse_args_tl \l__xparse_defaults_tl
+ \__xparse_defaults_def:nn
+ \cs_generate_from_arg_count:NNVo \__xparse_tmp:w \cs_set:Npn
+ \l__xparse_current_arg_int \l__xparse_tmpa_tl
+ }
+\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo }
+\cs_new_protected:Npn \__xparse_defaults_def:nn
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \exp_args:NV \__xparse_defaults_def:nnn \l__xparse_current_arg_int
+ }
+\cs_new_protected:Npn \__xparse_defaults_def:nnn #1#2#3
+ {
+ \tl_put_right:Nx \l__xparse_tmpa_tl
+ {
+ {
+ \exp_not:N \exp_not:n
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_not:o {#3} }
+ { \exp_not:n { ## #1 } }
+ }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_args_process:
+ {
+ \tl_clear:N \l__xparse_args_ii_tl
+ \__xparse_tl_mapthread_function:NNN
+ \l__xparse_args_tl
+ \l__xparse_process_all_tl
+ \__xparse_args_process_loop:nn
+ \tl_set_eq:NN \l__xparse_args_tl \l__xparse_args_ii_tl
+ }
+\cs_new_protected:Npn \__xparse_args_process_loop:nn #1#2
+ {
+ \tl_set:Nn \ProcessedArgument {#1}
+ \tl_if_novalue:nF {#1}
+ { \tl_map_function:nN {#2} \__xparse_args_process_aux:n }
+ \tl_put_right:No \l__xparse_args_ii_tl
+ { \exp_after:wN { \ProcessedArgument } }
+ }
+\cs_new_protected:Npn \__xparse_args_process_aux:n #1
+ {
+ \cs_generate_from_arg_count:NNnn \__xparse_tmp:w \cs_set:Npn
+ { \tl_count:N \l__xparse_args_tl } {#1}
+ \exp_args:NNNo \exp_after:wN \__xparse_tmp:w \l__xparse_args_tl
+ { \ProcessedArgument }
+ }
+\cs_new:Npn \__xparse_start_expandable:nNNNNn #1#2#3#4#5#6
+ {
+ \group_align_safe_begin:
+ #6 \__xparse_end_expandable:NNw #5 #4 \q__xparse #2#3
+ }
+\cs_new:Npn \__xparse_end_expandable:NNw #1#2
+ { \__xparse_end_expandable_aux:w #1#2 \prg_do_nothing: }
+\cs_new:Npn \__xparse_end_expandable_aux:w #1#2#3 \q__xparse
+ { \exp_args:No \__xparse_end_expandable_aux:nNNNN {#3} #1 #2 }
+\cs_new:Npn \__xparse_end_expandable_aux:nNNNN #1#2#3#4#5
+ {
+ \token_if_eq_charcode:NNT ? #2 { \exp_after:wN \use_iv:nnnn }
+ \__xparse_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3
+ { } { } { } { } { } { } { } { } { } { }
+ {
+ \__kernel_msg_expandable_error:nnf
+ { xparse } { loop-in-defaults }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } }
+ \use_iv:nnnn
+ }
+ \q_stop
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nnnNNn #1#2#3#4#5#6
+ {
+ #6
+ \str_if_eq:nnTF {#1} {#2}
+ { \use_i_delimit_by_q_stop:nw { \group_align_safe_end: #5 #1 } }
+ {
+ \exp_args:No \__xparse_tl_mapthread_function:nnN
+ { #4 #1 } {#3}
+ \__xparse_end_expandable_defaults:nnw
+ \__xparse_end_expandable_defaults:nnnNNn { } {#1} {#3} #4 #5
+ }
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nnw #1#2
+ {
+ \tl_if_novalue:nTF {#2}
+ { \exp_args:No \__xparse_end_expandable_defaults:nw {#1} }
+ { \__xparse_end_expandable_defaults:nw {#2} }
+ }
+\cs_new:Npn \__xparse_end_expandable_defaults:nw
+ #1#2 \__xparse_end_expandable_defaults:nnnNNn #3
+ { #2 \__xparse_end_expandable_defaults:nnnNNn { #3 {#1} } }
+\cs_new_protected:Npn \__xparse_normalize_arg_spec:n #1
+ {
+ \int_zero:N \l__xparse_current_arg_int
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \tl_clear:N \l__xparse_arg_spec_tl
+ \bool_set_true:N \l__xparse_grab_expandably_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_some_obey_spaces_bool
+ \bool_set_false:N \l__xparse_some_long_bool
+ \bool_set_false:N \l__xparse_some_short_bool
+ \__xparse_normalize_arg_spec_loop:n #1
+ \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop
+ \int_compare:nNnT \l__xparse_current_arg_int > 9
+ {
+ \__kernel_msg_error:nnxx { xparse } { too-many-arguments }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \tl_if_empty:NF \l__xparse_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx { xparse } { expandable-ending-optional }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+ \bool_if:NT \l__xparse_expandable_bool
+ { \bool_set_true:N \l__xparse_grab_expandably_bool }
+ \bool_if:NT \l__xparse_environment_bool
+ { \bool_set_false:N \l__xparse_grab_expandably_bool }
+ }
+\cs_new_protected:Npn \__xparse_normalize_arg_spec_loop:n #1
+ {
+ \quark_if_recursion_tail_stop:n {#1}
+ \int_incr:N \l__xparse_current_arg_int
+ \cs_if_exist_use:cF { __xparse_normalize_type_ \tl_to_str:n {#1} :w }
+ {
+ \bool_lazy_any:nTF
+ {
+ { \str_if_eq_p:nn {#1} { G } }
+ { \str_if_eq_p:nn {#1} { g } }
+ { \str_if_eq_p:nn {#1} { l } }
+ { \str_if_eq_p:nn {#1} { u } }
+ }
+ {
+ \__kernel_msg_error:nnxx { xparse } { xparse-argument-type }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ }
+ {
+ \__kernel_msg_error:nnxx { xparse } { unknown-argument-type }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new_protected:Npn \__xparse_normalize_type_d:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_D:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_e:w ##1
+ {
+ \quark_if_recursion_tail_stop_do:nn {##1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_E:w {##1} { }
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_o:w
+ { \__xparse_normalize_type_D:w [ ] {#1} }
+ \cs_new_protected:Npn \__xparse_normalize_type_O:w
+ { \__xparse_normalize_type_D:w [ ] }
+ \cs_new_protected:Npn \__xparse_normalize_type_r:w ##1##2
+ {
+ \quark_if_recursion_tail_stop_do:nn {##2} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_type_R:w {##1} {##2} {#1}
+ }
+ \cs_new_protected:Npn \__xparse_normalize_type_s:w
+ { \__xparse_normalize_type_t:w * }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new_protected:cpn { __xparse_normalize_type_>:w } #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { processor-in-expandable }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \tl_put_right:Nx \l__xparse_arg_spec_tl { > { \tl_trim_spaces:n {#1} } }
+ \int_decr:N \l__xparse_current_arg_int
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_normalize_arg_spec_loop:n {#2}
+ }
+\cs_new_protected:cpn { __xparse_normalize_type_+:w } #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_long_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { two-markers }
+ { \__xparse_environment_or_command: } { + }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_true:N \l__xparse_long_bool
+ \int_decr:N \l__xparse_current_arg_int
+ \__xparse_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:cpn { __xparse_normalize_type_!:w } #1
+ {
+ \quark_if_recursion_tail_stop_do:nn {#1} { \__xparse_bad_arg_spec:wn }
+ \bool_if:NT \l__xparse_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { two-markers }
+ { \__xparse_environment_or_command: } { ! }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_true:N \l__xparse_obey_spaces_bool
+ \bool_set_true:N \l__xparse_some_obey_spaces_bool
+ \int_decr:N \l__xparse_current_arg_int
+ \__xparse_normalize_arg_spec_loop:n {#1}
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_D:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_token_check:n {#1} \__xparse_allowed_token_check:N #1
+ \__xparse_single_token_check:n {#2}
+ \__xparse_add_arg_spec:n { D #1 #2 {#3} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_E:w #1#2
+ {
+ \quark_if_recursion_tail_stop_do:nn {#2} { \__xparse_bad_arg_spec:wn }
+ \tl_if_blank:nT {#1} { \__xparse_bad_arg_spec:wn }
+ \tl_map_function:nN {#1} \__xparse_single_token_check:n
+ \tl_map_function:nN {#1} \__xparse_allowed_token_check:N
+ \__xparse_normalize_E_unique_check:w #1 \q_nil \q_stop
+ \int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} }
+ { \__xparse_bad_arg_spec:wn }
+ \__xparse_add_arg_spec:n { E {#1} {#2} }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \int_add:Nn \l__xparse_current_arg_int { \tl_count:n {#1} - 1 }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_E_unique_check:w #1#2 \q_stop
+ {
+ \quark_if_nil:NF #1
+ {
+ \tl_if_in:nnT {#2} {#1} { \__xparse_bad_arg_spec:wn }
+ \__xparse_normalize_E_unique_check:w #2 \q_stop
+ }
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_t:w #1
+ {
+ \quark_if_recursion_tail_stop_do:Nn #1 { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_token_check:n {#1} \__xparse_allowed_token_check:N #1
+ \tl_put_right:Nx \l__xparse_arg_spec_tl
+ {
+ \bool_if:NT \l__xparse_obey_spaces_bool { ! }
+ t \exp_not:n {#1}
+ }
+ \tl_put_right:Nn \l__xparse_last_delimiters_tl {#1}
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \bool_set_false:N \l__xparse_long_bool
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_m:w
+ {
+ \__xparse_delimiter_check:nnn { } { m } { \iow_char:N \{ }
+ \__xparse_add_arg_spec_mandatory:n { m }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_R:w #1#2#3
+ {
+ \quark_if_recursion_tail_stop_do:nn {#3} { \__xparse_bad_arg_spec:wn }
+ \__xparse_single_token_check:n {#1} \__xparse_allowed_token_check:N #1
+ \__xparse_single_token_check:n {#2}
+ \__xparse_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ \__xparse_add_arg_spec_mandatory:n { R #1 #2 {#3} }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_v:w
+ {
+ \__xparse_normalize_check_gv:N v
+ \__xparse_add_arg_spec_mandatory:n { v }
+ \__xparse_normalize_arg_spec_loop:n
+ }
+\cs_new_protected:Npn \__xparse_normalize_type_b:w #1
+ {
+ \bool_if:NF \l__xparse_environment_bool
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-command-arg }
+ { \__xparse_environment_or_command: } { b }
+ \__xparse_bad_def:wn
+ }
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \__xparse_add_arg_spec:n { b }
+ \quark_if_recursion_tail_stop:n {#1}
+ \__kernel_msg_error:nnxx { xparse } { arg-after-body }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+\cs_new_protected:Npn \__xparse_single_token_check:n #1
+ {
+ \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nF
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-single-token }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__xparse_allowed_token_check:N #1
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_begin_token
+ { \use:n }
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_end_token
+ { \use:n }
+ { \use_none:n }
+ }
+ {
+ \__kernel_msg_error:nnxxx
+ { xparse } { forbidden-implicit-group-token }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ {
+ \token_if_eq_meaning:NNTF #1 \c_group_begin_token
+ { begin } { end }
+ }
+ \__xparse_bad_def:wn
+ }
+ }
+\cs_new_protected:Npn \__xparse_normalize_check_gv:N #1
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-expandable-argument-type }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ }
+\cs_new_protected:Npn \__xparse_normalize_check_lu:N #1
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \tl_if_empty:NF \l__xparse_last_delimiters_tl
+ {
+ \__kernel_msg_error:nnxx
+ { xparse } { invalid-after-optional-expandably }
+ { \iow_char:N \\ \l__xparse_function_tl } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_delimiter_check:nnn #1#2#3
+ {
+ \tl_map_inline:Nn \l__xparse_last_delimiters_tl
+ {
+ \tl_if_eq:nnT {##1} {#1}
+ {
+ \__kernel_msg_warning:nnxx { xparse } { optional-mandatory }
+ {#2} {#3}
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_bad_arg_spec:wn #1 \__xparse_break_point:n #2
+ {
+ \__kernel_msg_error:nnxx { xparse } { bad-arg-spec }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#2} }
+ }
+\cs_new_protected:Npn \__xparse_bad_def:wn #1 \__xparse_break_point:n #2 { }
+\cs_new_protected:Npn \__xparse_add_arg_spec:n #1
+ {
+ \bool_lazy_and:nnT
+ { ! \l__xparse_long_bool }
+ { \l__xparse_some_long_bool }
+ {
+ \bool_if:NT \l__xparse_expandable_bool
+ {
+ \__kernel_msg_error:nnx { xparse } { inconsistent-long }
+ { \iow_char:N \\ \l__xparse_function_tl }
+ \__xparse_bad_def:wn
+ }
+ \bool_set_false:N \l__xparse_grab_expandably_bool
+ }
+ \bool_if:NTF \l__xparse_long_bool
+ { \bool_set_true:N \l__xparse_some_long_bool }
+ { \bool_set_true:N \l__xparse_some_short_bool }
+ \tl_put_right:Nx \l__xparse_arg_spec_tl
+ {
+ \bool_if:NT \l__xparse_long_bool { + }
+ \bool_if:NT \l__xparse_obey_spaces_bool { ! }
+ \exp_not:n {#1}
+ }
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ }
+\cs_new_protected:Npn \__xparse_add_arg_spec_mandatory:n #1
+ {
+ \bool_if:NT \l__xparse_some_obey_spaces_bool
+ {
+ \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces }
+ { \__xparse_environment_or_command: } { \tl_to_str:n {#1} }
+ \__xparse_bad_def:wn
+ }
+ \tl_clear:N \l__xparse_last_delimiters_tl
+ \__xparse_add_arg_spec:n {#1}
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature:n #1
+ {
+ \int_zero:N \l__xparse_current_arg_int
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \int_zero:N \l__xparse_m_args_int
+ \bool_set_false:N \l__xparse_defaults_bool
+ \tl_clear:N \l__xparse_defaults_tl
+ \tl_clear:N \l__xparse_process_all_tl
+ \tl_clear:N \l__xparse_process_one_tl
+ \bool_set_false:N \l__xparse_process_some_bool
+ \tl_clear:N \l__xparse_signature_tl
+ \__xparse_prepare_signature:N #1 \q_recursion_tail \q_recursion_stop
+ \bool_if:NF \l__xparse_expandable_bool { \__xparse_flush_m_args: }
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature:N
+ {
+ \bool_set_false:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__xparse_prepare_signature_bypass:N #1
+ {
+ \quark_if_recursion_tail_stop:N #1
+ \use:c
+ {
+ __xparse_add
+ \bool_if:NT \l__xparse_grab_expandably_bool { _expandable }
+ _type_ \token_to_str:N #1 :w
+ }
+ }
+\cs_new_protected:cpn { __xparse_add_type_+:w }
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_long_bool
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __xparse_add_type_!:w }
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_obey_spaces_bool
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:cpn { __xparse_add_type_>:w } #1
+ {
+ \__xparse_flush_m_args:
+ \bool_set_true:N \l__xparse_prefixed_bool
+ \bool_set_true:N \l__xparse_process_some_bool
+ \tl_put_left:Nn \l__xparse_process_one_tl { {#1} }
+ \__xparse_prepare_signature_bypass:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_b:w
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N b
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_D:w #1#2#3
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#3}
+ \__xparse_add_grabber:N D
+ \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_E:w #1#2
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default_E:nn {#1} {#2}
+ \__xparse_add_grabber:N E
+ \tl_put_right:Nn \l__xparse_signature_tl { {#1} }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_m:w
+ {
+ \__xparse_add_default:
+ \bool_if:NTF \l__xparse_prefixed_bool
+ { \__xparse_add_grabber:N m }
+ { \int_incr:N \l__xparse_m_args_int }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_R:w #1#2#3
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:n {#3}
+ \__xparse_add_grabber:N R
+ \tl_put_right:Nn \l__xparse_signature_tl { #1 #2 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_t:w #1
+ {
+ \__xparse_flush_m_args:
+ \__xparse_add_default:
+ \__xparse_add_grabber:N t
+ \tl_put_right:Nn \l__xparse_signature_tl {#1}
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_type_v:w
+ {
+ \__xparse_flush_m_args:
+ \exp_args:No \__xparse_add_default:n \c_novalue_tl
+ \__xparse_add_grabber:N v
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_flush_m_args:
+ {
+ \int_compare:nNnT \l__xparse_m_args_int > 0
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ { \exp_not:c { __xparse_grab_m_ \int_use:N \l__xparse_m_args_int :w } }
+ \tl_put_right:Nx \l__xparse_process_all_tl
+ { \prg_replicate:nn { \l__xparse_m_args_int } { { } } }
+ }
+ \int_zero:N \l__xparse_m_args_int
+ }
+\cs_new_protected:Npn \__xparse_add_grabber:N #1
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ {
+ \exp_not:c
+ {
+ __xparse_grab_ #1
+ \bool_if:NT \l__xparse_long_bool { _long }
+ \bool_if:NT \l__xparse_obey_spaces_bool { _obey_spaces }
+ :w
+ }
+ }
+ \bool_set_false:N \l__xparse_long_bool
+ \bool_set_false:N \l__xparse_obey_spaces_bool
+ \tl_put_right:Nx \l__xparse_process_all_tl
+ { { \exp_not:o \l__xparse_process_one_tl } }
+ \tl_clear:N \l__xparse_process_one_tl
+ }
+\cs_new_protected:Npn \__xparse_add_default:n #1
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__xparse_add_default: }
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \bool_set_true:N \l__xparse_defaults_bool
+ \tl_put_right:Nn \l__xparse_defaults_tl { { \prg_do_nothing: #1 } }
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_default:
+ {
+ \int_incr:N \l__xparse_current_arg_int
+ \tl_put_right:Nn \l__xparse_defaults_tl { \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_add_default_E:nn #1#2
+ {
+ \tl_map_function:nN {#2} \__xparse_add_default:n
+ \prg_replicate:nn
+ { \tl_count:n {#1} - \tl_count:n {#2} }
+ { \__xparse_add_default: }
+ }
+\cs_new_protected:cpn { __xparse_add_expandable_type_+:w }
+ {
+ \bool_set_true:N \l__xparse_long_bool
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D:w
+ { \__xparse_add_expandable_type_D_aux:NNNn D }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NNNn #1#2#3#4
+ {
+ \__xparse_add_default:n {#4}
+ \tl_if_eq:nnTF {#2} {#3}
+ { \__xparse_add_expandable_type_D_aux:NN #1 #2 }
+ { \__xparse_add_expandable_type_D_aux:NNN #1 #2 #3 }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NNN #1#2#3
+ {
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_expandable_aux_name_tl } ##1 ##2 #2 ##3 \q__xparse ##4 #3
+ { ##1 {##2} {##3} {##4} }
+ \__xparse_add_expandable_grabber:nn {#1}
+ {
+ \exp_not:c { \l__xparse_expandable_aux_name_tl }
+ \exp_not:n { #2 #3 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_D_aux:NN #1#2
+ {
+ \bool_if:NTF \l__xparse_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l__xparse_expandable_aux_name_tl } ##1 #2 ##2 #2
+ { ##1 {##2} }
+ \__xparse_add_expandable_grabber:nn { #1_alt }
+ {
+ \exp_not:c { \l__xparse_expandable_aux_name_tl }
+ \exp_not:n {#2}
+ }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_E:w #1#2
+ {
+ \__xparse_add_default_E:nn {#1} {#2}
+ \tl_clear:N \l__xparse_tmpb_tl
+ \tl_map_function:nN {#1} \__xparse_add_expandable_type_E_aux:n
+ \__xparse_add_expandable_grabber:nn
+ { E \bool_if:NT \l__xparse_long_bool { _long } }
+ {
+ { \exp_not:o \l__xparse_tmpb_tl }
+ {
+ \prg_replicate:nn { \tl_count:n {#1} }
+ { { \c_novalue_tl } }
+ }
+ }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_E_aux:n #1
+ {
+ \__xparse_get_grabber:NN #1 \l__xparse_tmpa_tl
+ \tl_put_right:Nx \l__xparse_tmpb_tl
+ { \exp_not:o \l__xparse_tmpa_tl \exp_not:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_m:w
+ {
+ \__xparse_add_default:
+ \__xparse_add_expandable_grabber:nn
+ { m \bool_if:NT \l__xparse_long_bool { _long } } { }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_type_R:w
+ { \__xparse_add_expandable_type_D_aux:NNNn R }
+\cs_new_protected:Npn \__xparse_add_expandable_type_t:w #1
+ {
+ \__xparse_add_default:
+ \__xparse_get_grabber:NN #1 \l__xparse_tmpa_tl
+ \__xparse_add_expandable_grabber:nn { t }
+ {
+ \exp_not:o \l__xparse_tmpa_tl
+ \exp_not:N #1
+ }
+ \__xparse_prepare_signature:N
+ }
+\cs_new_protected:Npn \__xparse_add_expandable_grabber:nn #1#2
+ {
+ \tl_put_right:Nx \l__xparse_signature_tl
+ { \exp_not:c { __xparse_expandable_grab_ #1 :w } #2 }
+ }
+\cs_new_protected:Npn \__xparse_get_grabber:NN #1#2
+ {
+ \cs_set:Npn \__xparse_tmp:w ##1 #1 {##1}
+ \exp_args:Nc \__xparse_get_grabber_auxi:NN
+ { __xparse_grabber_ \token_to_str:N #1 :w } #2
+ }
+\cs_new_protected:Npn \__xparse_get_grabber_auxi:NN #1#2
+ {
+ \cs_if_eq:NNTF \__xparse_tmp:w #1
+ { \tl_set:Nn #2 {#1} }
+ {
+ \cs_if_exist:NTF #1
+ {
+ \int_gincr:N \g__xparse_grabber_int
+ \exp_args:Nc \__xparse_get_grabber_auxi:NN
+ {
+ __xparse_grabber_
+ - \int_use:N \g__xparse_grabber_int :w
+ }
+ #2
+ }
+ { \__xparse_get_grabber_auxii:NN #1 #2 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_get_grabber_auxii:NN #1#2
+ {
+ \cs_set_eq:NN #1 \__xparse_tmp:w
+ \tl_set:Nn #2 {#1}
+ }
+\cs_new_protected:Npn \__xparse_grab_b:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__xparse_grab_b_long:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n }
+\cs_new_protected:Npn \__xparse_grab_b_obey_spaces:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n }
+\cs_new_protected:Npn \__xparse_grab_b_long_obey_spaces:w
+ { \__xparse_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n }
+\cs_new_protected:Npn \__xparse_grab_b_aux:NNw #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnN \begin \end {#3} #1
+ \tl_put_left:Nn \l__xparse_signature_tl { \__xparse_grab_b_end:Nw #2 }
+ \tl_set_eq:NN \l__xparse_saved_args_tl \l__xparse_args_tl
+ \tl_clear:N \l__xparse_args_tl
+ \exp_args:Nc \l__xparse_fn_tl { begin ~ }
+ }
+\cs_new_protected:Npn \__xparse_grab_b_end:Nw #1#2 \__xparse_run_code:
+ {
+ \tl_set:Nx \l__xparse_args_tl
+ {
+ \exp_not:V \l__xparse_saved_args_tl
+ { \exp_after:wN #1 \l__xparse_args_tl }
+ }
+ #2
+ \__xparse_run_code:
+ \end
+ }
+\cs_new_protected:Npn \__xparse_grab_D:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_long:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_obey_spaces:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_long_obey_spaces:w #1#2#3 \__xparse_run_code:
+ {
+ \__xparse_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_D_aux:NNnNN #1#2#3#4#5
+ {
+ \__xparse_grab_D_aux:NNnN #1#2 {#3} #4
+ #5 #1
+ { \__xparse_grab_D_call:Nw #1 }
+ { \__xparse_add_arg:o \c_novalue_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_D_aux:NNnN #1#2#3#4
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#3}
+ \exp_after:wN #4 \l__xparse_fn_tl ##1 #2
+ {
+ \tl_if_in:nnTF {##1} {#1}
+ { \__xparse_grab_D_nested:NNnN #1 #2 {##1} #4 }
+ {
+ \tl_if_blank:oTF { \use_none:n ##1 }
+ { \__xparse_add_arg:o { \use_none:n ##1 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n ##1 } }
+ { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } }
+ { \__xparse_add_arg:o { \use_ii:nn ##1 } }
+ { \__xparse_add_arg:o { \use_none:n ##1 } }
+ }
+ }
+ }
+ }
+\tl_new:N \l__xparse_nesting_a_tl
+\tl_new:N \l__xparse_nesting_b_tl
+\quark_new:N \q__xparse
+\cs_new_protected:Npn \__xparse_grab_D_nested:NNnN #1#2#3#4
+ {
+ \tl_clear:N \l__xparse_nesting_a_tl
+ \tl_clear:N \l__xparse_nesting_b_tl
+ \exp_after:wN #4 \l__xparse_fn_tl ##1 #1 ##2 \q__xparse ##3 #2
+ {
+ \tl_put_right:No \l__xparse_nesting_a_tl { \use_none:n ##1 #1 }
+ \tl_put_right:No \l__xparse_nesting_b_tl { \use_i:nn #2 ##3 }
+ \tl_if_in:nnTF {##2} {#1}
+ {
+ \l__xparse_fn_tl
+ \q_nil ##2 \q__xparse \ERROR
+ }
+ {
+ \tl_put_right:Nx \l__xparse_nesting_a_tl
+ { \__xparse_grab_D_nested:w \q_nil ##2 \q_stop }
+ \tl_if_in:NnTF \l__xparse_nesting_b_tl {#1}
+ {
+ \tl_set_eq:NN \l__xparse_tmpa_tl \l__xparse_nesting_b_tl
+ \tl_clear:N \l__xparse_nesting_b_tl
+ \exp_after:wN \l__xparse_fn_tl \exp_after:wN
+ \q_nil \l__xparse_tmpa_tl \q_nil \q__xparse \ERROR
+ }
+ {
+ \tl_put_right:No \l__xparse_nesting_a_tl
+ \l__xparse_nesting_b_tl
+ \__xparse_add_arg:V \l__xparse_nesting_a_tl
+ }
+ }
+ }
+ \l__xparse_fn_tl #3 \q_nil \q__xparse \ERROR
+ }
+\cs_new:Npn \__xparse_grab_D_nested:w #1 \q_nil \q_stop
+ { \exp_not:o { \use_none:n #1 } }
+\cs_new_protected_nopar:Npn \__xparse_grab_D_call:Nw #1
+ {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \l__xparse_fn_tl \char_generate:nn { `#1 } { 11 }
+ }
+ {
+ \__xparse_token_if_cs:NTF #1
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \cs:w \cs_to_str:N #1 ~ \cs_end:
+ }
+ {
+ \exp_after:wN \l__xparse_fn_tl
+ \token_to_str:N #1
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_E:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_long:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__xparse_peek_nonspace_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_obey_spaces:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected_nopar:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E_long_obey_spaces:w #1#2 \__xparse_run_code:
+ {
+ \__xparse_grab_E:nnNN {#1} {#2}
+ \cs_set_protected:Npn
+ \__xparse_peek_meaning_remove:NTF
+ }
+\cs_new_protected:Npn \__xparse_grab_E:nnNN #1#2#3#4
+ {
+ \exp_after:wN #3 \l__xparse_fn_tl ##1##2##3
+ {
+ \prop_put:Nnn \l__xparse_tmp_prop {##1} {##3}
+ \__xparse_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop
+ }
+ \prop_clear:N \l__xparse_tmp_prop
+ \tl_set:Nn \l__xparse_signature_tl {#2}
+ \cs_set_protected:Npn \__xparse_grab_E_finalise:
+ {
+ \tl_map_inline:nn {#1}
+ {
+ \prop_get:NnNF \l__xparse_tmp_prop {####1} \l__xparse_tmpb_tl
+ { \tl_set_eq:NN \l__xparse_tmpb_tl \c_novalue_tl }
+ \tl_put_right:Nx \l__xparse_args_tl
+ { { \exp_not:V \l__xparse_tmpb_tl } }
+ }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+ \__xparse_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new_protected:Npn \__xparse_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop
+ {
+ \cs_if_eq:NNTF #3 \q_recursion_tail
+ { \__xparse_grab_E_finalise: }
+ {
+ #1 #3
+ { \l__xparse_fn_tl #3 {#2#4} }
+ { \__xparse_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_E_finalise: { }
+\cs_new_protected:Npn \__xparse_grab_m:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_protected_nopar:Npn \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected:Npn \__xparse_grab_m_long:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_protected:Npn \l__xparse_fn_tl ##1
+ { \__xparse_add_arg:n {##1} }
+ \l__xparse_fn_tl
+ }
+\cs_new_protected_nopar:Npn \__xparse_grab_m_aux:Nnnnnnnnn #1#2#3#4#5#6#7#8#9
+ {
+ \tl_put_right:No \l__xparse_args_tl
+ { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+\cs_new_protected:cpn { __xparse_grab_m_1:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnnnn { } { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_2:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnnn { } { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_3:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnnn { } { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_4:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnnn { } { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_5:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nnn { } { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_6:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:nn { } { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_7:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \use_none:n { }
+ }
+\cs_new_protected:cpn { __xparse_grab_m_8:w } #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \exp_after:wN \cs_set_eq:NN \l__xparse_fn_tl \__xparse_grab_m_aux:Nnnnnnnnn
+ \l__xparse_fn_tl \prg_do_nothing:
+ }
+\cs_new_protected:cpx { __xparse_grab_m_9:w }
+ {
+ \exp_not:c { __xparse_grab_m_5:w }
+ \exp_not:c { __xparse_grab_m_4:w }
+ }
+\cs_new_protected:Npn \__xparse_grab_R:w #1#2#3 \__xparse_run_code:
+ { \__xparse_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected_nopar:Npn }
+\cs_new_protected:Npn \__xparse_grab_R_long:w #1#2#3 \__xparse_run_code:
+ { \__xparse_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn }
+\cs_new_protected:Npn \__xparse_grab_R_aux:NNnN #1#2#3#4
+ {
+ \__xparse_grab_D_aux:NNnN #1 #2 {#3} #4
+ \__xparse_peek_nonspace_remove:NTF #1
+ { \__xparse_grab_D_call:Nw #1 }
+ {
+ \__kernel_msg_error:nnxx { xparse } { missing-required }
+ { \__xparse_environment_or_command: }
+ { \token_to_str:N #1 }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_t:w
+ { \__xparse_grab_t_aux:NNw \__xparse_peek_nonspace_remove:NTF }
+\cs_new_protected:Npn \__xparse_grab_t_obey_spaces:w
+ { \__xparse_grab_t_aux:NNw \__xparse_peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__xparse_grab_t_aux:NNw #1#2#3 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#3}
+ \exp_after:wN \cs_set_protected:Npn \l__xparse_fn_tl
+ {
+ #1 #2
+ { \__xparse_add_arg:n { \BooleanTrue } }
+ { \__xparse_add_arg:n { \BooleanFalse } }
+ }
+ \l__xparse_fn_tl
+ }
+\tl_new:N \l__xparse_v_arg_tl
+\cs_new_protected:Npn \__xparse_grab_v:w
+ {
+ \bool_set_false:N \l__xparse_long_bool
+ \__xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__xparse_grab_v_long:w
+ {
+ \bool_set_true:N \l__xparse_long_bool
+ \__xparse_grab_v_aux:w
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux:w #1 \__xparse_run_code:
+ {
+ \tl_set:Nn \l__xparse_signature_tl {#1}
+ \group_begin:
+ \tex_escapechar:D = 92 \scan_stop:
+ \tl_clear:N \l__xparse_v_arg_tl
+ \peek_remove_spaces:n
+ {
+ \peek_meaning_remove:NTF \c_group_begin_token
+ {
+ \group_align_safe_end:
+ \__xparse_grab_v_bgroup:
+ }
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_aux_test:N }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_group_end:
+ {
+ \exp_args:NNNo
+ \group_end:
+ \tl_set:Nn \l__xparse_v_arg_tl { \l__xparse_v_arg_tl }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_test:N #1
+ {
+ \__xparse_grab_v_token_if_char:NTF #1
+ {
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_aux_catcodes:
+ \__xparse_grab_v_aux_loop:N #1
+ }
+ { \__xparse_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop:N #1
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_aux_loop:NN #1 }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop:NN #1#2
+ {
+ \__xparse_grab_v_token_if_char:NTF #2
+ {
+ \token_if_eq_charcode:NNTF #1 #2
+ { \__xparse_grab_v_aux_loop_end: }
+ {
+ \__xparse_grab_v_aux_put:N #2
+ \__xparse_grab_v_aux_loop:N #1
+ }
+ }
+ { \__xparse_grab_v_aux_abort:n {#2} #2 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_loop_end:
+ {
+ \__xparse_grab_v_group_end:
+ \__xparse_add_arg:x { \tl_tail:N \l__xparse_v_arg_tl }
+ }
+\int_new:N \l__xparse_v_nesting_int
+\cs_new_protected:Npx \__xparse_grab_v_bgroup:
+ {
+ \exp_not:N \__xparse_grab_v_aux_catcodes:
+ \exp_not:n { \int_set:Nn \l__xparse_v_nesting_int { 1 } }
+ \exp_not:N \__xparse_grab_v_aux_put:N \iow_char:N \{
+ \exp_not:N \__xparse_grab_v_bgroup_loop:
+ }
+\cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:
+ {
+ \peek_N_type:TF
+ { \__xparse_grab_v_bgroup_loop:N }
+ { \__xparse_grab_v_aux_abort:n { } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_bgroup_loop:N #1
+ {
+ \__xparse_grab_v_token_if_char:NTF #1
+ {
+ \token_if_eq_charcode:NNTF \c_group_end_token #1
+ {
+ \int_decr:N \l__xparse_v_nesting_int
+ \int_compare:nNnTF \l__xparse_v_nesting_int > 0
+ {
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_bgroup_loop:
+ }
+ { \__xparse_grab_v_aux_loop_end: }
+ }
+ {
+ \token_if_eq_charcode:NNT \c_group_begin_token #1
+ { \int_incr:N \l__xparse_v_nesting_int }
+ \__xparse_grab_v_aux_put:N #1
+ \__xparse_grab_v_bgroup_loop:
+ }
+ }
+ { \__xparse_grab_v_aux_abort:n {#1} #1 }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_catcodes:
+ {
+ \cs_set_eq:NN \do \char_set_catcode_other:N
+ \dospecials
+ \tex_endlinechar:D = `\^^M \scan_stop:
+ \bool_if:NTF \l__xparse_long_bool
+ { \char_set_catcode_other:n { \tex_endlinechar:D } }
+ { \char_set_catcode_parameter:n { \tex_endlinechar:D } }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_abort:n #1
+ {
+ \__xparse_grab_v_group_end:
+ \exp_after:wN \exp_after:wN \exp_after:wN
+ \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 }
+ {
+ \__kernel_msg_error:nnxxx { xparse } { verbatim-newline }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:N \l__xparse_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ {
+ \__kernel_msg_error:nnxxx { xparse } { verbatim-tokenized }
+ { \__xparse_environment_or_command: }
+ { \tl_to_str:N \l__xparse_v_arg_tl }
+ { \tl_to_str:n {#1} }
+ \__xparse_add_arg:o \c_novalue_tl
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_aux_put:N #1
+ {
+ \tl_put_right:Nx \l__xparse_v_arg_tl
+ {
+ \token_if_active:NTF #1
+ { \exp_not:N #1 } { \token_to_str:N #1 }
+ }
+ }
+\cs_new_protected:Npn \__xparse_grab_v_token_if_char:NTF #1
+ { \str_if_eq:eeTF { } { \str_tail:n {#1} } }
+\cs_new_protected:Npn \__xparse_add_arg:n #1
+ {
+ \tl_put_right:Nn \l__xparse_args_tl { {#1} }
+ \l__xparse_signature_tl \__xparse_run_code:
+ }
+\cs_generate_variant:Nn \__xparse_add_arg:n { V , o , x }
+\cs_new:Npn \__xparse_expandable_grab_D:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_D:NNNwNNn #1 \q__xparse #2 #3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_D:NNNwNNn ##1##2##3##4 \q__xparse ##5##6##7
+ {
+ \str_if_eq:nnTF {##2} {##7}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__xparse ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__xparse ##5##6 }
+ \q_nil { } ##2 \ERROR \q__xparse \ERROR
+ }
+ { ##4 {#1} \q__xparse ##5 ##6 {##7} }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_D:NNNwNNnnn #1#2#3#4 \q__xparse #5#6#7#8#9
+ {
+ \exp_args:Nof \__xparse_expandable_grab_D:nnNNNwNN
+ { \use_ii:nn #7 #2 }
+ { \__xparse_expandable_grab_D:Nw #3 \exp_stop_f: #8 #9 }
+ #1#2#3 #4 \q__xparse #5 #6
+ }
+\cs_new:Npn \__xparse_expandable_grab_D:Nw #1#2 \ERROR \ERROR { #2 #1 }
+\cs_new:Npn \__xparse_expandable_grab_D:nnNNNwNN #1#2#3#4#5#6 \q__xparse #7#8
+ {
+ \exp_args:No \tl_if_empty:oTF
+ { #3 { \use_none:nnn } #2 \q__xparse #5 #4 \q__xparse #5 }
+ {
+ \tl_if_blank:oTF { \use_none:nn #1#2 }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:nn #1#2 } }
+ { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_iii:nnn #1#2 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:nn #1#2 } }
+ }
+ #6 \q__xparse #7 #8
+ }
+ {
+ #3
+ { \__xparse_expandable_grab_D:NNNwNNnnn #3#4#5#6 \q__xparse #7 #8 }
+ \q_nil {#1} #2 \ERROR \q__xparse \ERROR
+ }
+ }
+\cs_new:Npn \__xparse_expandable_grab_D_alt:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_D_alt:NNwNNn #1 \q__xparse #2 #3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_D_alt:NNwNNn ##1##2##3 \q__xparse ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__xparse }
+ ##6 \ERROR
+ }
+ { ##3 {#1} \q__xparse ##4 ##5 {##6} }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_D_alt:NNwn #1#2#3 \q__xparse #4
+ {
+ \tl_if_blank:oTF { \use_none:n #4 }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #4 } }
+ {
+ \str_if_eq:eeTF
+ { \exp_not:o { \use_none:n #4 } }
+ { { \exp_not:o { \use_ii:nnn #4 \q_nil } } }
+ { \__xparse_put_arg_expandable:ow { \use_ii:nn #4 } }
+ { \__xparse_put_arg_expandable:ow { \use_none:n #4 } }
+ }
+ #3 \q__xparse #1 #2
+ }
+\cs_new:Npn \__xparse_expandable_grab_E:w #1 \q__xparse #2#3
+ { \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2 #3 #3 }
+\cs_new:Npn \__xparse_expandable_grab_E_long:w #1 \q__xparse #2#3
+ { \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2 #3 #2 }
+\cs_new:Npn \__xparse_expandable_grab_E_aux:w #1 \q__xparse #2#3#4
+ { #2 { \__xparse_expandable_grab_E_test:nnw #1 \q__xparse #2 #3 #4 } }
+\cs_new:Npn \__xparse_expandable_grab_E_test:nnw #1#2#3 \q__xparse #4#5#6#7
+ {
+ \__xparse_expandable_grab_E_loop:nnnNNw {#7} { } { }
+ #1 \q_nil \q_nil \q_nil \q_mark #2 \q_nil
+ #3 \q__xparse #4 #5 #6
+ }
+\cs_new:Npn \__xparse_expandable_grab_E_loop:nnnNNw
+ #1#2#3#4#5#6 \q_nil #7 \q_mark #8
+ {
+ \quark_if_nil:NTF #4
+ { \__xparse_expandable_grab_E_end:nnw {#1} {#3} }
+ {
+ \tl_if_novalue:nTF {#8}
+ { \str_if_eq:onTF { #4 { } #1 #5 } {#5} }
+ { \use_ii:nn }
+ { \__xparse_expandable_grab_E_find:w { #2 #4 #5 #6 } {#3} ~ }
+ {
+ \__xparse_expandable_grab_E_loop:nnnNNw
+ {#1} { #2 #4 #5 } { #3 {#8} }
+ #6 \q_nil #7 \q_mark
+ }
+ }
+ }
+\cs_new:Npn \__xparse_expandable_grab_E_find:w #1 \q__xparse #2#3#4
+ { #4 { \__xparse_expandable_grab_E_find:nnw #1 \q__xparse #2 #3 #4 } }
+\cs_new:Npn \__xparse_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q__xparse #5#6#7#8
+ { \__xparse_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q__xparse #5 #6 #7 }
+\cs_new:Npn \__xparse_expandable_grab_E_end:nnw #1#2#3 \q__xparse #4#5#6
+ { #3 #2 \q__xparse #4 #5 {#1} }
+\cs_new:Npn \__xparse_expandable_grab_m:w #1 \q__xparse #2#3
+ { #3 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_m_long:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_m_aux:wNn #1 \q__xparse #2#3#4
+ { #1 {#4} \q__xparse #2 #3 }
+\cs_new:Npn \__xparse_expandable_grab_R:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_R_aux:NNNwNNn #1 \q__xparse #2#3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_R_aux:NNNwNNn ##1##2##3##4 \q__xparse ##5##6##7
+ {
+ \str_if_eq:nnTF {##7} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } { } ##7 ##2 \q__xparse ##3 }
+ { { } {##2} { } }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q__xparse ##5##6 }
+ \q_nil { } ##2 \ERROR \q__xparse \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { xparse } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } }
+ { \tl_to_str:n {##2} }
+ ##4 {#1} \q__xparse ##5 ##6 {##7}
+ }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_R_alt:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_R_alt_aux:NNwNNn #1 \q__xparse #2#3 } }
+\cs_set_protected:Npn \__xparse_tmp:w #1
+ {
+ \cs_new:Npn \__xparse_expandable_grab_R_alt_aux:NNwNNn ##1##2##3 \q__xparse ##4##5##6
+ {
+ \str_if_eq:nnTF {##6} {##2}
+ {
+ \str_if_eq:onTF
+ { ##1 { } ##6 ##2 ##2 }
+ { { } ##2 }
+ }
+ { \use_ii:nn }
+ {
+ ##1
+ { \__xparse_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q__xparse }
+ ##6 \ERROR
+ }
+ {
+ \__kernel_msg_expandable_error:nnff
+ { xparse } { missing-required }
+ { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } }
+ { \tl_to_str:n {##2} }
+ ##3 {#1} \q__xparse ##4 ##5 {##6}
+ }
+ }
+ }
+\exp_args:No \__xparse_tmp:w { \c_novalue_tl }
+\cs_new:Npn \__xparse_expandable_grab_t:w #1 \q__xparse #2#3
+ { #2 { \__xparse_expandable_grab_t_aux:NNwn #1 \q__xparse #2 #3 } }
+\cs_new:Npn \__xparse_expandable_grab_t_aux:NNwn #1#2#3 \q__xparse #4#5#6
+ {
+ \str_if_eq:onTF { #1 { } #6 #2 } {#2}
+ { #3 { \BooleanTrue } \q__xparse #4 #5 }
+ { #3 { \BooleanFalse } \q__xparse #4 #5 {#6} }
+ }
+\cs_new:Npn \__xparse_put_arg_expandable:nw #1#2 \q__xparse { #2 {#1} \q__xparse }
+\cs_generate_variant:Nn \__xparse_put_arg_expandable:nw { o }
+\cs_new_protected:Npn \__xparse_bool_reverse:N #1
+ {
+ \bool_if:NTF #1
+ { \tl_set:Nn \ProcessedArgument { \c_false_bool } }
+ { \tl_set:Nn \ProcessedArgument { \c_true_bool } }
+ }
+\seq_new:N \l__xparse_split_list_seq
+\tl_new:N \l__xparse_split_list_tl
+\cs_new_protected:Npn \__xparse_split_list:nn #1#2
+ {
+ \tl_if_single:nTF {#1}
+ {
+ \token_if_cs:NTF #1
+ { \__xparse_split_list_multi:nn {#1} {#2} }
+ { \__xparse_split_list_single:Nn #1 {#2} }
+ }
+ { \__xparse_split_list_multi:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__xparse_split_list_multi:nn #1#2
+ {
+ \seq_set_split:Nnn \l__xparse_split_list_seq {#1} {#2}
+ \tl_clear:N \ProcessedArgument
+ \seq_map_inline:Nn \l__xparse_split_list_seq
+ { \tl_put_right:Nn \ProcessedArgument { {##1} } }
+ }
+\cs_generate_variant:Nn \__xparse_split_list_multi:nn { nV }
+\group_begin:
+\char_set_catcode_active:N \^^@
+\cs_new_protected:Npn \__xparse_split_list_single:Nn #1#2
+ {
+ \tl_set:Nn \l__xparse_split_list_tl {#2}
+ \group_begin:
+ \char_set_lccode:nn { `\^^@ } { `#1 }
+ \tex_lowercase:D
+ {
+ \group_end:
+ \tl_replace_all:Nnn \l__xparse_split_list_tl { ^^@ }
+ } {#1}
+ \__xparse_split_list_multi:nV {#1} \l__xparse_split_list_tl
+ }
+\group_end:
+\cs_new_protected:Npn \__xparse_split_argument:nnn #1#2#3
+ {
+ \__xparse_split_list:nn {#2} {#3}
+ \exp_args:Nf \__xparse_split_argument_aux:nnnn
+ { \tl_count:N \ProcessedArgument }
+ {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \__xparse_split_argument_aux:nnnn #1#2#3#4
+ {
+ \int_compare:nNnF {#1} = { #2 + 1 }
+ {
+ \int_compare:nNnTF {#1} > { #2 + 1 }
+ {
+ \tl_set:Nx \ProcessedArgument
+ {
+ \exp_last_unbraced:NnNo
+ \__xparse_split_argument_aux:n
+ { #2 + 1 }
+ \use_none_delimit_by_q_stop:w
+ \ProcessedArgument
+ \q_stop
+ }
+ \__kernel_msg_error:nnxxx { xparse } { split-excess-tokens }
+ { \tl_to_str:n {#3} } { \int_eval:n { #2 + 1 } }
+ { \tl_to_str:n {#4} }
+ }
+ {
+ \tl_put_right:Nx \ProcessedArgument
+ {
+ \prg_replicate:nn { #2 + 1 - (#1) }
+ { { \exp_not:V \c_novalue_tl } }
+ }
+ }
+ }
+ }
+\cs_new:Npn \__xparse_split_argument_aux:n #1
+ { \prg_replicate:nn {#1} { \__xparse_split_argument_aux:wn } }
+\cs_new:Npn \__xparse_split_argument_aux:wn #1 \use_none_delimit_by_q_stop:w #2
+ {
+ \exp_not:n { {#2} }
+ #1
+ \use_none_delimit_by_q_stop:w
+ }
+\cs_new_protected:Npn \__xparse_trim_spaces:n #1
+ { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error:N #1
+ {
+ \bool_set_false:N \l__xparse_environment_bool
+ \tl_set:Nn \l__xparse_fn_tl {#1}
+ \__xparse_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error:n #1
+ {
+ \bool_set_true:N \l__xparse_environment_bool
+ \str_set:Nx \l__xparse_environment_str {#1}
+ \__xparse_get_arg_spec_error_aux:n
+ { \cs_if_exist:cTF { \l__xparse_environment_str } }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec_error_aux:n #1
+ {
+ #1
+ {
+ \__kernel_msg_error:nnx { xparse } { non-xparse }
+ { \__xparse_environment_or_command: }
+ }
+ {
+ \__kernel_msg_error:nnx { xparse } { unknown }
+ { \__xparse_environment_or_command: }
+ }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:NTF #1#2#3
+ {
+ \__xparse_cmd_if_xparse:NTF #1
+ {
+ \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
+ #2
+ }
+ {#3}
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:N #1
+ {
+ \__xparse_get_arg_spec:NTF #1 { }
+ { \__xparse_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_get_arg_spec:n #1
+ {
+ \exp_args:Nc \__xparse_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { }
+ { \__xparse_get_arg_spec_error:n {#1} }
+ }
+\tl_new:N \ArgumentSpecification
+\cs_new_protected:Npn \__xparse_show_arg_spec:N #1
+ {
+ \__xparse_get_arg_spec:NTF #1
+ { \tl_show:N \ArgumentSpecification }
+ { \__xparse_get_arg_spec_error:N #1 }
+ }
+\cs_new_protected:Npn \__xparse_show_arg_spec:n #1
+ {
+ \exp_args:Nc \__xparse_get_arg_spec:NTF
+ { environment~ \tl_to_str:n {#1} }
+ { \tl_show:N \ArgumentSpecification }
+ { \__xparse_get_arg_spec_error:n {#1} }
+ }
+\cs_new_protected:Npn \__xparse_check_definable:nNT #1
+ { \tl_trim_spaces_apply:nN {#1} \__xparse_check_definable_aux:nN }
+\group_begin:
+ \char_set_catcode_active:n { `? }
+ \cs_new_protected:Npn \__xparse_check_definable_aux:nN #1#2
+ {
+ \group_begin:
+ \tl_if_single_token:nTF {#1}
+ {
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ {
+ \exp_args:Nx \char_set_lccode:nn
+ { ` \str_head:n {#1} } { `? }
+ \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
+ { \group_end: \use_iii:nnn }
+ { \group_end: \use_i:nnn }
+ }
+ { \group_end: \use_iii:nnn }
+ }
+ { \group_end: \use_ii:nnn }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-definable }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ {
+ \__kernel_msg_error:nnxx { xparse } { not-one-token }
+ { \tl_to_str:n {#1} } { \token_to_str:N #2 }
+ }
+ }
+\group_end:
+\cs_new_protected:Npn \__xparse_token_if_cs:NTF #1
+ {
+ \group_begin:
+ \int_set:Nn \tex_escapechar:D { 92 }
+ \exp_args:Nx \tl_if_empty:nTF
+ { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
+ { \group_end: \use_ii:nn }
+ { \group_end: \use_i:nn }
+ }
+\cs_new:Npn \__xparse_tl_mapthread_function:NNN #1#2#3
+ {
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN \__xparse_tl_mapthread_loop:w
+ \exp_after:wN \exp_after:wN
+ \exp_after:wN #3
+ \exp_after:wN #1
+ \exp_after:wN \q_recursion_tail
+ \exp_after:wN \q_mark
+ #2
+ \q_recursion_tail
+ \q_recursion_stop
+ }
+\cs_new:Npn \__xparse_tl_mapthread_function:nnN #1#2#3
+ {
+ \__xparse_tl_mapthread_loop:w #3
+ #1 \q_recursion_tail \q_mark
+ #2 \q_recursion_tail \q_recursion_stop
+ }
+\cs_new:Npn \__xparse_tl_mapthread_loop:w #1#2#3 \q_mark #4
+ {
+ \quark_if_recursion_tail_stop:n {#2}
+ \quark_if_recursion_tail_stop:n {#4}
+ #1 {#2} {#4}
+ \__xparse_tl_mapthread_loop:w #1#3 \q_mark
+ }
+\cs_new_protected:Npn \__xparse_cmd_if_xparse:NTF #1
+ {
+ \exp_args:Nf \str_case_e:nnTF
+ {
+ \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
+ {
+ \exp_last_unbraced:Nf \__xparse_cmd_if_xparse_aux:w
+ { \cs_replacement_spec:N #1 } ~ \q_stop
+ }
+ }
+ {
+ { \token_to_str:N \__xparse_start:nNNnnn } { }
+ { \token_to_str:N \__xparse_start_expandable:nNNNNn } { }
+ { \token_to_str:N \__xparse_start_env:nnnnn } { }
+ }
+ }
+\cs_new:Npn \__xparse_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1}
+\cs_new_protected:Npn \__xparse_peek_nonspace:NTF
+ { \__xparse_peek_nonspace_aux:nNNTF { } \__xparse_peek_meaning:NTF }
+\cs_new_protected:Npn \__xparse_peek_nonspace_remove:NTF
+ { \__xparse_peek_nonspace_aux:nNNTF { } \__xparse_peek_meaning_remove:NTF }
+\cs_new_protected:Npn \__xparse_peek_nonspace_aux:nNNTF #1#2#3#4#5
+ {
+ \peek_meaning_remove:NTF \c_space_token
+ { \__xparse_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} }
+ { #2 #3 { #4 } { #5 #1 } }
+ }
+\cs_new_protected:Npn \__xparse_peek_meaning:NTF
+ { \__xparse_peek_meaning_aux:NNTF \c_false_bool }
+\cs_new_protected:Npn \__xparse_peek_meaning_remove:NTF
+ { \__xparse_peek_meaning_aux:NNTF \c_true_bool }
+\cs_new_protected:Npn \__xparse_peek_meaning_aux:NNTF #1#2#3#4
+ {
+ \tl_set:Nn \l__xparse_tmpa_tl {#3}
+ \tl_set:Nn \l__xparse_tmpb_tl {#4}
+ \peek_meaning:NTF #2
+ {
+ \token_if_eq_meaning:NNTF #2 \c_group_begin_token
+ { \__xparse_peek_true_remove:Nw #1 }
+ {
+ \__xparse_token_if_cs:NTF #2
+ { \__xparse_peek_cs_check_equal:NNN #1 #2 }
+ { \__xparse_peek_true_remove:Nw #1 }
+ }
+ }
+ { \l__xparse_tmpb_tl }
+ }
+\cs_new_protected:Npn \__xparse_peek_cs_check_equal:NNN #1#2#3
+ {
+ \str_if_eq:nnTF {#2} {#3}
+ { \__xparse_peek_true_remove:Nw #1 }
+ { \l__xparse_tmpb_tl }
+ #3
+ }
+\cs_new_protected:Npn \__xparse_peek_true_remove:Nw #1
+ {
+ \bool_if:NTF #1
+ {
+ \tex_afterassignment:D \l__xparse_tmpa_tl
+ \cs_set_eq:NN \__xparse_tmp:w
+ }
+ { \l__xparse_tmpa_tl }
+ }
+\cs_new:Npn \__xparse_environment_or_command:
+ {
+ \bool_if:NTF \l__xparse_environment_bool
+ { environment ~ ' \l__xparse_environment_str ' }
+ {
+ command ~ '
+ \exp_args:Nf \tl_trim_spaces:n
+ { \exp_after:wN \token_to_str:N \l__xparse_fn_tl }
+ '
+ }
+ }
+\tl_const:Nn \c__xparse_ignore_def_tl
+ { \\ \\ LaTeX~will~ignore~this~entire~definition. }
+\__kernel_msg_new:nnnn { xparse } { arg-after-body }
+ { In~the~definition~of~#1,~b~(body)~argument~must~be~last. }
+ {
+ The~'body'~argument~type~is~followed~by~'#2'~in~the~argument~
+ specification~of~the~#1.~This~is~not~allowed.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { bad-arg-spec }
+ { Bad~argument~specification~'#2'~for~#1. }
+ {
+ The~argument~specification~provided~was~not~valid:~
+ one~or~more~mandatory~pieces~of~information~were~missing.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { command-already-defined }
+ { Command~'#1'~already~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { xparse } { command-not-yet-defined }
+ { Command ~'#1'~not~yet~defined! }
+ {
+ You~have~used~#2~
+ with~a~command~that~was~never~defined.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { environment-already-defined }
+ { Environment~'#1'~already~defined! }
+ {
+ You~have~used~\NewDocumentEnvironment
+ with~an~environment~that~already~has~a~definition. \\ \\
+ The~existing~definition~of~'#1'~will~not~be~altered.
+ }
+\__kernel_msg_new:nnnn { xparse } { environment-not-yet-defined }
+ { Environment~'#1'~not~yet~defined! }
+ {
+ You~have~used~\RenewDocumentEnvironment
+ with~an~environment~that~was~never~defined.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { expandable-ending-optional }
+ {
+ Argument~specification~'#2'~for~expandable~command~'#1'~
+ ends~with~optional~argument.
+ }
+ {
+ Expandable~commands~must~have~a~final~mandatory~argument~
+ (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
+ argument~with~expandable~commands.
+ }
+\__kernel_msg_new:nnnn { xparse } { inconsistent-long }
+ { Inconsistent~long~arguments~for~expandable~command~'#1'. }
+ {
+ The~arguments~for~an~expandable~command~must~not~involve~short~
+ arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types.
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-command-arg }
+ { Argument~type~'#2'~not~available~for~#1. }
+ {
+ The~letter~'#2'~can~only~be~used~in~environment~argument~
+ specifications,~not~for~commands.
+ \\ \\
+ LaTeX~will~ignore~this~entire~definition.
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-expandable-argument-type }
+ { Argument~type~'#2'~not~available~for~expandable~command~'#1'. }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { invalid-after-optional-expandably }
+ {
+ Argument~type~'#2'~not~available~after~optional~argument~
+ for~expandable~command~'#1'.
+ }
+ {
+ The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
+ in~an~expandable~command~after~an~optional~argument.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces }
+ { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. }
+ {
+ The~prefix~'!'~can~only~apply~to~trailing~optional~arguments.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-definable }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~
+ backslash~is~missing?
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-one-token }
+ { First~argument~of~'#2'~must~be~a~command. }
+ {
+ The~first~argument~of~'#2'~should~be~the~document~command~that~will~
+ be~defined.~The~provided~argument~'#1'~contains~more~than~one~
+ token.~Perhaps~a~backslash~is~missing?
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { not-single-token }
+ {
+ Argument~delimiter~'#2'~for~the~#1~should~be~
+ a~single~non-space~token.
+ }
+ {
+ The~argument~specification~provided~was~not~valid:~in~a~place~
+ where~a~single~token~is~required,~LaTeX~found~'#2'.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { forbidden-implicit-group-token }
+ { Argument~delimiter~'#2'~for~the~#1~is~not~allowed. }
+ {
+ The~argument~specification~provided~was~not~valid:~the~implicit~
+ #3-group~token~'#2'~is~not~allowed~as~an~argument~delimiter.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { processor-in-expandable }
+ { Argument~processor~'>{#2}'~cannot~be~used~for~the~expandable~command~'#1'. }
+ {
+ The~argument~specification~for~#1~contains~a~processor~function:~
+ this~is~only~supported~for~standard~robust~commands.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { too-many-arguments }
+ { Too~many~arguments~in~argument~specification~'#2'~of~#1. }
+ {
+ The~argument~specification~provided~has~more~than~9~arguments.~
+ This~cannot~be~implemented.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { two-markers }
+ { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~#1. }
+ {
+ The~argument~specification~provided~has~two~markers~'#2'~applying~
+ to~the~same~argument;~these~are~redundant.
+ }
+\__kernel_msg_new:nnnn { xparse } { unknown-argument-type }
+ { Unknown~argument~type~'#2'~for~the~#1. }
+ {
+ The~letter~'#2'~does~not~specify~a~known~argument~type.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnnn { xparse } { xparse-argument-type }
+ { Deprecated~argument~type~'#2'~for~the~#1~requires~xparse. }
+ {
+ The~letter~'#2'~specifies~a~known~argument~type~that~requires~
+ the~xparse~package.
+ \c__xparse_ignore_def_tl
+ }
+\__kernel_msg_new:nnn { xparse } { if-boolean }
+ { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
+\__kernel_msg_new:nnnn { xparse } { loop-in-defaults }
+ { Defaults~of~#1~have~circular~dependency. }
+ {
+ The~default~values~of~two~or~more~arguments~of~the~#1~
+ depend~on~each~other~in~a~way~that~cannot~be~resolved.
+ }
+\__kernel_msg_new:nnnn { xparse } { missing-required }
+ { Missing~required~argument~for~#1. }
+ {
+ The~current~#1~expects~an~argument~starting~with~'#2'.~
+ LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed.
+ }
+\__kernel_msg_new:nnnn { xparse } { non-xparse }
+ { \str_uppercase:n #1~not~defined~using~xparse. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~this~was~not~defined~using~xparse.
+ }
+\__kernel_msg_new:nnnn { xparse } { split-excess-tokens }
+ { Too~many~'#1'~tokens~when~trying~to~split~argument. }
+ {
+ LaTeX~was~asked~to~split~the~input~'#3'~
+ at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~
+ There~were~too~many~'#1'~tokens.
+ }
+\__kernel_msg_new:nnnn { xparse } { unknown }
+ { Unknown~document~#1. }
+ {
+ You~have~asked~for~the~argument~specification~for~the~#1,~
+ but~it~is~not~defined.
+ }
+\__kernel_msg_new:nnnn { xparse } { verbatim-newline }
+ { Verbatim~argument~of~#1~ended~by~end~of~line. }
+ {
+ The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
+ but~the~end~
+ of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
+ closing~delimiter.
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnnn { xparse } { verbatim-tokenized }
+ { The~verbatim~#1~cannot~be~used~inside~an~argument. }
+ {
+ The~#1~takes~a~verbatim~argument.~
+ It~may~not~appear~within~the~argument~of~another~function.~
+ It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
+ \\ \\
+ LaTeX~will~ignore~'#2'.
+ }
+\__kernel_msg_new:nnn { xparse } { define-command }
+ {
+ Defining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { define-environment }
+ {
+ Defining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { redefine-command }
+ {
+ Redefining~command~#1~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { redefine-environment }
+ {
+ Redefining~environment~'#1'~
+ with~sig.~'#2'~\msg_line_context:.
+ }
+\__kernel_msg_new:nnn { xparse } { optional-mandatory }
+ {
+ Since~the~mandatory~argument~'#1'~has~the~same~delimiter~'#2'~
+ as~a~previous~optional~argument,~it~will~not~be~possible~to~
+ omit~all~optional~arguments~when~calling~this~command.
+ }
+\__kernel_msg_new:nnn { xparse } { unsupported-let }
+ {
+ The~command~'#1'~was~undefined~but~not~the~associated~commands~
+ '#1~code'~and/or~'#1~defaults'.~Maybe~you~tried~using~
+ \iow_char:N\\let.~This~may~lead~to~an~infinite~loop.
+ }
+\cs_new_eq:NN \BooleanFalse \c_false_bool
+\cs_new_eq:NN \BooleanTrue \c_true_bool
+\cs_new_protected:Npn \NewDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \NewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewDocumentCommand }
+ }
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \RenewDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \ProvideDocumentCommand
+ { \cs_if_exist:NF #1 { \__xparse_declare_cmd:Nnn #1 {#2} {#3} } }
+ }
+\cs_new_protected:Npn \DeclareDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \DeclareDocumentCommand
+ { \__xparse_declare_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__kernel_msg_error:nnx { xparse } { environment-already-defined } {#1} }
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ { \__kernel_msg_error:nnx { xparse } { environment-not-yet-defined } {#1} }
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ { \cs_if_exist:cF {#1} { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} } }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ { \__xparse_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \NewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-already-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \NewExpandableDocumentCommand }
+ }
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \RenewExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \RenewExpandableDocumentCommand
+ {
+ \cs_if_exist:NTF #1
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ {
+ \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
+ { \use:nnn \token_to_str:N #1 { } }
+ { \token_to_str:N \RenewExpandableDocumentCommand }
+ }
+ }
+ }
+\cs_new_protected:Npn \ProvideExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \ProvideExpandableDocumentCommand
+ {
+ \cs_if_exist:NF #1
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+ }
+\cs_new_protected:Npn \DeclareExpandableDocumentCommand #1#2#3
+ {
+ \__xparse_check_definable:nNT {#1} \DeclareExpandableDocumentCommand
+ { \__xparse_declare_expandable_cmd:Nnn #1 {#2} {#3} }
+ }
+\cs_new:Npn \IfBooleanTF #1
+ {
+ \tl_if_single:nF {#1}
+ { \prg_break:n { \use:n } }
+ \tl_if_single_token:nF #1
+ { \prg_break:n { \use:n } }
+ \token_if_eq_meaning:NNT #1 \c_true_bool
+ { \prg_break:n { \use_ii:nnn } }
+ \token_if_eq_meaning:NNT #1 \c_false_bool
+ { \prg_break:n { \use_iii:nnn } }
+ \prg_break:n { \use:n }
+ \prg_break_point:
+ {
+ \__kernel_msg_expandable_error:nnn { xparse } { if-boolean } {#1}
+ \use_ii:nn
+ }
+ }
+\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
+\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
+\cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF
+\cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT
+\cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF
+\cs_new:Npn \IfValueF { \tl_if_novalue:nT }
+\cs_new:Npn \IfValueT { \tl_if_novalue:nF }
+\cs_new:Npn \IfValueTF #1#2#3 { \tl_if_novalue:nTF {#1} {#3} {#2} }
+\tl_new:N \ProcessedArgument
+\cs_new_eq:NN \ReverseBoolean \__xparse_bool_reverse:N
+\cs_new_eq:NN \SplitArgument \__xparse_split_argument:nnn
+\cs_new_eq:NN \SplitList \__xparse_split_list:nn
+\cs_new_eq:NN \TrimSpaces \__xparse_trim_spaces:n
+\cs_new_eq:NN \ProcessList \tl_map_function:nN
+\cs_new_protected:Npn \GetDocumentCommandArgSpec #1
+ {
+ \__xparse_check_definable:nNT {#1} \GetDocumentCommandArgSpec
+ { \__xparse_get_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \GetDocumentEnvironmentArgSpec \__xparse_get_arg_spec:n
+\cs_new_protected:Npn \ShowDocumentCommandArgSpec #1
+ {
+ \__xparse_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
+ { \__xparse_show_arg_spec:N #1 }
+ }
+\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \__xparse_show_arg_spec:n
+\__xparse_file_end_hook:
+%%
+%%
+%% End of file `xparse-generic.tex'.
diff --git a/macros/latex/contrib/l3packages/xparse.dtx b/macros/latex/contrib/l3packages/xparse.dtx
index b6c490df17..3ea422301a 100644
--- a/macros/latex/contrib/l3packages/xparse.dtx
+++ b/macros/latex/contrib/l3packages/xparse.dtx
@@ -3,8 +3,8 @@
%% File: xparse.dtx
%
% Copyright (C) 1999 Frank Mittelbach, Chris Rowley, David Carlisle
-% (C) 2004-2008 Frank Mittelbach, The LaTeX3 Project
-% (C) 2009-2020 The LaTeX3 Project
+% (C) 2004-2008 Frank Mittelbach, The LaTeX Project
+% (C) 2009-2021 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
@@ -59,7 +59,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -67,7 +67,7 @@
% }^^A
% }
%
-% \date{Released 2020-10-27}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -928,7 +928,7 @@
% \begin{function}{\GetDocumentCommandArgSpec, \GetDocumentEnvironmentArgSpec}
% \begin{syntax}
% \cs{GetDocumentCommandArgSpec} \meta{function}
-% \cs{GetDocumentEnvironmentArgSpec} \meta{environment}
+% \cs{GetDocumentEnvironmentArgSpec} \Arg{environment}
% \end{syntax}
% These functions transfer the current argument specification for the
% requested \meta{function} or \meta{environment} into the token list
@@ -942,7 +942,7 @@
% {\ShowDocumentCommandArgSpec, \ShowDocumentEnvironmentArgSpec}
% \begin{syntax}
% \cs{ShowDocumentCommandArgSpec} \meta{function}
-% \cs{ShowDocumentEnvironmentArgSpec} \meta{environment}
+% \cs{ShowDocumentEnvironmentArgSpec} \Arg{environment}
% \end{syntax}
% These functions show the current argument specification for the
% requested \meta{function} or \meta{environment} at the terminal. If
@@ -970,1107 +970,159 @@
% \section{\pkg{xparse} implementation}
%
% \begin{macrocode}
-%<@@=xparse>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*2ekernel>
-\everyjob\expandafter{\the\everyjob
- \message{xparse <2020-03-03>}%
-}
-\ExplSyntaxOn
-%</2ekernel>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage{xparse}{2020-10-27}{}
- {L3 Experimental document command parser}
-% \end{macrocode}
-%
-% \subsection{Package options}
-%
-% \begin{variable}{\l_@@_options_clist}
-% \begin{variable}{\l_@@_log_bool}
-% Key--value option to log information: done by hand to keep dependencies
-% down.
-% \begin{macrocode}
-\clist_new:N \l_@@_options_clist
-\DeclareOption* { \clist_put_right:NV \l_@@_options_clist \CurrentOption }
-\ProcessOptions \relax
-\keys_define:nn { xparse }
- {
- log-declarations .bool_set:N = \l_@@_log_bool ,
- log-declarations .initial:n = false
- }
-\keys_set:nV { xparse } \l_@@_options_clist
-\bool_if:NF \l_@@_log_bool
- { \msg_redirect_module:nnn { LaTeX / xparse } { info } { none } }
-%</package>
-% \end{macrocode}
-% \end{variable}
-% \end{variable}
-%
-% \subsection{Catcode regime check}
-%
-% \begin{macrocode}
-%<*core>
-\if_charcode:w xx
- \cs_gset:Npn \@@_file_end_hook: { }
-\else
- \ExplSyntaxOn
- \cs_gset:Npn \@@_file_end_hook: { \ExplSyntaxOff }
-\fi:
-%</core>
-% \end{macrocode}
-%
-% \subsection{Reload check}
-%
-% A simple reload check.
-% \begin{macrocode}
-%<*core>
-\cs_if_exist:NT \NewDocumentCommand
- { \file_input_stop: }
-%</core>
-% \end{macrocode}
-%
-% Load the core code. We use \tn{input} here as there can be
-% an issue if the user has |openin_any = p| with older binaries.
-% \begin{macrocode}
%<*2ekernel|package>
-\input xparse-generic.tex ~
-%</2ekernel|package>
% \end{macrocode}
%
-% \subsection{Variables and constants}
-%
-% \begin{macrocode}
-%<*core>
-% \end{macrocode}
-%
-% \begin{variable}{\l_@@_arg_spec_tl}
-% Holds the argument specification after normalization of shorthands.
-% \begin{macrocode}
-\tl_new:N \l_@@_arg_spec_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_args_tl}
-% Token list variable for grabbed arguments.
-% \begin{macrocode}
-\tl_new:N \l_@@_args_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_args_i_tl, \l_@@_args_ii_tl}
-% Hold the modified arguments when dealing with default values or
-% processors.
-% \begin{macrocode}
-\tl_new:N \l_@@_args_i_tl
-\tl_new:N \l_@@_args_ii_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_current_arg_int}
-% The number of the current argument being set up: this is used to
-% make sure there are at most 9 arguments, then for creating the
-% expandable auxiliary functions and knowing how many arguments the
-% code function should take.
-% \begin{macrocode}
-\int_new:N \l_@@_current_arg_int
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_defaults_bool, \l_@@_defaults_tl}
-% The boolean indicates whether there are any argument with default
-% value other than |-NoValue-|; the token list holds the code to
-% determine these default values in terms of other arguments.
-% \begin{macrocode}
-\bool_new:N \l_@@_defaults_bool
-\tl_new:N \l_@@_defaults_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_environment_bool}
-% Generating environments uses the same mechanism as generating functions.
-% However, full processing of arguments is always needed for environments,
-% and so the function-generating code needs to know this.
-% This variable is also used at run time to give correct error messages.
% \begin{macrocode}
-\bool_new:N \l_@@_environment_bool
+%<@@=cmd>
% \end{macrocode}
-% \end{variable}
%
-% \begin{variable}{\l_@@_environment_str}
-% Name of the environment, used at definition time and at run time.
-% \begin{macrocode}
-\str_new:N \l_@@_environment_str
-% \end{macrocode}
-% \end{variable}
+% This package file, along with the frozen versions in
+% \pkg{xparse-2018-04-12}, \pkg{xparse-2020-10-01}, and
+% |xparse-generic.tex|, is intended to work across different \LaTeX{}
+% releases, respected the minimum \pkg{expl3} version required by
+% \pkg{xparse}.
%
-% \begin{variable}{\l_@@_expandable_bool}
-% Used to indicate if an expandable command is begin generated, as this
-% affects both the acceptable argument types and how they are implemented.
-% \begin{macrocode}
-\bool_new:N \l_@@_expandable_bool
-% \end{macrocode}
-% \end{variable}
+% We can't use the \pkg{latexrelease} mechanism with \cs{DeclareRelease}
+% here because cases of rolling forwards or backwards differ, due to the
+% prefix change from |xparse| to |cmd|, so we do our own checks to
+% ensure the right version is loaded.
%
-% \begin{variable}{\l_@@_expandable_aux_name_tl}
-% Used to create pretty-printing names for the auxiliaries: although the
-% immediate definition does not vary, the full expansion does and so it
-% does not count as a constant.
-% \begin{macrocode}
-\tl_new:N \l_@@_expandable_aux_name_tl
-\tl_set:Nn \l_@@_expandable_aux_name_tl
- {
- \l_@@_function_tl \c_space_tl
- ( arg~ \int_use:N \l_@@_current_arg_int )
- }
-% \end{macrocode}
-% \end{variable}
+% All this loading assumes that if \pkg{latexrelease} should be loaded,
+% it is before \pkg{xparse}. The other way around was not tested at all
+% and is likely to break.
%
-% \begin{variable}{\g_@@_grabber_int}
-% Used (in exceptional cases) to get unique names for grabbers used by
-% expandable commands.
-% \begin{macrocode}
-\int_new:N \g_@@_grabber_int
-% \end{macrocode}
-% \end{variable}
+% In releases prior to 2020-10-01, \cs{NewDocumentCommand} is undefined,
+% so \pkg{xparse} was not loaded, thus we can load the full version from
+% \pkg{xparse-2018-04-12}. Otherwise we will load only the deprecated
+% argument types from \pkg{xparse-2020-10-01}. If we're in |2ekernel|
+% mode, it means rolling forward so load only the code code from
+% |xparse-generic.tex|.
%
-% \begin{variable}{\l_@@_fn_tl}
-% For passing the pre-formed name of the auxiliary to be used as the
-% parsing function.
-% \begin{macrocode}
-\tl_new:N \l_@@_fn_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_fn_code_tl}
-% For passing the pre-formed name of the auxiliary that contains the
-% actual code.
-% \begin{macrocode}
-\tl_new:N \l_@@_fn_code_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_function_tl}
-% Holds the control sequence name of the function currently being
-% defined: used to avoid passing this as an argument and to avoid repeated
-% use of \cs{cs_to_str:N}.
-% \begin{macrocode}
-\tl_new:N \l_@@_function_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_grab_expandably_bool}
-% When defining a non-expandable command, indicates whether the
-% arguments can all safely be grabbed by expandable grabbers. This is
-% to support abuses of \pkg{xparse} that use protected functions
-% inside csname constructions.
-% \begin{macrocode}
-\bool_new:N \l_@@_grab_expandably_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_obey_spaces_bool}
-% For trailing optionals.
-% \begin{macrocode}
-\bool_new:N \l_@@_obey_spaces_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_last_delimiters_tl}
-% Holds the delimiters (first tokens) of all optional arguments since
-% the previous mandatory argument, to warn about cases where it would
-% be impossible to omit optional arguments completely because the
-% following mandatory argument has the same delimiter as one of the
-% optional arguments.
-% \begin{macrocode}
-\tl_new:N \l_@@_last_delimiters_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_long_bool}
-% Used to indicate that an argument is long, on a per-argument basis.
-% \begin{macrocode}
-\bool_new:N \l_@@_long_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_m_args_int}
-% The number of \texttt{m} arguments: if this is the same as the total
-% number of arguments, then a short-cut can be taken in the creation of
-% the grabber code.
-% \begin{macrocode}
-\int_new:N \l_@@_m_args_int
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_prefixed_bool}
-% When preparing the signature of non-expandable commands, indicates
-% that the current argument is affected by a processor or by |+|
-% (namely is long).
-% \begin{macrocode}
-\bool_new:N \l_@@_prefixed_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_process_all_tl, \l_@@_process_one_tl, \l_@@_process_some_bool}
-% When preparing the signature, the processors that will be applied to
-% a given argument are collected in \cs{l_@@_process_one_tl}, while
-% \cs{l_@@_process_all_tl} contains processors for all arguments. The
-% boolean indicates whether there are any processors (to bypass the
-% whole endeavour otherwise).
-% \begin{macrocode}
-\tl_new:N \l_@@_process_all_tl
-\tl_new:N \l_@@_process_one_tl
-\bool_new:N \l_@@_process_some_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_saved_args_tl}
-% Stores \cs{l_@@_args_tl} to deal with space-trimming of
-% \texttt{b}-type arguments.
-% \begin{macrocode}
-\tl_new:N \l_@@_saved_args_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_signature_tl}
-% Used when constructing the signature (code for argument grabbing) to
-% hold what will become the implementation of the main function.
-% When arguments are grabbed (at point of use of the command/environment),
-% it also stores the code for grabbing the remaining arguments.
-% \begin{macrocode}
-\tl_new:N \l_@@_signature_tl
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}
-% {\l_@@_some_obey_spaces_bool, \l_@@_some_long_bool, \l_@@_some_short_bool}
-% These flags are set while normalizing the argument specification.
-% The \texttt{obey_spaces} one is used to detect when |!| is used on
-% an argument that is not a trailing optional argument.
-% The other two are used to check whether all short arguments appear
-% before long arguments: this is needed to grab arguments expandably.
-% As soon as the first long argument is seen (other than
-% \texttt{t}-type, whose long status is ignored) the
-% \texttt{some_long} flag is set. The \texttt{some_short} flag is
-% used for expandable commands, to know whether to define a short
-% auxiliary too.
-% \begin{macrocode}
-\bool_new:N \l_@@_some_obey_spaces_bool
-\bool_new:N \l_@@_some_long_bool
-\bool_new:N \l_@@_some_short_bool
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\l_@@_tmp_prop, \l_@@_tmpa_tl, \l_@@_tmpb_tl}
-% \begin{macro}{\@@_tmp:w}
-% Scratch space.
-% \begin{macrocode}
-\prop_new:N \l_@@_tmp_prop
-\tl_new:N \l_@@_tmpa_tl
-\tl_new:N \l_@@_tmpb_tl
-\cs_new_eq:NN \@@_tmp:w ?
-% \end{macrocode}
-% \end{macro}
-% \end{variable}
-%
-% \subsection{Declaring commands and environments}
-%
-% \begin{macro}{\@@_declare_cmd:Nnn, \@@_declare_expandable_cmd:Nnn}
-% \begin{macro}{\@@_declare_cmd_aux:Nnn}
-% \begin{macro}
-% {\@@_declare_cmd_internal:Nnnn, \@@_declare_cmd_internal:cnxn}
-% The main functions for creating commands set the appropriate flag then
-% use the same internal code to do the definition.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd:Nnn
- {
- \bool_set_false:N \l_@@_expandable_bool
- \@@_declare_cmd_aux:Nnn
- }
-\cs_new_protected:Npn \@@_declare_expandable_cmd:Nnn
- {
- \bool_set_true:N \l_@@_expandable_bool
- \@@_declare_cmd_aux:Nnn
- }
-% \end{macrocode}
-% The first stage is to log information, both for the user in the log and
-% for programmatic use in a property list of all declared commands.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_aux:Nnn #1#2#3
- {
- \cs_if_exist:NTF #1
- {
- \__kernel_msg_info:nnxx { xparse } { redefine-command }
- { \token_to_str:N #1 } { \tl_to_str:n {#2} }
- }
- {
- \bool_lazy_or:nnT
- { \cs_if_exist_p:c { \cs_to_str:N #1 ~ code } }
- { \cs_if_exist_p:c { \cs_to_str:N #1 ~ defaults } }
- {
- \__kernel_msg_warning:nnx { xparse } { unsupported-let }
- { \token_to_str:N #1 }
- }
- \__kernel_msg_info:nnxx { xparse } { define-command }
- { \token_to_str:N #1 } { \tl_to_str:n {#2} }
- }
- \bool_set_false:N \l_@@_environment_bool
- \@@_declare_cmd_internal:Nnnn #1 {#2} {#3} { }
- }
-% \end{macrocode}
-% At definition time, the variable \cs{l_@@_fn_tl} is only used for error messages.
-% The real business of defining a document command starts with setting up
-% the appropriate name, then normalizing the argument specification to get rid of
-% shorthands.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_internal:Nnnn #1#2#3#4
- {
- \tl_set:Nx \l_@@_function_tl { \cs_to_str:N #1 }
- \tl_set:Nx \l_@@_fn_tl
- { \exp_not:c { \l_@@_function_tl \c_space_tl } }
- \@@_normalize_arg_spec:n {#2}
- \exp_args:No \@@_prepare_signature:n \l_@@_arg_spec_tl
- \@@_declare_cmd_code:Nnn #1 {#2} {#3}
- #4
- \@@_break_point:n {#2}
- }
-\cs_generate_variant:Nn \@@_declare_cmd_internal:Nnnn { cnx }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_break_point:n}
-% A marker used to escape from creating a definition if necessary.
-% \begin{macrocode}
-\cs_new_eq:NN \@@_break_point:n \use_none:n
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_declare_cmd_code:Nnn}
-% \begin{macro}
-% {\@@_declare_cmd_code_aux:Nnn, \@@_declare_cmd_code_expandable:Nnn}
-% The appropriate auxiliary is called.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_code:Nnn
- {
- \bool_if:NTF \l_@@_grab_expandably_bool
- { \@@_declare_cmd_code_expandable:Nnn }
- { \@@_declare_cmd_code_aux:Nnn }
- }
-% \end{macrocode}
-% Standard functions call \cs{@@_start:nNNnnn}, which receives the
-% argument specification, an auxiliary used for
-% grabbing arguments, an auxiliary containing the code, and then the
-% signature, default arguments, and processors.
+% In |2ekernel| mode we anticipate the definition of two macros to parse
+% dates so that we can compare \cs{fmtdate} properly.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_code_aux:Nnn #1#2#3
+%<*2ekernel>
+\def\@parse@version#1/#2/#3#4#5\@nil{%
+ \@parse@version@dash#1-#2-#3#4\@nil}
+\def\@parse@version@dash#1-#2-#3#4#5\@nil{%
+ \if\relax#2\relax\else#1\fi#2#3#4 }
+%</2ekernel>
+\ExplSyntaxOn
+\cs_if_free:NTF \NewDocumentCommand
{
- \cs_generate_from_arg_count:cNnn
- { \l_@@_function_tl \c_space_tl code }
- \cs_set_protected:Npn \l_@@_current_arg_int {#3}
- \cs_set_protected_nopar:Npx #1
- {
- \bool_if:NTF \l_@@_environment_bool
- {
- \@@_start_env:nnnnn { \exp_not:n {#2} }
- { \l_@@_environment_str }
- }
- {
- \@@_start:nNNnnn { \exp_not:n {#2} }
- \exp_not:c { \l_@@_function_tl \c_space_tl }
- \exp_not:c { \l_@@_function_tl \c_space_tl code }
- }
- { \exp_not:o \l_@@_signature_tl }
- {
- \bool_if:NT \l_@@_defaults_bool
- { \exp_not:o \l_@@_defaults_tl }
- }
- {
- \bool_if:NT \l_@@_process_some_bool
- { \exp_not:o \l_@@_process_all_tl }
- }
- }
+ \ExplSyntaxOff
+ \ifnum\expandafter
+ \@parse@version\fmtversion//00\@nil <
+ \@parse@version 2020-10-01//00\@nil
+ \RequirePackage{xparse-2018-04-12}
+ \else
+%<2ekernel> \@@@@input xparse-generic.tex ~
+%<package> \RequirePackage{xparse-2020-10-01}
+ \fi
+ \file_input_stop:
}
-% \end{macrocode}
-% Expandable functions and functions whose arguments can be grabbed
-% expandably call \cs{@@_start_expandable:nNNNNn}, which receives the
-% argument specification, four auxiliaries (two for grabbing arguments, one for
-% the code, and one for default arguments), and finally the signature.
-% Non-expandable functions that take this branch should nevertheless
-% be protected, as well as their \texttt{code} function. They will
-% only be expanded in contexts such as constructing a csname.
-% The two grabbers (named after the function with one or two spaces)
-% are needed when there are both short and long arguments; otherwise
-% the same grabber is included twice in the definition. If all
-% arguments are long or all are short the (only) grabber is defined
-% correspondingly to be long/short. Otherwise two grabbers are
-% defined, one long, one short.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_cmd_code_expandable:Nnn #1#2#3
- {
- \exp_args:Ncc \cs_generate_from_arg_count:NNnn
- { \l_@@_function_tl \c_space_tl code }
- { cs_set \bool_if:NF \l_@@_expandable_bool { _protected } :Npn }
- \l_@@_current_arg_int {#3}
- \bool_if:NT \l_@@_defaults_bool
- {
- \use:x
- {
- \cs_generate_from_arg_count:cNnn
- { \l_@@_function_tl \c_space_tl defaults }
- \cs_set:Npn \l_@@_current_arg_int
- { \exp_not:o \l_@@_defaults_tl }
- }
- }
- \bool_if:NTF \l_@@_expandable_bool
- { \cs_set_nopar:Npx } { \cs_set_protected_nopar:Npx } #1
- {
- \exp_not:N \@@_start_expandable:nNNNNn
- { \exp_not:n {#2} }
- \exp_not:c { \l_@@_function_tl \c_space_tl }
- \exp_not:c
- {
- \l_@@_function_tl \c_space_tl
- \bool_if:NT \l_@@_some_short_bool
- { \bool_if:NT \l_@@_some_long_bool { \c_space_tl } }
- }
- \exp_not:c { \l_@@_function_tl \c_space_tl code }
- \bool_if:NTF \l_@@_defaults_bool
- { \exp_not:c { \l_@@_function_tl \c_space_tl defaults } }
- { ? }
- { \exp_not:o \l_@@_signature_tl }
- }
- \bool_if:NTF \l_@@_some_long_bool
- {
- \bool_if:NT \l_@@_some_short_bool
- {
- \cs_set_nopar:cpx { \l_@@_function_tl \c_space_tl \c_space_tl }
- ##1##2 { ##1 {##2} }
- }
- \cs_set:cpx
- }
- { \cs_set_nopar:cpx }
- { \l_@@_function_tl \c_space_tl } ##1##2 { ##1 {##2} }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\@@_declare_env:nnnn}
-% \begin{macro}{\@@_declare_env_internal:nnnn}
-% The lead-off to creating an environment is much the same as that for
-% creating a command: issue the appropriate message, store the argument
-% specification then hand off to an internal function.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_env:nnnn #1#2
- {
- \str_set:Nx \l_@@_environment_str {#1}
- \str_set:Nx \l_@@_environment_str
- { \tl_trim_spaces:o { \l_@@_environment_str } }
- \cs_if_exist:cTF { \l_@@_environment_str }
- {
- \__kernel_msg_info:nnxx { xparse } { redefine-environment }
- { \l_@@_environment_str } { \tl_to_str:n {#2} }
- }
- {
- \__kernel_msg_info:nnxx { xparse } { define-environment }
- { \l_@@_environment_str } { \tl_to_str:n {#2} }
- }
- \bool_set_false:N \l_@@_expandable_bool
- \bool_set_true:N \l_@@_environment_bool
- \exp_args:NV \@@_declare_env_internal:nnnn
- \l_@@_environment_str {#2}
- }
+% In case \cs{NewDocumentCommand} is already defined, we're either in
+% \LaTeX{} 2020-10-01 or later. In the former case, the code loaded in
+% the kernel has the |__xparse| prefix, so we'll load
+% \pkg{xparse-2020-10-01}, otherwise we'll continue in |xparse.sty|,
+% which contains the final remains of \pkg{xparse} with the |__cmd|
+% prefix. To check that we simply look at an internal command with the
+% |__cmd| prefix.
% \end{macrocode}
-% Creating a document environment requires a few more steps than creating
-% a single command. In order to pass the arguments of the command to the
-% end of the function, it is necessary to store the grabbed arguments.
-% To do that, the function used at the end of the environment has to be
-% redefined to contain the appropriate information. To minimize the amount
-% of expansion at point of use, the code here is expanded now as well as
-% when used.
-% The last argument of \cs{@@_declare_cmd_internal:Nnnn} is only run
-% if the definition succeeded. In package mode this ensures that the
-% original definition of the environment is not changed if the
-% definition fails for any reason. This also avoids an error when
-% defining the \verb*|end aux | function when the user asks for more
-% than $9$ arguments.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_declare_env_internal:nnnn #1#2#3#4
{
- \@@_declare_cmd_internal:cnxn { environment~ #1 } {#2}
- {
- \cs_set_nopar:Npx \exp_not:c { environment~ #1 ~end~aux }
- {
- \exp_not:N \exp_not:N \exp_not:c { environment~ #1~end~aux~ }
- \exp_not:n { \exp_not:o \l_@@_args_tl }
- }
- \exp_not:n {#3}
- }
+ \ExplSyntaxOff
+ \cs_if_exist:NF \@@_start:nNNnnn
{
- \cs_set_nopar:cpx { environment~ #1 ~end }
- { \exp_not:c { environment~ #1 ~end~aux } }
- \cs_generate_from_arg_count:cNnn
- { environment~ #1 ~end~aux~ } \cs_set:Npn
- \l_@@_current_arg_int {#4}
- \cs_set_eq:cc {#1} { environment~ #1 }
- \cs_set_eq:cc { end #1 } { environment~ #1 ~end }
+ \RequirePackage{xparse-2020-10-01}
+ \file_input_stop:
}
}
+\ExplSyntaxOff
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Structure of \pkg{xparse} commands}
-%
-% \begin{macro}{\@@_start_env:nnnnn, \@@_start:nNNnnn}
-% For error messages that occur during run-time when getting arguments
-% of environments it is necessary to keep track of the environment
-% name. We begin non-expandable commands with a token equal to
-% \cs{scan_stop:}, whose name gives a reasonable error message if the
-% command is used inside a csname and protects against
-% \texttt{f}-expansion. This is useless for environments since
-% \cs{begin} is already not expandable.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_start_env:nnnnn #1#2
- {
- \cs_if_exist_use:N \conditionally@traceoff
- \str_set:Nn \l_@@_environment_str {#2}
- \bool_set_true:N \l_@@_environment_bool
- \@@_start_aux:ccnnnn
- { environment~ \l_@@_environment_str \c_space_tl }
- { environment~ \l_@@_environment_str \c_space_tl code }
- {#1}
- }
-\cs_new_protected:Npx \@@_start:nNNnnn #1#2#3
- {
- \exp_not:n { \cs_if_exist_use:N \conditionally@traceoff }
- \exp_not:c { xparse~function~is~not~expandable }
- \exp_not:n { \bool_set_false:N \l_@@_environment_bool }
- \exp_not:N \@@_start_aux:NNnnnn
- #2 #3 {#1}
- }
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\@@_start_aux:NNnnnn, \@@_start_aux:ccnnnn}
-% This sets up a few variables to minimize the boilerplate code
-% included in all \pkg{xparse}-defined commands. It then runs the
-% grabbers~|#4|. Again, the argument specification |#1| is only for
-% diagnostics.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_start_aux:NNnnnn #1#2#3#4#5#6
- {
- \tl_clear:N \l_@@_args_tl
- \tl_set:Nn \l_@@_fn_tl {#1}
- \tl_set:Nn \l_@@_fn_code_tl {#2}
- \tl_set:Nn \l_@@_defaults_tl {#5}
- \tl_set:Nn \l_@@_process_all_tl {#6}
- #4 \@@_run_code:
- }
-\cs_generate_variant:Nn \@@_start_aux:NNnnnn { cc }
+%</2ekernel|package>
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\@@_run_code:}
-% After arguments are grabbed, this function is responsible for
-% inserting default values, running processors, and finally running
-% the code.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_run_code:
- {
- \tl_if_empty:NF \l_@@_defaults_tl { \@@_defaults: }
- \tl_if_empty:NF \l_@@_process_all_tl { \@@_args_process: }
- \cs_if_exist_use:N \conditionally@traceon
- \exp_after:wN \l_@@_fn_code_tl \l_@@_args_tl
- }
-% \end{macrocode}
-% \end{macro}
+% In older releases, the prefix was |xparse|, but since the 2021 Spring
+% release of \LaTeXe, the core code is included in the kernel, and this
+% file only holds the deprecated argument specifiers |G|, |l|, and |u|.
+% To match the prefix in the \LaTeXe{} kernel, so that the deprecated
+% types work if |xparse.sty| is loaded, the prefix has changed to |cmd|.
%
-% \begin{macro}{\@@_defaults:}
-% \begin{macro}{\@@_defaults_def:, \@@_defaults_def:nn, \@@_defaults_def:nnn}
-% \begin{macro}{\@@_defaults_aux:, \@@_defaults_error:w}
-% First construct \cs{@@_tmp:w} (see below) that will receive
-% the arguments found so far and determine default values for any
-% missing argument. Then call it repeatedly until the set of
-% arguments stabilizes. Since that could lead to an infinite loop we
-% only call it up to nine times, the maximal number needed for
-% stabilization if there is a chain of arguments that depend on each
-% other. If that fails to stabilize raise an error.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_defaults:
- {
- \@@_defaults_def:
- \tl_set_eq:NN \l_@@_args_i_tl \l_@@_args_tl
- \@@_defaults_aux: \@@_defaults_aux: \@@_defaults_aux:
- \@@_defaults_aux: \@@_defaults_aux: \@@_defaults_aux:
- \@@_defaults_aux: \@@_defaults_aux: \@@_defaults_aux:
- \@@_defaults_error:w
- \q_recursion_stop
- \tl_set_eq:NN \l_@@_args_tl \l_@@_args_i_tl
- }
-\cs_new_protected:Npn \@@_defaults_aux:
- {
- \tl_set:Nx \l_@@_args_ii_tl
- { \exp_after:wN \@@_tmp:w \l_@@_args_i_tl }
- \tl_if_eq:NNT \l_@@_args_ii_tl \l_@@_args_i_tl
- { \use_none_delimit_by_q_recursion_stop:w }
- \tl_set_eq:NN \l_@@_args_i_tl \l_@@_args_ii_tl
- }
-\cs_new_protected:Npn \@@_defaults_error:w \q_recursion_stop
- {
- \__kernel_msg_error:nnx { xparse } { loop-in-defaults }
- { \@@_environment_or_command: }
- }
-% \end{macrocode}
-% To construct \cs{@@_tmp:w}, first go through the arguments
-% found and the corresponding defaults, building a token list with
-% |{#|\meta{arg number}|}| for arguments found in the input (whose
-% default will not be used) and otherwise
-% |{|\cs{exp_not:n}\Arg{default}|}| for arguments whose default will
-% be used.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_defaults_def:
- {
- \tl_clear:N \l_@@_tmpa_tl
- \int_zero:N \l_@@_current_arg_int
- \@@_tl_mapthread_function:NNN \l_@@_args_tl \l_@@_defaults_tl
- \@@_defaults_def:nn
- \cs_generate_from_arg_count:NNVo \@@_tmp:w \cs_set:Npn
- \l_@@_current_arg_int \l_@@_tmpa_tl
- }
-\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo }
-\cs_new_protected:Npn \@@_defaults_def:nn
- {
- \int_incr:N \l_@@_current_arg_int
- \exp_args:NV \@@_defaults_def:nnn \l_@@_current_arg_int
- }
-\cs_new_protected:Npn \@@_defaults_def:nnn #1#2#3
- {
- \tl_put_right:Nx \l_@@_tmpa_tl
- {
- {
- \exp_not:N \exp_not:n
- {
- \tl_if_novalue:nTF {#2}
- { \exp_not:o {#3} }
- { \exp_not:n { ## #1 } }
- }
- }
- }
- }
+%<*package>
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\@@_args_process:}
-% \begin{macro}{\@@_args_process_loop:nn, \@@_args_process_aux:n}
-% Loop through arguments (stored in \cs{l_@@_args_tl}) and the
-% corresponding processors (in \cs{l_@@_process_all_tl})
-% simultaneously, apply all processors for each argument and store the
-% result back into \cs{l_@@_args_tl}. To allow processors to depend
-% on other arguments, for every processor define a temporary auxiliary
-% that receives all arguments \cs{l_@@_args_tl}.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_args_process:
- {
- \tl_clear:N \l_@@_args_ii_tl
- \@@_tl_mapthread_function:NNN
- \l_@@_args_tl
- \l_@@_process_all_tl
- \@@_args_process_loop:nn
- \tl_set_eq:NN \l_@@_args_tl \l_@@_args_ii_tl
- }
-\cs_new_protected:Npn \@@_args_process_loop:nn #1#2
- {
- \tl_set:Nn \ProcessedArgument {#1}
- \tl_if_novalue:nF {#1}
- { \tl_map_function:nN {#2} \@@_args_process_aux:n }
- \tl_put_right:No \l_@@_args_ii_tl
- { \exp_after:wN { \ProcessedArgument } }
- }
-\cs_new_protected:Npn \@@_args_process_aux:n #1
- {
- \cs_generate_from_arg_count:NNnn \@@_tmp:w \cs_set:Npn
- { \tl_count:N \l_@@_args_tl } {#1}
- \exp_args:NNNo \exp_after:wN \@@_tmp:w \l_@@_args_tl
- { \ProcessedArgument }
- }
+\ProvidesExplPackage{xparse}{2021-02-02}{}
+ {L3 Experimental document command parser}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
%
-% \begin{macro}[EXP]{\@@_start_expandable:nNNNNn}
-% This is called for all expandable commands. |#6| is the signature,
-% responsible for grabbing arguments. |#5| is used to determine
-% default values (or is |?| if there are none). |#4| is the code to run.
-% |#2|~and~|#3| are functions (named after the command) that grab a single
-% argument in the input stream (|#3|~is~short). The argument specification |#1| is
-% only used by diagnostic functions.
-% \begin{macrocode}
-\cs_new:Npn \@@_start_expandable:nNNNNn #1#2#3#4#5#6
- { #6 \@@_end_expandable:NNw #5 #4 \q_@@ #2#3 }
-% \end{macrocode}
-% \end{macro}
+% \subsection{Package options}
%
-% \begin{macro}[EXP]{\@@_end_expandable:NNw}
-% \begin{macro}[EXP]{\@@_end_expandable_aux:w}
-% \begin{macro}[EXP]{\@@_end_expandable_aux:nNNNN}
-% \begin{macro}[EXP]{\@@_end_expandable_defaults:nnnNNn}
-% \begin{macro}[EXP]{\@@_end_expandable_defaults:nnw}
-% \begin{macro}[EXP]{\@@_end_expandable_defaults:nw}
-% Followed by a function |#1| to determine default values (or |?| if
-% there are no defaults), the code
-% |#2|, arguments that have been grabbed, then \cs{q_@@} and two generic
-% grabbers. The idea to find default values is similar to the
-% non-expandable case but we cannot define an auxiliary function, so
-% at every step in the loop we need to go through all arguments
-% searching for which ones started out as |-NoValue-| and replacing
-% these by the newly computed values. In fact we need to keep track
-% of three versions of all arguments: the original version, the
-% previous version with default values, and the currently built
-% version (first argument of \cs{@@_end_expandable_defaults:nnnNNn}).
+% \begin{variable}{\l_@@_options_clist}
+% \begin{variable}{\l_@@_log_bool}
+% Key--value option to log information: done by hand to keep dependencies
+% down.
% \begin{macrocode}
-\cs_new:Npn \@@_end_expandable:NNw #1#2
- { \@@_end_expandable_aux:w #1#2 \prg_do_nothing: }
-\cs_new:Npn \@@_end_expandable_aux:w #1#2#3 \q_@@
- { \exp_args:No \@@_end_expandable_aux:nNNNN {#3} #1 #2 }
-\cs_new:Npn \@@_end_expandable_aux:nNNNN #1#2#3#4#5
- {
- \token_if_eq_charcode:NNT ? #2 { \exp_after:wN \use_iv:nnnn }
- \@@_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3
- { } { } { } { } { } { } { } { } { } { }
- {
- \__kernel_msg_expandable_error:nnf
- { xparse } { loop-in-defaults }
- { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } }
- \use_iv:nnnn
- }
- \q_stop
- }
-\cs_new:Npn \@@_end_expandable_defaults:nnnNNn #1#2#3#4#5#6
- {
- #6
- \str_if_eq:nnTF {#1} {#2}
- { \use_i_delimit_by_q_stop:nw { #5 #1 } }
- {
- \exp_args:No \@@_tl_mapthread_function:nnN
- { #4 #1 } {#3}
- \@@_end_expandable_defaults:nnw
- \@@_end_expandable_defaults:nnnNNn { } {#1} {#3} #4 #5
- }
- }
-\cs_new:Npn \@@_end_expandable_defaults:nnw #1#2
+\clist_new:N \l_@@_options_clist
+\DeclareOption* { \clist_put_right:NV \l_@@_options_clist \CurrentOption }
+\ProcessOptions \relax
+\keys_define:nn { ltcmd }
{
- \tl_if_novalue:nTF {#2}
- { \exp_args:No \@@_end_expandable_defaults:nw {#1} }
- { \@@_end_expandable_defaults:nw {#2} }
+ log-declarations .bool_set:N = \l_@@_log_bool ,
+ log-declarations .initial:n = false
}
-\cs_new:Npn \@@_end_expandable_defaults:nw
- #1#2 \@@_end_expandable_defaults:nnnNNn #3
- { #2 \@@_end_expandable_defaults:nnnNNn { #3 {#1} } }
+\keys_set:nV { ltcmd } \l_@@_options_clist
+\bool_if:NF \l_@@_log_bool
+ { \msg_redirect_module:nnn { LaTeX / ltcmd } { info } { none } }
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+% \end{variable}
+% \end{variable}
%
% \subsection{Normalizing the argument specifications}
%
-% The goal here is to expand aliases and check that the argument
-% specification is valid before the main parsing run. If it is not
-% valid the entire set up is abandoned to avoid any strange internal
-% errors. A function is provided for each argument type that will grab
-% any extra data items and call the loop function after performing the
-% following checks and tasks.
-% \begin{itemize}
-% \item Check that each argument has the correct number of data items
-% associated with it, and that where a single character is required,
-% one has actually been supplied.
-% \item Check that processors and the markers~|+| and~|!| are followed
-% by an argument for which they make sense, and are not redundant.
-% \item Check the absence of forbidden types for expandable commands,
-% namely \texttt{G}/\texttt{v} always, and \texttt{l}/\texttt{u}
-% after optional arguments (\pkg{xparse} may have inserted braces
-% due to a failed search for an optional argument).
-% \item Check that no optional argument is followed by a mandatory
-% argument with the same delimiter, as otherwise the optional
-% argument could never be omitted.
-% \item Keep track in \cs{l_@@_some_long_bool} and
-% \cs{l_@@_some_short_bool} of whether the command has some
-% long/short arguments.
-% \item Keep track in \cs{l_@@_grab_expandably_bool} of whether all
-% arguments are \texttt{m}/\texttt{l}/\texttt{u} type and short
-% arguments appear before long ones, in which case they can be
-% grabbed expandably just as safely as they could be grabbed
-% nonexpandably. Regardless of that, arguments of expandable
-% commands will be grabbed expandably and arguments of environments
-% will not (because the list of arguments built by non-expandable
-% grabbing is used to pass them to the end-environment code).
-% \end{itemize}
-% Further checks happen at the end of the loop:
-% \begin{itemize}
-% \item that there are at most $9$ arguments;
-% \item that an expandable command does not end with an optional
-% argument (this case is detected by using the fact that
-% \cs{l_@@_last_delimiters_tl} is cleared by every mandatory argument
-% and filled by every optional argument).
-% \end{itemize}
-%
-% \begin{macro}{\@@_normalize_arg_spec:n}
% \begin{macro}{\@@_normalize_arg_spec_loop:n}
% Loop through the argument specification, calling an auxiliary
% specific to each argument type. If any argument is unknown stop the
% definition.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_normalize_arg_spec:n #1
- {
- \int_zero:N \l_@@_current_arg_int
- \tl_clear:N \l_@@_last_delimiters_tl
- \tl_clear:N \l_@@_arg_spec_tl
- \bool_set_true:N \l_@@_grab_expandably_bool
- \bool_set_false:N \l_@@_obey_spaces_bool
- \bool_set_false:N \l_@@_long_bool
- \bool_set_false:N \l_@@_some_obey_spaces_bool
- \bool_set_false:N \l_@@_some_long_bool
- \bool_set_false:N \l_@@_some_short_bool
- \@@_normalize_arg_spec_loop:n #1
- \q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop
- \int_compare:nNnT \l_@@_current_arg_int > 9
- {
- \__kernel_msg_error:nnxx { xparse } { too-many-arguments }
- { \@@_environment_or_command: } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- \bool_if:NT \l_@@_expandable_bool
- {
- \tl_if_empty:NF \l_@@_last_delimiters_tl
- {
- \__kernel_msg_error:nnxx { xparse } { expandable-ending-optional }
- { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- }
- \bool_if:NT \l_@@_expandable_bool
- { \bool_set_true:N \l_@@_grab_expandably_bool }
- \bool_if:NT \l_@@_environment_bool
- { \bool_set_false:N \l_@@_grab_expandably_bool }
- }
-\cs_new_protected:Npn \@@_normalize_arg_spec_loop:n #1
- {
- \quark_if_recursion_tail_stop:n {#1}
- \int_incr:N \l_@@_current_arg_int
- \cs_if_exist_use:cF { @@_normalize_type_ \tl_to_str:n {#1} :w }
- {
- \bool_lazy_any:nTF
- {
- { \str_if_eq_p:nn {#1} { G } }
- { \str_if_eq_p:nn {#1} { g } }
- { \str_if_eq_p:nn {#1} { l } }
- { \str_if_eq_p:nn {#1} { u } }
- }
- {
- \__kernel_msg_error:nnxx { xparse } { xparse-argument-type }
- { \@@_environment_or_command: } { \tl_to_str:n {#1} }
- }
- {
- \__kernel_msg_error:nnxx { xparse } { unknown-argument-type }
- { \@@_environment_or_command: } { \tl_to_str:n {#1} }
- }
- \@@_bad_def:wn
- }
- }
-%</core>
-%<*package>
\cs_gset_protected:Npn \@@_normalize_arg_spec_loop:n #1
{
\quark_if_recursion_tail_stop:n {#1}
\int_incr:N \l_@@_current_arg_int
\cs_if_exist_use:cF { @@_normalize_type_ \tl_to_str:n {#1} :w }
{
- \__kernel_msg_error:nnxx { xparse } { unknown-argument-type }
+ \__kernel_msg_error:nnxx { ltcmd } { unknown-argument-type }
{ \@@_environment_or_command: } { \tl_to_str:n {#1} }
\@@_bad_def:wn
}
}
-%</package>
-%<*core>
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}
-% {
-% \@@_normalize_type_d:w,
-% \@@_normalize_type_e:w,
-% \@@_normalize_type_g:w,
-% \@@_normalize_type_o:w,
-% \@@_normalize_type_O:w,
-% \@@_normalize_type_r:w,
-% \@@_normalize_type_s:w,
-% }
+% \begin{macro}{\@@_normalize_type_g:w}
% These argument types are aliases of more general ones, for example
-% with the default argument |-NoValue-|. To easily insert that marker
-% expanded in the definitions we call \cs{@@_tmp:w} with the argument
-% |-NoValue-|. For argument types that need additional data, check
-% that the data is present (not \cs{q_recursion_tail}) before
-% proceeding.
+% with the default argument |-NoValue-|.
% \begin{macrocode}
-\cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new_protected:Npn \@@_normalize_type_d:w ##1##2
- {
- \quark_if_recursion_tail_stop_do:nn {##2} { \@@_bad_arg_spec:wn }
- \@@_normalize_type_D:w {##1} {##2} {#1}
- }
- \cs_new_protected:Npn \@@_normalize_type_e:w ##1
- {
- \quark_if_recursion_tail_stop_do:nn {##1} { \@@_bad_arg_spec:wn }
- \@@_normalize_type_E:w {##1} { }
- }
- \cs_new_protected:Npn \@@_normalize_type_o:w
- { \@@_normalize_type_D:w [ ] {#1} }
- \cs_new_protected:Npn \@@_normalize_type_O:w
- { \@@_normalize_type_D:w [ ] }
- \cs_new_protected:Npn \@@_normalize_type_r:w ##1##2
- {
- \quark_if_recursion_tail_stop_do:nn {##2} { \@@_bad_arg_spec:wn }
- \@@_normalize_type_R:w {##1} {##2} {#1}
- }
- \cs_new_protected:Npn \@@_normalize_type_s:w
- { \@@_normalize_type_t:w * }
- }
-\exp_args:No \@@_tmp:w { \c_novalue_tl }
-%</core>
-%<*package>
\cs_new_protected:Npx \@@_normalize_type_g:w
{ \exp_not:N \@@_normalize_type_G:w { \exp_not:V \c_novalue_tl } }
-%</package>
-%<*core>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \@@_normalize_type_>:w,
-% \@@_normalize_type_+:w,
-% \@@_normalize_type_!:w,
-% }
-% Check that these prefixes have arguments, namely that the next token
-% is not \cs{q_recursion_tail}, and remember to leave it after the
-% looping macro. Processors are forbidden in expandable commands.
-% If all is good, store the prefix in the cleaned up
-% \cs{l_@@_arg_spec_tl}, and decrement the argument number as prefixes
-% do not correspond to arguments.
-% \begin{macrocode}
-\cs_new_protected:cpn { @@_normalize_type_>:w } #1#2
- {
- \quark_if_recursion_tail_stop_do:nn {#2} { \@@_bad_arg_spec:wn }
- \bool_if:NT \l_@@_expandable_bool
- {
- \__kernel_msg_error:nnxx { xparse } { processor-in-expandable }
- { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- \tl_put_right:Nx \l_@@_arg_spec_tl { > { \tl_trim_spaces:n {#1} } }
- \int_decr:N \l_@@_current_arg_int
- \bool_set_false:N \l_@@_grab_expandably_bool
- \@@_normalize_arg_spec_loop:n {#2}
- }
-\cs_new_protected:cpn { @@_normalize_type_+:w } #1
- {
- \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
- \bool_if:NT \l_@@_long_bool
- {
- \__kernel_msg_error:nnxx { xparse } { two-markers }
- { \@@_environment_or_command: } { + }
- \@@_bad_def:wn
- }
- \bool_set_true:N \l_@@_long_bool
- \int_decr:N \l_@@_current_arg_int
- \@@_normalize_arg_spec_loop:n {#1}
- }
-\cs_new_protected:cpn { @@_normalize_type_!:w } #1
- {
- \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
- \bool_if:NT \l_@@_obey_spaces_bool
- {
- \__kernel_msg_error:nnxx { xparse } { two-markers }
- { \@@_environment_or_command: } { ! }
- \@@_bad_def:wn
- }
- \bool_set_true:N \l_@@_obey_spaces_bool
- \bool_set_true:N \l_@@_some_obey_spaces_bool
- \int_decr:N \l_@@_current_arg_int
- \@@_normalize_arg_spec_loop:n {#1}
- }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}
-% {
-% \@@_normalize_type_D:w,
-% \@@_normalize_type_E:w,
-% \@@_normalize_type_G:w,
-% \@@_normalize_type_t:w,
-% }
-% \begin{macro}{\@@_normalize_E_unique_check:w}
+% \begin{macro}{\@@_normalize_type_G:w}
% Optional argument types. Check that all required data is present
% (and consists of single characters if applicable) and check for
-% forbidden types for expandable commands. For \texttt{E}-type
-% require that there is at least one embellishment, that each one is a
-% single character, and that there aren't more optional arguments than
-% embellishments; also remember that each embellishment counts as one
-% argument for \cs{l_@@_current_arg_int}. Then in each case
+% forbidden types for expandable commands. Then in each case
% store the data in \cs{l_@@_arg_spec_tl}, and
% for later checks store in \cs{l_@@_last_delimiters_tl} the tokens
% whose presence determines whether there is an optional argument (for
% braces store |{}|, seen later as an empty delimiter).
% \begin{macrocode}
-\cs_new_protected:Npn \@@_normalize_type_D:w #1#2#3
- {
- \quark_if_recursion_tail_stop_do:nn {#3} { \@@_bad_arg_spec:wn }
- \@@_single_token_check:n {#1} \@@_allowed_token_check:N #1
- \@@_single_token_check:n {#2}
- \@@_add_arg_spec:n { D #1 #2 {#3} }
- \tl_put_right:Nn \l_@@_last_delimiters_tl {#1}
- \bool_set_false:N \l_@@_grab_expandably_bool
- \@@_normalize_arg_spec_loop:n
- }
-\cs_new_protected:Npn \@@_normalize_type_E:w #1#2
- {
- \quark_if_recursion_tail_stop_do:nn {#2} { \@@_bad_arg_spec:wn }
- \tl_if_blank:nT {#1} { \@@_bad_arg_spec:wn }
- \tl_map_function:nN {#1} \@@_single_token_check:n
- \tl_map_function:nN {#1} \@@_allowed_token_check:N
- \@@_normalize_E_unique_check:w #1 \q_nil \q_stop
- \int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} }
- { \@@_bad_arg_spec:wn }
- \@@_add_arg_spec:n { E {#1} {#2} }
- \tl_put_right:Nn \l_@@_last_delimiters_tl {#1}
- \bool_set_false:N \l_@@_grab_expandably_bool
- \int_add:Nn \l_@@_current_arg_int { \tl_count:n {#1} - 1 }
- \@@_normalize_arg_spec_loop:n
- }
-\cs_new_protected:Npn \@@_normalize_E_unique_check:w #1#2 \q_stop
- {
- \quark_if_nil:NF #1
- {
- \tl_if_in:nnT {#2} {#1} { \@@_bad_arg_spec:wn }
- \@@_normalize_E_unique_check:w #2 \q_stop
- }
- }
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_normalize_type_G:w #1
{
\quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
@@ -2079,72 +1131,22 @@
\tl_put_right:Nn \l_@@_last_delimiters_tl { { } }
\@@_normalize_arg_spec_loop:n
}
-%</package>
-%<*core>
-\cs_new_protected:Npn \@@_normalize_type_t:w #1
- {
- \quark_if_recursion_tail_stop_do:Nn #1 { \@@_bad_arg_spec:wn }
- \@@_single_token_check:n {#1} \@@_allowed_token_check:N #1
- \tl_put_right:Nx \l_@@_arg_spec_tl
- {
- \bool_if:NT \l_@@_obey_spaces_bool { ! }
- t \exp_not:n {#1}
- }
- \tl_put_right:Nn \l_@@_last_delimiters_tl {#1}
- \bool_set_false:N \l_@@_grab_expandably_bool
- \bool_set_false:N \l_@@_obey_spaces_bool
- \bool_set_false:N \l_@@_long_bool
- \@@_normalize_arg_spec_loop:n
- }
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}
-% {
-% \@@_normalize_type_l:w,
-% \@@_normalize_type_m:w,
-% \@@_normalize_type_R:w,
-% \@@_normalize_type_u:w
-% \@@_normalize_type_v:w
-% }
+% \begin{macro}{\@@_normalize_type_l:w,\@@_normalize_type_u:w}
% Mandatory arguments. First check the required data is present,
% consists of single characters where applicable, and that the argument
-% type is allowed for expandable commands if applicable. For the
-% \texttt{m} and \texttt{R} argument types check that they do not
-% follow some optional argument with that delimiter as otherwise the
-% optional argument could not be omitted. Then save data in
+% type is allowed for expandable commands if applicable. Then save data in
% \cs{l_@@_arg_spec_tl}, count the mandatory argument, and empty the
% list of last delimiters.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_normalize_type_l:w
{
\@@_normalize_check_lu:N l
\@@_add_arg_spec_mandatory:n { l }
\@@_normalize_arg_spec_loop:n
}
-%</package>
-%<*core>
-\cs_new_protected:Npn \@@_normalize_type_m:w
- {
- \@@_delimiter_check:nnn { } { m } { \iow_char:N \{ }
- \@@_add_arg_spec_mandatory:n { m }
- \@@_normalize_arg_spec_loop:n
- }
-\cs_new_protected:Npn \@@_normalize_type_R:w #1#2#3
- {
- \quark_if_recursion_tail_stop_do:nn {#3} { \@@_bad_arg_spec:wn }
- \@@_single_token_check:n {#1} \@@_allowed_token_check:N #1
- \@@_single_token_check:n {#2}
- \@@_delimiter_check:nnn {#1} { R/r } { \tl_to_str:n {#1} }
- \bool_set_false:N \l_@@_grab_expandably_bool
- \@@_add_arg_spec_mandatory:n { R #1 #2 {#3} }
- \@@_normalize_arg_spec_loop:n
- }
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_normalize_type_u:w #1
{
\quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
@@ -2152,368 +1154,15 @@
\@@_add_arg_spec_mandatory:n { u {#1} }
\@@_normalize_arg_spec_loop:n
}
-%</package>
-%<*core>
-\cs_new_protected:Npn \@@_normalize_type_v:w
- {
- \@@_normalize_check_gv:N v
- \@@_add_arg_spec_mandatory:n { v }
- \@@_normalize_arg_spec_loop:n
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_normalize_type_b:w}
-% This argument type is not allowed for commands. This is only
-% allowed at the end of the argument specification, hence we check
-% that |#1| is the end.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_normalize_type_b:w #1
- {
- \bool_if:NF \l_@@_environment_bool
- {
- \__kernel_msg_error:nnxx
- { xparse } { invalid-command-arg }
- { \@@_environment_or_command: } { b }
- \@@_bad_def:wn
- }
- \tl_clear:N \l_@@_last_delimiters_tl
- \@@_add_arg_spec:n { b }
- \quark_if_recursion_tail_stop:n {#1}
- \__kernel_msg_error:nnxx { xparse } { arg-after-body }
- { \@@_environment_or_command: }
- { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_single_token_check:n}
-% Checks that the argument is a single (non-space) token (possibly
-% surrounded by spaces), and aborts the definition otherwise.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_single_token_check:n #1
- {
- \tl_trim_spaces_apply:nN {#1} \tl_if_single_token:nF
- {
- \__kernel_msg_error:nnxx { xparse } { not-single-token }
- { \@@_environment_or_command: } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_allowed_token_check:N}
-% Some tokens are now allowed as delimiters for some argument types,
-% notably implicit begin/end-group tokens (|\bgroup|/|\egroup|).
-% The major problem with these tokens is that for |\peek_...| functions,
-% a literal~|{|$_1$. is virtually indistinguishable from a |\bgroup| or
-% other token which was |\let| to a~|{|$_1$, and the same goes
-% for~|}|$_2$. All other tokens can be easily distingushed from their
-% implicit counterparts by grabbing them and looking at the string
-% length (see \cs{@@_token_if_cs:NTF}), but for begin/end group tokens
-% that is not possible without the risk of mistakenly grabbing the
-% entire brace group (potentially leading to a~\texttt{!~Runaway argument}
-% error) or trying to grab a |}|$_2$, leading to a~\texttt{!~Argument
-% of~\dots~has an extra~\}}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_allowed_token_check:N #1
- {
- \token_if_eq_meaning:NNTF #1 \c_group_begin_token
- { \use:n }
- {
- \token_if_eq_meaning:NNTF #1 \c_group_end_token
- { \use:n }
- { \use_none:n }
- }
- {
- \__kernel_msg_error:nnxxx
- { xparse } { forbidden-implicit-group-token }
- { \@@_environment_or_command: } { \tl_to_str:n {#1} }
- {
- \token_if_eq_meaning:NNTF #1 \c_group_begin_token
- { begin } { end }
- }
- \@@_bad_def:wn
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_normalize_check_gv:N, \@@_normalize_check_lu:N}
-% Called for arguments that are always forbidden, or forbidden after
-% an optional argument, for expandable commands.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_normalize_check_gv:N #1
- {
- \bool_if:NT \l_@@_expandable_bool
- {
- \__kernel_msg_error:nnxx
- { xparse } { invalid-expandable-argument-type }
- { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- \bool_set_false:N \l_@@_grab_expandably_bool
- }
-\cs_new_protected:Npn \@@_normalize_check_lu:N #1
- {
- \bool_if:NT \l_@@_expandable_bool
- {
- \tl_if_empty:NF \l_@@_last_delimiters_tl
- {
- \__kernel_msg_error:nnxx
- { xparse } { invalid-after-optional-expandably }
- { \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_delimiter_check:nnn}
-% Called for \texttt{m} and \texttt{R} arguments. Checks that the
-% leading token does not coincide with the token denoting the presence
-% of a previous optional argument. Instead of dealing with braces for
-% the \texttt{m}-type we use an empty delimiter to denote that case.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_delimiter_check:nnn #1#2#3
- {
- \tl_map_inline:Nn \l_@@_last_delimiters_tl
- {
- \tl_if_eq:nnT {##1} {#1}
- {
- \__kernel_msg_warning:nnxx { xparse } { optional-mandatory }
- {#2} {#3}
- }
- }
- }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_bad_arg_spec:wn, \@@_bad_def:wn}
-% If the argument specification is wrong, this provides an escape from
-% the entire definition process.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_bad_arg_spec:wn #1 \@@_break_point:n #2
- {
- \__kernel_msg_error:nnxx { xparse } { bad-arg-spec }
- { \@@_environment_or_command: } { \tl_to_str:n {#2} }
- }
-\cs_new_protected:Npn \@@_bad_def:wn #1 \@@_break_point:n #2 { }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_arg_spec:n, \@@_add_arg_spec_mandatory:n}
-% When adding an argument to the argument specification, set the
-% \texttt{some_long} or \texttt{some_short} booleans as appropriate
-% and clear the booleans keeping track of |+| and |!| markers.
-% Before that, test for a short argument following some long
-% arguments: this is forbidden for expandable commands and prevents
-% grabbing arguments expandably.
-%
-% For mandatory arguments do some more work, in particular complain if
-% they were preceeded by~|!|.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_arg_spec:n #1
- {
- \bool_lazy_and:nnT
- { ! \l_@@_long_bool }
- { \l_@@_some_long_bool }
- {
- \bool_if:NT \l_@@_expandable_bool
- {
- \__kernel_msg_error:nnx { xparse } { inconsistent-long }
- { \iow_char:N \\ \l_@@_function_tl }
- \@@_bad_def:wn
- }
- \bool_set_false:N \l_@@_grab_expandably_bool
- }
- \bool_if:NTF \l_@@_long_bool
- { \bool_set_true:N \l_@@_some_long_bool }
- { \bool_set_true:N \l_@@_some_short_bool }
- \tl_put_right:Nx \l_@@_arg_spec_tl
- {
- \bool_if:NT \l_@@_long_bool { + }
- \bool_if:NT \l_@@_obey_spaces_bool { ! }
- \exp_not:n {#1}
- }
- \bool_set_false:N \l_@@_long_bool
- \bool_set_false:N \l_@@_obey_spaces_bool
- }
-\cs_new_protected:Npn \@@_add_arg_spec_mandatory:n #1
- {
- \bool_if:NT \l_@@_some_obey_spaces_bool
- {
- \__kernel_msg_error:nnxx { xparse } { non-trailing-obey-spaces }
- { \@@_environment_or_command: } { \tl_to_str:n {#1} }
- \@@_bad_def:wn
- }
- \tl_clear:N \l_@@_last_delimiters_tl
- \@@_add_arg_spec:n {#1}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Preparing the signature: general mechanism}
-%
-% \begin{macro}{\@@_prepare_signature:n}
-% \begin{macro}{\@@_prepare_signature:N}
-% \begin{macro}{\@@_prepare_signature_bypass:N}
-% Actually creating the signature uses the same loop approach as
-% normalizing the signature. There are first a number of variables which need
-% to be set to track what is going on. Many of these variables are unused
-% when defining expandable commands.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_prepare_signature:n #1
- {
- \int_zero:N \l_@@_current_arg_int
- \bool_set_false:N \l_@@_long_bool
- \bool_set_false:N \l_@@_obey_spaces_bool
- \int_zero:N \l_@@_m_args_int
- \bool_set_false:N \l_@@_defaults_bool
- \tl_clear:N \l_@@_defaults_tl
- \tl_clear:N \l_@@_process_all_tl
- \tl_clear:N \l_@@_process_one_tl
- \bool_set_false:N \l_@@_process_some_bool
- \tl_clear:N \l_@@_signature_tl
- \@@_prepare_signature:N #1 \q_recursion_tail \q_recursion_stop
- \bool_if:NF \l_@@_expandable_bool { \@@_flush_m_args: }
- }
-% \end{macrocode}
-% The main looping function does not take an argument, but carries out the
-% reset on the processor boolean. This is split off from the rest of the
-% process so that when actually setting up processors the flag-reset can
-% be bypassed.
-%
-% For each known argument type there is an appropriate function to actually
-% do the addition to the signature. These are separate for expandable and
-% standard functions, as the approaches are different.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_prepare_signature:N
- {
- \bool_set_false:N \l_@@_prefixed_bool
- \@@_prepare_signature_bypass:N
- }
-\cs_new_protected:Npn \@@_prepare_signature_bypass:N #1
- {
- \quark_if_recursion_tail_stop:N #1
- \use:c
- {
- @@_add
- \bool_if:NT \l_@@_grab_expandably_bool { _expandable }
- _type_ \token_to_str:N #1 :w
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Setting up a standard signature}
%
-% Each argument-adding function appends to the signature a grabber (and
-% for some types, the delimiters or default value), except the one for
-% \texttt{m} arguments. These are collected and added to the signature
-% all at once by \cs{@@_flush_m_args:}, called for every other argument
-% type. All of the functions then call the loop function
-% \cs{@@_prepare_signature:N}. Default values of arguments are
-% collected by \cs{@@_add_default:n} rather than being stored with the
-% argument; this function and \cs{@@_add_default:} are also responsible
-% for keeping track of \cs{l_@@_current_arg_int}.
-%
-% \begin{macro}{\@@_add_type_+:w}
-% Making the next argument long means setting the flag. The \texttt{m}
-% arguments are recorded here as
-% this has to be done for every case where there is then a long argument.
-% \begin{macrocode}
-\cs_new_protected:cpn { @@_add_type_+:w }
- {
- \@@_flush_m_args:
- \bool_set_true:N \l_@@_long_bool
- \bool_set_true:N \l_@@_prefixed_bool
- \@@_prepare_signature_bypass:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_!:w}
-% Much the same for controlling trailing optional arguments.
-% \begin{macrocode}
-\cs_new_protected:cpn { @@_add_type_!:w }
- {
- \@@_flush_m_args:
- \bool_set_true:N \l_@@_obey_spaces_bool
- \bool_set_true:N \l_@@_prefixed_bool
- \@@_prepare_signature_bypass:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_>:w}
-% When a processor is found, the processor code is stored. It will be
-% used by \cs{@@_args_process:} once arguments are all found. Here too
-% the loop calls \cs{@@_prepare_signature_bypass:N} rather than
-% \cs{@@_prepare_signature:N} so that the flag is not reset.
-% \begin{macrocode}
-\cs_new_protected:cpn { @@_add_type_>:w } #1
- {
- \@@_flush_m_args:
- \bool_set_true:N \l_@@_prefixed_bool
- \bool_set_true:N \l_@@_process_some_bool
- \tl_put_left:Nn \l_@@_process_one_tl { {#1} }
- \@@_prepare_signature_bypass:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_b:w}
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_b:w
- {
- \@@_flush_m_args:
- \@@_add_default:
- \@@_add_grabber:N b
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_D:w}
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_D:w #1#2#3
- {
- \@@_flush_m_args:
- \@@_add_default:n {#3}
- \@@_add_grabber:N D
- \tl_put_right:Nn \l_@@_signature_tl { #1 #2 }
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_E:w}
-% The \texttt{E}-type argument needs a special handling of default
-% values.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_E:w #1#2
- {
- \@@_flush_m_args:
- \@@_add_default_E:nn {#1} {#2}
- \@@_add_grabber:N E
- \tl_put_right:Nn \l_@@_signature_tl { {#1} }
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_add_type_G:w}
% For the \texttt{G} type, the grabber and the default are added to the
% signature.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_add_type_G:w #1
{
\@@_flush_m_args:
@@ -2535,56 +1184,6 @@
\@@_add_grabber:N l
\@@_prepare_signature:N
}
-%</package>
-%<*core>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_m:w}
-% The \texttt{m} type is special as short arguments which are not
-% post-processed are simply counted at this stage. Thus there is a check
-% to see if either of these cases apply. If so, a one-argument grabber
-% is added to the signature. On the other hand, if a standard short
-% argument is required it is simply counted at this stage, to be
-% added later using \cs{@@_flush_m_args:}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_m:w
- {
- \@@_add_default:
- \bool_if:NTF \l_@@_prefixed_bool
- { \@@_add_grabber:N m }
- { \int_incr:N \l_@@_m_args_int }
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_R:w}
-% The \texttt{R}-type argument is very similar to the \texttt{D}-type.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_R:w #1#2#3
- {
- \@@_flush_m_args:
- \@@_add_default:n {#3}
- \@@_add_grabber:N R
- \tl_put_right:Nn \l_@@_signature_tl { #1 #2 }
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_t:w}
-% Setting up a \texttt{t} argument means collecting one token for the test,
-% and adding it along with the grabber to the signature.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_t:w #1
- {
- \@@_flush_m_args:
- \@@_add_default:
- \@@_add_grabber:N t
- \tl_put_right:Nn \l_@@_signature_tl {#1}
- \@@_prepare_signature:N
- }
% \end{macrocode}
% \end{macro}
%
@@ -2592,8 +1191,6 @@
% At the set up stage, the \texttt{u} type argument is identical to the
% \texttt{G} type except for the name of the grabber function.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_add_type_u:w #1
{
\@@_flush_m_args:
@@ -2602,273 +1199,18 @@
\tl_put_right:Nn \l_@@_signature_tl { {#1} }
\@@_prepare_signature:N
}
-%</package>
-%<*core>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_type_v:w}
-% At this stage, the \texttt{v} argument is identical to \texttt{l}
-% except that since the grabber may fail to read a verbatim argument
-% we need a default value.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_v:w
- {
- \@@_flush_m_args:
- \exp_args:No \@@_add_default:n \c_novalue_tl
- \@@_add_grabber:N v
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_flush_m_args:}
-% As \texttt{m} arguments are simply counted, there is a need to add
-% them to the token register in a block. As this function can only
-% be called if something other than \texttt{m} turns up, the flag can
-% be switched here.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_flush_m_args:
- {
- \int_compare:nNnT \l_@@_m_args_int > 0
- {
- \tl_put_right:Nx \l_@@_signature_tl
- { \exp_not:c { @@_grab_m_ \int_use:N \l_@@_m_args_int :w } }
- \tl_put_right:Nx \l_@@_process_all_tl
- { \prg_replicate:nn { \l_@@_m_args_int } { { } } }
- }
- \int_zero:N \l_@@_m_args_int
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_grabber:N}
-% To keep the various checks needed in one place, adding the grabber
-% to the signature is done here. The only questions are whether the
-% grabber should be long or not, and whether to obey spaces. The
-% \cs{l_@@_obey_spaces_bool} boolean can only be \texttt{true} for
-% trailing optional arguments. In that case spaces will not be
-% ignored when looking for that optional argument.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_grabber:N #1
- {
- \tl_put_right:Nx \l_@@_signature_tl
- {
- \exp_not:c
- {
- @@_grab_ #1
- \bool_if:NT \l_@@_long_bool { _long }
- \bool_if:NT \l_@@_obey_spaces_bool { _obey_spaces }
- :w
- }
- }
- \bool_set_false:N \l_@@_long_bool
- \bool_set_false:N \l_@@_obey_spaces_bool
- \tl_put_right:Nx \l_@@_process_all_tl
- { { \exp_not:o \l_@@_process_one_tl } }
- \tl_clear:N \l_@@_process_one_tl
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_default:n, \@@_add_default:, \@@_add_default_E:nn}
-% Store the default value of an argument, or rather code that gives
-% that default value (it may involve other arguments). This is
-% \cs{c_novalue_tl} for arguments with no actual default or with
-% default |-NoValue-|; and (in a brace group) \cs{prg_do_nothing:}
-% followed by a default value for others. For \texttt{E}-type
-% arguments, pad the defaults |#2| with some \cs{c_novalue_tl}
-% until there are as many as embellishments~|#1|. These functions are
-% also used when defining expandable commands.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_default:n #1
- {
- \tl_if_novalue:nTF {#1}
- { \@@_add_default: }
- {
- \int_incr:N \l_@@_current_arg_int
- \bool_set_true:N \l_@@_defaults_bool
- \tl_put_right:Nn \l_@@_defaults_tl { { \prg_do_nothing: #1 } }
- }
- }
-\cs_new_protected:Npn \@@_add_default:
- {
- \int_incr:N \l_@@_current_arg_int
- \tl_put_right:Nn \l_@@_defaults_tl { \c_novalue_tl }
- }
-\cs_new_protected:Npn \@@_add_default_E:nn #1#2
- {
- \tl_map_function:nN {#2} \@@_add_default:n
- \prg_replicate:nn
- { \tl_count:n {#1} - \tl_count:n {#2} }
- { \@@_add_default: }
- }
% \end{macrocode}
% \end{macro}
%
% \subsection{Setting up expandable types}
%
-% The approach here is not dissimilar to that for standard types, but fewer types
-% are supported. There is
-% also a need to define the per-function auxiliaries: this is done here, while
-% the general grabbers are dealt with later.
-%
-% \begin{macro}{\@@_add_expandable_type_+:w}
-% We have already checked that short arguments are before long
-% arguments, so \cs{l_@@_long_bool} only changes from \texttt{false}
-% to \texttt{true} once (and there is no need to reset it after each
-% argument). Also knock back the argument count because |+| is not an
-% argument. Continue the loop.
-% \begin{macrocode}
-\cs_new_protected:cpn { @@_add_expandable_type_+:w }
- {
- \bool_set_true:N \l_@@_long_bool
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_expandable_type_D:w}
-% \begin{macro}{\@@_add_expandable_type_D_aux:NNNn}
-% \begin{macro}{\@@_add_expandable_type_D_aux:NNN}
-% \begin{macro}{\@@_add_expandable_type_D_aux:NN}
-% The set up for \texttt{D}-type arguments involves constructing a
-% rather complex auxiliary which is used
-% repeatedly when grabbing. There is an auxiliary here so that the
-% \texttt{R}-type can share code readily: |#1| is |D| or~|R|.
-% The |_aux:NN| auxiliary is needed if the two delimiting tokens are
-% identical: in contrast to the non-expandable route, the grabber here
-% has to act differently for this case.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_expandable_type_D:w
- { \@@_add_expandable_type_D_aux:NNNn D }
-\cs_new_protected:Npn \@@_add_expandable_type_D_aux:NNNn #1#2#3#4
- {
- \@@_add_default:n {#4}
- \tl_if_eq:nnTF {#2} {#3}
- { \@@_add_expandable_type_D_aux:NN #1 #2 }
- { \@@_add_expandable_type_D_aux:NNN #1 #2 #3 }
- \@@_prepare_signature:N
- }
-\cs_new_protected:Npn \@@_add_expandable_type_D_aux:NNN #1#2#3
- {
- \bool_if:NTF \l_@@_long_bool
- { \cs_set:cpx }
- { \cs_set_nopar:cpx }
- { \l_@@_expandable_aux_name_tl } ##1 ##2 #2 ##3 \q_@@ ##4 #3
- { ##1 {##2} {##3} {##4} }
- \@@_add_expandable_grabber:nn {#1}
- {
- \exp_not:c { \l_@@_expandable_aux_name_tl }
- \exp_not:n { #2 #3 }
- }
- }
-\cs_new_protected:Npn \@@_add_expandable_type_D_aux:NN #1#2
- {
- \bool_if:NTF \l_@@_long_bool
- { \cs_set:cpx }
- { \cs_set_nopar:cpx }
- { \l_@@_expandable_aux_name_tl } ##1 #2 ##2 #2
- { ##1 {##2} }
- \@@_add_expandable_grabber:nn { #1_alt }
- {
- \exp_not:c { \l_@@_expandable_aux_name_tl }
- \exp_not:n {#2}
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_expandable_type_E:w}
-% \begin{macro}{\@@_add_expandable_type_E_aux:n}
-% For each embellishment, use \cs{@@_get_grabber:NN} to obtain an
-% auxiliary delimited by that token and store a pair constituted of
-% the auxiliary and the token in \cs{l_@@_tmpb_tl}, before appending
-% the whole set of these pairs to the signature, and an equal number
-% of |-NoValue-| markers (regardless of the default values of
-% arguments). Set the current argument appropriately.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_expandable_type_E:w #1#2
- {
- \@@_add_default_E:nn {#1} {#2}
- \tl_clear:N \l_@@_tmpb_tl
- \tl_map_function:nN {#1} \@@_add_expandable_type_E_aux:n
- \@@_add_expandable_grabber:nn
- { E \bool_if:NT \l_@@_long_bool { _long } }
- {
- { \exp_not:o \l_@@_tmpb_tl }
- {
- \prg_replicate:nn { \tl_count:n {#1} }
- { { \c_novalue_tl } }
- }
- }
- \@@_prepare_signature:N
- }
-\cs_new_protected:Npn \@@_add_expandable_type_E_aux:n #1
- {
- \@@_get_grabber:NN #1 \l_@@_tmpa_tl
- \tl_put_right:Nx \l_@@_tmpb_tl
- { \exp_not:o \l_@@_tmpa_tl \exp_not:N #1 }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{\@@_add_expandable_type_l:w}
% Reuse type \texttt{u}, thanks to the fact that \TeX{} macros whose
% parameter text ends with |#| in fact end up being delimited by an
% open brace.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_add_expandable_type_l:w
{ \@@_add_expandable_type_u:w ## }
-%</package>
-%<*core>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_expandable_type_m:w}
-% Unlike the standard case, when working expandably each argument is always
-% grabbed separately.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_expandable_type_m:w
- {
- \@@_add_default:
- \@@_add_expandable_grabber:nn
- { m \bool_if:NT \l_@@_long_bool { _long } } { }
- \@@_prepare_signature:N
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_expandable_type_R:w}
-% The \texttt{R}-type is very similar to the \texttt{D}-type
-% argument, and so the same internals are used.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_expandable_type_R:w
- { \@@_add_expandable_type_D_aux:NNNn R }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_expandable_type_t:w}
-% An auxiliary delimited by |#1| is built now. It will be used to
-% test for the presence of that token.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_expandable_type_t:w #1
- {
- \@@_add_default:
- \@@_get_grabber:NN #1 \l_@@_tmpa_tl
- \@@_add_expandable_grabber:nn { t }
- {
- \exp_not:o \l_@@_tmpa_tl
- \exp_not:N #1
- }
- \@@_prepare_signature:N
- }
% \end{macrocode}
% \end{macro}
%
@@ -2876,8 +1218,6 @@
% Define an auxiliary that will be used directly in the signature. It
% grabs one argument delimited by |#1| and places it before \cs{q_@@}.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_add_expandable_type_u:w #1
{
\@@_add_default:
@@ -2890,403 +1230,11 @@
{ \exp_not:c { \l_@@_expandable_aux_name_tl } }
\@@_prepare_signature:N
}
-%</package>
-%<*core>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_expandable_grabber:nn}
-% This is called for all arguments to place the right grabber in the
-% signature.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_expandable_grabber:nn #1#2
- {
- \tl_put_right:Nx \l_@@_signature_tl
- { \exp_not:c { @@_expandable_grab_ #1 :w } #2 }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_get_grabber:NN}
-% \begin{macro}{\@@_get_grabber_auxi:NN}
-% \begin{macro}{\@@_get_grabber_auxii:NN}
-% Given a token |#1|, defines an expandable function delimited by that
-% token and stores it in the token list~|#2|. The function is named
-% after the token, unless that function name is already taken by some
-% other grabber (this can happen in the rare case where delimiters
-% with different category codes are used in the same document): in
-% that case use a global counter to get a unique name. Since the
-% grabbers are not named after \pkg{xparse} commands they should not
-% be used to get material from the input stream.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_get_grabber:NN #1#2
- {
- \cs_set:Npn \@@_tmp:w ##1 #1 {##1}
- \exp_args:Nc \@@_get_grabber_auxi:NN
- { @@_grabber_ \token_to_str:N #1 :w } #2
- }
-\cs_new_protected:Npn \@@_get_grabber_auxi:NN #1#2
- {
- \cs_if_eq:NNTF \@@_tmp:w #1
- { \tl_set:Nn #2 {#1} }
- {
- \cs_if_exist:NTF #1
- {
- \int_gincr:N \g_@@_grabber_int
- \exp_args:Nc \@@_get_grabber_auxi:NN
- {
- @@_grabber_
- - \int_use:N \g_@@_grabber_int :w
- }
- #2
- }
- { \@@_get_grabber_auxii:NN #1 #2 }
- }
- }
-\cs_new_protected:Npn \@@_get_grabber_auxii:NN #1#2
- {
- \cs_set_eq:NN #1 \@@_tmp:w
- \tl_set:Nn #2 {#1}
- }
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \subsection{Grabbing arguments}
%
-% All of the grabbers follow the same basic pattern. The initial
-% function stores in \cs{l_@@_signature_tl} the code to grab further
-% arguments, defines (the function in) \cs{l_@@_fn_tl} that will grab
-% the argument, and calls it.
-%
-% Defining \cs{l_@@_fn_tl} means determining whether to use
-% \cs{cs_set:Npn} or \cs{cs_set_nopar:Npn}, and for optional arguments
-% whether to skip spaces. Once the argument is found, \cs{l_@@_fn_tl}
-% calls \cs{@@_add_arg:n}, responsible for calling processors and
-% grabbing further arguments.
-%
-% \begin{macro}
-% {
-% \@@_grab_b:w,
-% \@@_grab_b_long:w,
-% \@@_grab_b_obey_spaces:w,
-% \@@_grab_b_long_obey_spaces:w,
-% \@@_grab_b_aux:NNw,
-% \@@_grab_b_end:Nw
-% }
-% This uses the well-tested code of \texttt{D}-type arguments,
-% skipping the peeking step because the \texttt{b}-type argument is
-% always present, and adding a cleanup stage at the end by hijacking
-% the signature. The clean-up consists of properly
-% dealing with \cs{l_@@_args_tl} and also putting back the \cs{end}
-% that served as an end-delimiter: this \cs{end} receives the
-% environment name as its argument and is run normally. The
-% \texttt{D}-type code stores the argument found (body of the
-% environment) as a brace group in \cs{l_@@_args_tl} and depending on
-% the presence of a prefix~|!| we trim spaces or not before adding
-% this braced argument into the saved \cs{l_@@_args_tl}.
-% The strange \verb*|\begin | control sequence is there for display
-% purposes only: it has to look like |\begin| in the terminal but
-% not to delimited arguments.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_b:w
- { \@@_grab_b_aux:NNw \cs_set_protected_nopar:Npn \tl_trim_spaces:n }
-\cs_new_protected:Npn \@@_grab_b_long:w
- { \@@_grab_b_aux:NNw \cs_set_protected:Npn \tl_trim_spaces:n }
-\cs_new_protected:Npn \@@_grab_b_obey_spaces:w
- { \@@_grab_b_aux:NNw \cs_set_protected_nopar:Npn \exp_not:n }
-\cs_new_protected:Npn \@@_grab_b_long_obey_spaces:w
- { \@@_grab_b_aux:NNw \cs_set_protected:Npn \exp_not:n }
-\cs_new_protected:Npn \@@_grab_b_aux:NNw #1#2#3 \@@_run_code:
- {
- \@@_grab_D_aux:NNnN \begin \end {#3} #1
- \tl_put_left:Nn \l_@@_signature_tl { \@@_grab_b_end:Nw #2 }
- \tl_set_eq:NN \l_@@_saved_args_tl \l_@@_args_tl
- \tl_clear:N \l_@@_args_tl
- \exp_args:Nc \l_@@_fn_tl { begin ~ }
- }
-\cs_new_protected:Npn \@@_grab_b_end:Nw #1#2 \@@_run_code:
- {
- \tl_set:Nx \l_@@_args_tl
- {
- \exp_not:V \l_@@_saved_args_tl
- { \exp_after:wN #1 \l_@@_args_tl }
- }
- #2
- \@@_run_code:
- \end
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_D:w}
-% \begin{macro}{\@@_grab_D_long:w}
-% \begin{macro}{\@@_grab_D_obey_spaces:w}
-% \begin{macro}{\@@_grab_D_long_obey_spaces:w}
-% The generic delimited argument grabber. The auxiliary function does
-% a peek test before calling \cs{@@_grab_D_call:Nw}, so that the
-% optional nature of the argument works as expected.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_D:w #1#2#3 \@@_run_code:
- {
- \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
- \@@_peek_nonspace_remove:NTF
- }
-\cs_new_protected:Npn \@@_grab_D_long:w #1#2#3 \@@_run_code:
- {
- \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
- \@@_peek_nonspace_remove:NTF
- }
-\cs_new_protected:Npn \@@_grab_D_obey_spaces:w #1#2#3 \@@_run_code:
- {
- \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected_nopar:Npn
- \@@_peek_meaning_remove:NTF
- }
-\cs_new_protected:Npn \@@_grab_D_long_obey_spaces:w #1#2#3 \@@_run_code:
- {
- \@@_grab_D_aux:NNnNN #1 #2 {#3} \cs_set_protected:Npn
- \@@_peek_meaning_remove:NTF
- }
-% \end{macrocode}
-% \begin{macro}{\@@_grab_D_aux:NNnNN}
-% \begin{macro}{\@@_grab_D_aux:NNnN}
-% This is a bit complicated. The idea is that, in order to check for
-% nested optional argument tokens (\texttt{[[...]]} and so on) the
-% argument needs to be grabbed without removing any braces at all. If
-% this is not done, then cases like |[{[}]| fail. So after testing for
-% an optional argument, it is collected piece-wise. Inserting a quark
-% prevents loss of braces, and there is then a test to see if there are
-% nested delimiters to handle.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_D_aux:NNnNN #1#2#3#4#5
- {
- \@@_grab_D_aux:NNnN #1#2 {#3} #4
- #5 #1
- { \@@_grab_D_call:Nw #1 }
- { \@@_add_arg:o \c_novalue_tl }
- }
-% \end{macrocode}
-% Inside the \enquote{standard} grabber, there is a test to see if the
-% grabbed argument is entirely enclosed by braces. There are a couple of
-% extra factors to allow for: the argument might be entirely empty, and
-% spaces at the start and end of the input must be retained around a brace
-% group. Also notice that a \emph{blank} argument might still contain
-% spaces.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_D_aux:NNnN #1#2#3#4
- {
- \tl_set:Nn \l_@@_signature_tl {#3}
- \exp_after:wN #4 \l_@@_fn_tl ##1 #2
- {
- \tl_if_in:nnTF {##1} {#1}
- { \@@_grab_D_nested:NNnN #1 #2 {##1} #4 }
- {
- \tl_if_blank:oTF { \use_none:n ##1 }
- { \@@_add_arg:o { \use_none:n ##1 } }
- {
- \str_if_eq:eeTF
- { \exp_not:o { \use_none:n ##1 } }
- { { \exp_not:o { \use_ii:nnn ##1 \q_nil } } }
- { \@@_add_arg:o { \use_ii:nn ##1 } }
- { \@@_add_arg:o { \use_none:n ##1 } }
- }
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\@@_grab_D_nested:NNnN}
-% \begin{macro}{\@@_grab_D_nested:w}
-% \begin{macro}{\l_@@_nesting_a_tl}
-% \begin{macro}{\l_@@_nesting_b_tl}
-% \begin{macro}{\q_@@}
-% Catching nested optional arguments means more work. The aim here is
-% to collect up each pair of optional tokens without \TeX{} helping out,
-% and without counting anything. The code above will already have
-% removed the leading opening token and a closing token, but the
-% wrong one. The aim is then to work through the material grabbed
-% so far and divide it up on each opening token, grabbing a closing
-% token to match (thus working in pairs). Once there are no opening
-% tokens, then there is a second check to see if there are any
-% opening tokens in the second part of the argument (for things
-% like |[][]|). Once everything has been found, the entire collected
-% material is added to the output as a single argument. The only tricky part
-% here is ensuring that any grabbing function that might run away is named
-% after the function currently being parsed and not after \pkg{xparse}. That
-% leads to some rather complex nesting! There is also a need to prevent the
-% loss of any braces, hence the insertion and removal of quarks along the
-% way.
-% \begin{macrocode}
-\tl_new:N \l_@@_nesting_a_tl
-\tl_new:N \l_@@_nesting_b_tl
-\quark_new:N \q_@@
-\cs_new_protected:Npn \@@_grab_D_nested:NNnN #1#2#3#4
- {
- \tl_clear:N \l_@@_nesting_a_tl
- \tl_clear:N \l_@@_nesting_b_tl
- \exp_after:wN #4 \l_@@_fn_tl ##1 #1 ##2 \q_@@ ##3 #2
- {
- \tl_put_right:No \l_@@_nesting_a_tl { \use_none:n ##1 #1 }
- \tl_put_right:No \l_@@_nesting_b_tl { \use_i:nn #2 ##3 }
- \tl_if_in:nnTF {##2} {#1}
- {
- \l_@@_fn_tl
- \q_nil ##2 \q_@@ \ERROR
- }
- {
- \tl_put_right:Nx \l_@@_nesting_a_tl
- { \@@_grab_D_nested:w \q_nil ##2 \q_stop }
- \tl_if_in:NnTF \l_@@_nesting_b_tl {#1}
- {
- \tl_set_eq:NN \l_@@_tmpa_tl \l_@@_nesting_b_tl
- \tl_clear:N \l_@@_nesting_b_tl
- \exp_after:wN \l_@@_fn_tl \exp_after:wN
- \q_nil \l_@@_tmpa_tl \q_nil \q_@@ \ERROR
- }
- {
- \tl_put_right:No \l_@@_nesting_a_tl
- \l_@@_nesting_b_tl
- \@@_add_arg:V \l_@@_nesting_a_tl
- }
- }
- }
- \l_@@_fn_tl #3 \q_nil \q_@@ \ERROR
- }
-\cs_new:Npn \@@_grab_D_nested:w #1 \q_nil \q_stop
- { \exp_not:o { \use_none:n #1 } }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\@@_grab_D_call:Nw}
-% For \texttt{D} and \texttt{R}-type arguments, to avoid losing any
-% braces, a token needs to be inserted before the argument to be grabbed.
-% If the argument runs away because the closing token is missing then this
-% inserted token shows up in the terminal. Ideally, |#1| would therefore be
-% used directly, but that is no good as it will mess up the rest of the
-% grabber. Instead, a copy of |#1| with an altered category code is used,
-% as this will look right in the terminal but will not mess up the grabber.
-% The only issue then is that the category code of |#1| is unknown. So there
-% is a quick test to ensure that the inserted token can never be matched by
-% the grabber. (This assumes that the open and close delimiters are not the
-% same character with different category codes, but that really should not
-% happen in any sensible document-level syntax.)
-% An exception is when |#1| is a control sequence token, in which case the
-% character-token treatment is no good because if hit with \cs{token_to_str:N}
-% it would add sputios tokens to the argument. In this case a different
-% branch is taken. The token inserted is then the same \meta{csname} as |#1|,
-% but with a space appended, so that the grabber don't see it as another
-% of the same delimiter.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_grab_D_call:Nw #1
- {
- \token_if_eq_catcode:NNTF + #1
- {
- \exp_after:wN \exp_after:wN \exp_after:wN
- \l_@@_fn_tl \char_generate:nn { `#1 } { 11 }
- }
- {
- \@@_token_if_cs:NTF #1
- {
- \exp_after:wN \l_@@_fn_tl
- \cs:w \cs_to_str:N #1 ~ \cs_end:
- }
- {
- \exp_after:wN \l_@@_fn_tl
- \token_to_str:N #1
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}
-% {
-% \@@_grab_E:w, \@@_grab_E_long:w,
-% \@@_grab_E_obey_spaces:w, \@@_grab_E_long_obey_spaces:w
-% }
-% \begin{macro}{\@@_grab_E:nnNN}
-% \begin{macro}{\@@_grab_E_loop:NnN}
-% \begin{macro}{\@@_grab_E_finalise:}
-% Everything here needs to point to a loop.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_E:w #1#2 \@@_run_code:
- {
- \@@_grab_E:nnNN {#1} {#2}
- \cs_set_protected_nopar:Npn
- \@@_peek_nonspace_remove:NTF
- }
-\cs_new_protected:Npn \@@_grab_E_long:w #1#2 \@@_run_code:
- {
- \@@_grab_E:nnNN {#1} {#2}
- \cs_set_protected:Npn
- \@@_peek_nonspace_remove:NTF
- }
-\cs_new_protected:Npn \@@_grab_E_obey_spaces:w #1#2 \@@_run_code:
- {
- \@@_grab_E:nnNN {#1} {#2}
- \cs_set_protected_nopar:Npn
- \@@_peek_meaning_remove:NTF
- }
-\cs_new_protected:Npn \@@_grab_E_long_obey_spaces:w #1#2 \@@_run_code:
- {
- \@@_grab_E:nnNN {#1} {#2}
- \cs_set_protected:Npn
- \@@_peek_meaning_remove:NTF
- }
-% \end{macrocode}
-% A loop is needed here to allow a random ordering of keys. These are
-% searched for one at a time, with any not found needing to be tracked:
-% they can appear later. The grabbed values are held in a property list
-% which is then turned into an ordered list to be passed back to the user.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_E:nnNN #1#2#3#4
- {
- \exp_after:wN #3 \l_@@_fn_tl ##1##2##3
- {
- \prop_put:Nnn \l_@@_tmp_prop {##1} {##3}
- \@@_grab_E_loop:NnN #4 { } ##2 \q_recursion_stop
- }
- \prop_clear:N \l_@@_tmp_prop
- \tl_set:Nn \l_@@_signature_tl {#2}
- \cs_set_protected:Npn \@@_grab_E_finalise:
- {
- \tl_map_inline:nn {#1}
- {
- \prop_get:NnNF \l_@@_tmp_prop {####1} \l_@@_tmpb_tl
- { \tl_set_eq:NN \l_@@_tmpb_tl \c_novalue_tl }
- \tl_put_right:Nx \l_@@_args_tl
- { { \exp_not:V \l_@@_tmpb_tl } }
- }
- \l_@@_signature_tl \@@_run_code:
- }
- \@@_grab_E_loop:NnN #4 { } #1 \q_recursion_tail \q_recursion_stop
- }
-\cs_new_protected:Npn \@@_grab_E_loop:NnN #1#2#3#4 \q_recursion_stop
- {
- \cs_if_eq:NNTF #3 \q_recursion_tail
- { \@@_grab_E_finalise: }
- {
- #1 #3
- { \l_@@_fn_tl #3 {#2#4} }
- { \@@_grab_E_loop:NnN #1 {#2#3} #4 \q_recursion_stop }
- }
- }
-\cs_new_protected:Npn \@@_grab_E_finalise: { }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{\@@_grab_G:w}
% \begin{macro}{\@@_grab_G_long:w}
% \begin{macro}{\@@_grab_G_obey_spaces:w}
@@ -3295,8 +1243,6 @@
% Optional groups are checked by meaning, so that the same code will
% work with, for example, \ConTeXt{}-like input.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_grab_G:w #1 \@@_run_code:
{
\@@_grab_G_aux:nNN {#1} \cs_set_protected_nopar:Npn
@@ -3349,168 +1295,6 @@
{ \@@_add_arg:n {##1} }
\l_@@_fn_tl
}
-%</package>
-%<*core>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_m:w}
-% \begin{macro}{\@@_grab_m_long:w}
-% Collecting a single mandatory argument is quite easy.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_m:w #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_protected_nopar:Npn \l_@@_fn_tl ##1
- { \@@_add_arg:n {##1} }
- \l_@@_fn_tl
- }
-\cs_new_protected:Npn \@@_grab_m_long:w #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_protected:Npn \l_@@_fn_tl ##1
- { \@@_add_arg:n {##1} }
- \l_@@_fn_tl
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_m_1:w}
-% \begin{macro}{\@@_grab_m_2:w}
-% \begin{macro}{\@@_grab_m_3:w}
-% \begin{macro}{\@@_grab_m_4:w}
-% \begin{macro}{\@@_grab_m_5:w}
-% \begin{macro}{\@@_grab_m_6:w}
-% \begin{macro}{\@@_grab_m_7:w}
-% \begin{macro}{\@@_grab_m_8:w}
-% \begin{macro}{\@@_grab_m_9:w}
-% \begin{macro}{\@@_grab_m_aux:Nnnnnnnnn}
-% Grabbing 1--8 mandatory arguments is done by giving 8--1 known
-% arguments to a 9-argument function that stores them in
-% \cs{l_@@_args_tl}. For simplicity, grabbing 9 mandatory arguments
-% is done by grabbing 5 then 4 arguments.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_grab_m_aux:Nnnnnnnnn #1#2#3#4#5#6#7#8#9
- {
- \tl_put_right:No \l_@@_args_tl
- { #1 {#2} {#3} {#4} {#5} {#6} {#7} {#8} {#9} }
- \l_@@_signature_tl \@@_run_code:
- }
-\cs_new_protected:cpn { @@_grab_m_1:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:nnnnnnn { } { } { } { } { } { } { }
- }
-\cs_new_protected:cpn { @@_grab_m_2:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:nnnnnn { } { } { } { } { } { }
- }
-\cs_new_protected:cpn { @@_grab_m_3:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:nnnnn { } { } { } { } { }
- }
-\cs_new_protected:cpn { @@_grab_m_4:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:nnnn { } { } { } { }
- }
-\cs_new_protected:cpn { @@_grab_m_5:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:nnn { } { } { }
- }
-\cs_new_protected:cpn { @@_grab_m_6:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:nn { } { }
- }
-\cs_new_protected:cpn { @@_grab_m_7:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \use_none:n { }
- }
-\cs_new_protected:cpn { @@_grab_m_8:w } #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \exp_after:wN \cs_set_eq:NN \l_@@_fn_tl \@@_grab_m_aux:Nnnnnnnnn
- \l_@@_fn_tl \prg_do_nothing:
- }
-\cs_new_protected:cpx { @@_grab_m_9:w }
- {
- \exp_not:c { @@_grab_m_5:w }
- \exp_not:c { @@_grab_m_4:w }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_R:w, \@@_grab_R_long:w}
-% \begin{macro}{\@@_grab_R_aux:NNnN}
-% The grabber for \texttt{R}-type arguments is basically the same as
-% that for \texttt{D}-type ones, but always skips spaces (as it is mandatory)
-% and has a hard-coded error message.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_R:w #1#2#3 \@@_run_code:
- { \@@_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected_nopar:Npn }
-\cs_new_protected:Npn \@@_grab_R_long:w #1#2#3 \@@_run_code:
- { \@@_grab_R_aux:NNnN #1 #2 {#3} \cs_set_protected:Npn }
-\cs_new_protected:Npn \@@_grab_R_aux:NNnN #1#2#3#4
- {
- \@@_grab_D_aux:NNnN #1 #2 {#3} #4
- \@@_peek_nonspace_remove:NTF #1
- { \@@_grab_D_call:Nw #1 }
- {
- \__kernel_msg_error:nnxx { xparse } { missing-required }
- { \@@_environment_or_command: }
- { \token_to_str:N #1 }
- \@@_add_arg:o \c_novalue_tl
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_t:w}
-% \begin{macro}{\@@_grab_t_obey_spaces:w}
-% \begin{macro}{\@@_grab_t_aux:NNw}
-% Dealing with a token is quite easy. Check the match, remove the
-% token if needed and add a flag to the output.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_t:w
- { \@@_grab_t_aux:NNw \@@_peek_nonspace_remove:NTF }
-\cs_new_protected:Npn \@@_grab_t_obey_spaces:w
- { \@@_grab_t_aux:NNw \@@_peek_meaning_remove:NTF }
-\cs_new_protected:Npn \@@_grab_t_aux:NNw #1#2#3 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#3}
- \exp_after:wN \cs_set_protected:Npn \l_@@_fn_tl
- {
- #1 #2
- { \@@_add_arg:n { \BooleanTrue } }
- { \@@_add_arg:n { \BooleanFalse } }
- }
- \l_@@_fn_tl
- }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3522,8 +1306,6 @@
% Grabbing up to a list of tokens is quite easy: define the grabber,
% and then collect.
% \begin{macrocode}
-%</core>
-%<*package>
\cs_new_protected:Npn \@@_grab_u:w #1#2 \@@_run_code:
{ \@@_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn }
\cs_new_protected:Npn \@@_grab_u_long:w #1#2 \@@_run_code:
@@ -3535,651 +1317,11 @@
{ \@@_add_arg:n {##1} }
\l_@@_fn_tl
}
-%</package>
-%<*core>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_grab_v:w}
-% \begin{macro}{\@@_grab_v_long:w}
-% \begin{macro}{\@@_grab_v_aux:w}
-% \begin{macro}{\@@_grab_v_group_end:}
-% \begin{variable}{\l_@@_v_arg_tl}
-% The opening delimiter is the first non-space token, and is never
-% read verbatim. This is required by consistency with the case where
-% the preceding argument was optional and absent: then \TeX{} has
-% already read and tokenized that token when looking for the optional
-% argument. The first thing is thus to check is that this delimiter
-% is a character, and to distinguish the case of a left brace (in that
-% case, \cs{group_align_safe_end:} is needed to compensate for the
-% begin-group character that was just seen). Then set verbatim
-% catcodes with \cs{@@_grab_v_aux_catcodes:}.
-%
-% The group keep catcode changes local, and
-% \cs{group_align_safe_begin/end:} allow to use a character
-% with category code~$4$ (normally |&|) as the delimiter.
-% It is ended by \cs{@@_grab_v_group_end:}, which smuggles
-% the collected argument out of the group.
-% \begin{macrocode}
-\tl_new:N \l_@@_v_arg_tl
-\cs_new_protected:Npn \@@_grab_v:w
- {
- \bool_set_false:N \l_@@_long_bool
- \@@_grab_v_aux:w
- }
-\cs_new_protected:Npn \@@_grab_v_long:w
- {
- \bool_set_true:N \l_@@_long_bool
- \@@_grab_v_aux:w
- }
-\cs_new_protected:Npn \@@_grab_v_aux:w #1 \@@_run_code:
- {
- \tl_set:Nn \l_@@_signature_tl {#1}
- \group_begin:
- \group_align_safe_begin:
- \tex_escapechar:D = 92 \scan_stop:
- \tl_clear:N \l_@@_v_arg_tl
- \peek_remove_spaces:n
- {
- \peek_meaning_remove:NTF \c_group_begin_token
- {
- \group_align_safe_end:
- \@@_grab_v_bgroup:
- }
- {
- \peek_N_type:TF
- { \@@_grab_v_aux_test:N }
- { \@@_grab_v_aux_abort:n { } }
- }
- }
- }
-\cs_new_protected:Npn \@@_grab_v_group_end:
- {
- \group_align_safe_end:
- \exp_args:NNNo
- \group_end:
- \tl_set:Nn \l_@@_v_arg_tl { \l_@@_v_arg_tl }
- }
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_v_aux_test:N}
-% \begin{macro}
-% {
-% \@@_grab_v_aux_loop:N,
-% \@@_grab_v_aux_loop:NN,
-% \@@_grab_v_aux_loop_end:
-% }
-% Check that the opening delimiter is a character, setup category codes,
-% then start reading tokens one by one, keeping the delimiter as an argument.
-% If the verbatim was not nested, we will be grabbing one character
-% at each step. Unfortunately, it can happen that what follows the
-% verbatim argument is already tokenized. Thus, we check at each step
-% that the next token is indeed a \enquote{nice}
-% character, \emph{i.e.}, is not a character with
-% category code $1$ (begin-group), $2$ (end-group)
-% or $6$ (macro parameter), nor the space character,
-% with category code~$10$ and character code~$32$,
-% nor a control sequence.
-% The partially built argument is stored in \cs{l_@@_v_arg_tl}.
-% If we ever meet a token which we cannot grab (non-N-type),
-% or which is not a character according to
-% \cs{@@_grab_v_token_if_char:NTF}, then we bail out with
-% \cs{@@_grab_v_aux_abort:n}. Otherwise, we stop at the first
-% character matching the delimiter.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_v_aux_test:N #1
- {
- \@@_grab_v_token_if_char:NTF #1
- {
- \@@_grab_v_aux_put:N #1
- \@@_grab_v_aux_catcodes:
- \@@_grab_v_aux_loop:N #1
- }
- { \@@_grab_v_aux_abort:n {#1} #1 }
- }
-\cs_new_protected:Npn \@@_grab_v_aux_loop:N #1
- {
- \peek_N_type:TF
- { \@@_grab_v_aux_loop:NN #1 }
- { \@@_grab_v_aux_abort:n { } }
- }
-\cs_new_protected:Npn \@@_grab_v_aux_loop:NN #1#2
- {
- \@@_grab_v_token_if_char:NTF #2
- {
- \token_if_eq_charcode:NNTF #1 #2
- { \@@_grab_v_aux_loop_end: }
- {
- \@@_grab_v_aux_put:N #2
- \@@_grab_v_aux_loop:N #1
- }
- }
- { \@@_grab_v_aux_abort:n {#2} #2 }
- }
-\cs_new_protected:Npn \@@_grab_v_aux_loop_end:
- {
- \@@_grab_v_group_end:
- \@@_add_arg:x { \tl_tail:N \l_@@_v_arg_tl }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_v_bgroup:}
-% \begin{macro}{\@@_grab_v_bgroup_loop:}
-% \begin{macro}{\@@_grab_v_bgroup_loop:N}
-% \begin{variable}{\l_@@_v_nesting_int}
-% If the opening delimiter is a left brace, we keep track of
-% how many left and right braces were encountered so far in
-% \cs{l_@@_v_nesting_int} (the methods used for optional
-% arguments cannot apply here), and stop as soon as it reaches~$0$.
-%
-% Some care was needed when removing the opening delimiter, which
-% has already been assigned category code~$1$: using
-% \cs{peek_meaning_remove:NTF} in the \cs{@@_grab_v_aux:w}
-% function would break within alignments. Instead, we first
-% convert that token to a string, and remove the result as a
-% normal undelimited argument.
-% \begin{macrocode}
-\int_new:N \l_@@_v_nesting_int
-\cs_new_protected:Npx \@@_grab_v_bgroup:
- {
- \exp_not:N \@@_grab_v_aux_catcodes:
- \exp_not:n { \int_set:Nn \l_@@_v_nesting_int { 1 } }
- \exp_not:N \@@_grab_v_aux_put:N \iow_char:N \{
- \exp_not:N \@@_grab_v_bgroup_loop:
- }
-\cs_new_protected:Npn \@@_grab_v_bgroup_loop:
- {
- \peek_N_type:TF
- { \@@_grab_v_bgroup_loop:N }
- { \@@_grab_v_aux_abort:n { } }
- }
-\cs_new_protected:Npn \@@_grab_v_bgroup_loop:N #1
- {
- \@@_grab_v_token_if_char:NTF #1
- {
- \token_if_eq_charcode:NNTF \c_group_end_token #1
- {
- \int_decr:N \l_@@_v_nesting_int
- \int_compare:nNnTF \l_@@_v_nesting_int > 0
- {
- \@@_grab_v_aux_put:N #1
- \@@_grab_v_bgroup_loop:
- }
- { \@@_grab_v_aux_loop_end: }
- }
- {
- \token_if_eq_charcode:NNT \c_group_begin_token #1
- { \int_incr:N \l_@@_v_nesting_int }
- \@@_grab_v_aux_put:N #1
- \@@_grab_v_bgroup_loop:
- }
- }
- { \@@_grab_v_aux_abort:n {#1} #1 }
- }
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_v_aux_catcodes:}
-% \begin{macro}{\@@_grab_v_aux_abort:n}
-% The approach for short verbatim arguments is to make the end-line
-% character a macro parameter character: this is forbidden by the
-% rest of the code. Then the error branch can check what caused the
-% bail out and give the appropriate error message.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_v_aux_catcodes:
- {
- \cs_set_eq:NN \do \char_set_catcode_other:N
- \dospecials
- \tex_endlinechar:D = `\^^M \scan_stop:
- \bool_if:NTF \l_@@_long_bool
- { \char_set_catcode_other:n { \tex_endlinechar:D } }
- { \char_set_catcode_parameter:n { \tex_endlinechar:D } }
- }
-\cs_new_protected:Npn \@@_grab_v_aux_abort:n #1
- {
- \@@_grab_v_group_end:
- \exp_after:wN \exp_after:wN \exp_after:wN
- \peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 }
- {
- \__kernel_msg_error:nnxxx { xparse } { verbatim-newline }
- { \@@_environment_or_command: }
- { \tl_to_str:N \l_@@_v_arg_tl }
- { \tl_to_str:n {#1} }
- \@@_add_arg:o \c_novalue_tl
- }
- {
- \__kernel_msg_error:nnxxx { xparse } { verbatim-tokenized }
- { \@@_environment_or_command: }
- { \tl_to_str:N \l_@@_v_arg_tl }
- { \tl_to_str:n {#1} }
- \@@_add_arg:o \c_novalue_tl
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_v_aux_put:N}
-% Storing one token in the collected argument. Most tokens are
-% converted to category code $12$, with the exception of active
-% characters, and spaces (not sure what should be done for those).
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_v_aux_put:N #1
- {
- \tl_put_right:Nx \l_@@_v_arg_tl
- {
- \token_if_active:NTF #1
- { \exp_not:N #1 } { \token_to_str:N #1 }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_grab_v_token_if_char:NTF}
-% This function assumes that the escape character is printable.
-% Then the string representation of control sequences is at least
-% two characters, and \cs{str_tail:n} only removes the escape
-% character. Macro parameter characters are doubled by
-% \cs{tl_to_str:n}, and will also yield a non-empty result,
-% hence are not considered as characters.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_v_token_if_char:NTF #1
- { \str_if_eq:eeTF { } { \str_tail:n {#1} } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_add_arg:n, \@@_add_arg:V, \@@_add_arg:o, \@@_add_arg:x}
-% When an argument is found it is stored, then further arguments are
-% grabbed by calling \cs{l_@@_signature_tl}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_add_arg:n #1
- {
- \tl_put_right:Nn \l_@@_args_tl { {#1} }
- \l_@@_signature_tl \@@_run_code:
- }
-\cs_generate_variant:Nn \@@_add_arg:n { V , o , x }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Grabbing arguments expandably}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_D:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_D:NNNwNNn}
-% \begin{macro}[EXP]{\@@_expandable_grab_D:NNNwNNnnn}
-% \begin{macro}[EXP]{\@@_expandable_grab_D:Nw}
-% \begin{macro}[EXP]{\@@_expandable_grab_D:nnNNNwNN}
-% The first step is to grab the first token or group. The generic grabbers
-% \cs{\meta{function}}\verb*| | and \cs{\meta{function}}\verb*| | are just after \cs{q_@@}, we go and find
-% them (and use the long one).
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_D:w #1 \q_@@ #2#3
- { #2 { \@@_expandable_grab_D:NNNwNNn #1 \q_@@ #2 #3 } }
-% \end{macrocode}
-% We then wish to test whether |#7|, which we just grabbed, is exactly |#2|.
-% A preliminary test is whether their string representations coincide, then
-% expand the only grabber function we have, |#1|, once: the two strings below
-% are equal if and only if |#7| matches |#2| exactly.\footnote{It is obvious
-% that if \texttt{\#7} matches \texttt{\#2} then the strings are equal. We
-% must check the converse. The right-hand-side of \cs{str_if_eq:onTF} does
-% not end with \texttt{\#3}, implying that the grabber function took
-% everything as its arguments. The first brace group can only be empty if
-% \texttt{\#7} starts with \texttt{\#2}, otherwise the brace group preceding
-% \texttt{\#7} would not vanish. The third brace group is empty, thus the
-% \cs{q_@@} that was used by our grabber \texttt{\#1} must be the one
-% that we inserted (not some token in \texttt{\#7}), hence the second brace
-% group contains the end of \texttt{\#7} followed by \texttt{\#2}. Since this
-% is \texttt{\#2} on the right-hand-side, and no brace can be lost there,
-% \texttt{\#7} must contain nothing else than its leading \texttt{\#2}.}
-% The preliminary test is needed as |#7| could validly contain
-% \tn{par} (because a later mandatory argument could be long) and our
-% grabber may be short. If
-% |#7| does not match |#2|, then the optional argument is missing, we use the
-% default |-NoValue-|, and put back the argument |#7| in the input stream.
-%
-% If it does match, then interesting things need to be done. We will grab the
-% argument piece by piece, with the following pattern:
-% \begin{quote}
-% \meta{grabber} \Arg{tokens} \\
-% ~~\cs{q_nil} \Arg{piece 1} \meta{piece 2} \cs{ERROR} \cs{q_@@}\\
-% ~~\cs{q_nil} \meta{input stream}
-% \end{quote}
-% The \meta{grabber} will find an opening delimiter in \meta{piece 2}, take
-% the \cs{q_@@} as a second delimiter, and find more material delimited
-% by the closing delimiter in the \meta{input stream}. We then move the part
-% before the opening delimiter from \meta{piece 2} to \meta{piece 1}, and the
-% material taken from the \meta{input stream} to the \meta{piece 2}. Thus,
-% the argument moves gradually from the \meta{input stream} to the
-% \meta{piece 2}, then to the \meta{piece 1} when we have made sure to find
-% all opening and closing delimiters. This two-step process ensures that
-% nesting works: the number of opening delimiters minus closing delimiters in
-% \meta{piece 1} is always equal to the number of closing delimiters in
-% \meta{piece 2}. We stop grabbing arguments once the \meta{piece 2} contains
-% no opening delimiter any more, hence the balance is reached, and the final
-% argument is \meta{piece 1} \meta{piece 2}.
-% The indirection via \cs{@@_tmp:w} allows to insert |-NoValue-| expanded.
-% \begin{macrocode}
-\cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new:Npn \@@_expandable_grab_D:NNNwNNn ##1##2##3##4 \q_@@ ##5##6##7
- {
- \str_if_eq:nnTF {##2} {##7}
- {
- \str_if_eq:onTF
- { ##1 { } { } ##7 ##2 \q_@@ ##3 }
- { { } {##2} { } }
- }
- { \use_ii:nn }
- {
- ##1
- { \@@_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q_@@ ##5##6 }
- \q_nil { } ##2 \ERROR \q_@@ \ERROR
- }
- { ##4 {#1} \q_@@ ##5 ##6 {##7} }
- }
- }
-\exp_args:No \@@_tmp:w { \c_novalue_tl }
-% \end{macrocode}
-% At this stage, |#7| is \cs{q_nil} \Arg{piece 1} \meta{more for piece 1},
-% and we want to concatenate all that, removing \cs{q_nil}, and keeping the
-% opening delimiter |#2|. Simply use \cs{use_ii:nn}. Also, |#8| is
-% \meta{remainder of piece 2} \cs{ERROR}, and |#9| is \cs{ERROR} \meta{more
-% for piece 2}. We concatenate those, replacing the two \cs{ERROR} by the
-% closing delimiter |#3|.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_D:NNNwNNnnn #1#2#3#4 \q_@@ #5#6#7#8#9
- {
- \exp_args:Nof \@@_expandable_grab_D:nnNNNwNN
- { \use_ii:nn #7 #2 }
- { \@@_expandable_grab_D:Nw #3 \exp_stop_f: #8 #9 }
- #1#2#3 #4 \q_@@ #5 #6
- }
-\cs_new:Npn \@@_expandable_grab_D:Nw #1#2 \ERROR \ERROR { #2 #1 }
-% \end{macrocode}
-% Armed with our two new \meta{pieces}, we are ready to loop. However, we
-% must first see if \meta{piece 2} (here |#2|) contains any opening
-% delimiter |#4|. Again, we expand |#3|, this time removing its whole output
-% with \cs{use_none:nnn}. The test is similar to \cs{tl_if_in:nnTF}. The
-% token list is empty if and only if |#2| does not contain the opening
-% delimiter. In that case, we are done, and put the argument (from which we
-% remove a spurious pair of delimiters coming from how we started the loop).
-% Otherwise, we go back to looping with
-% \cs{@@_expandable_grab_D:NNNwNNnnn}. The code to deal with brace stripping
-% is much the same as for the non-expandable case.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_D:nnNNNwNN #1#2#3#4#5#6 \q_@@ #7#8
- {
- \exp_args:No \tl_if_empty:oTF
- { #3 { \use_none:nnn } #2 \q_@@ #5 #4 \q_@@ #5 }
- {
- \tl_if_blank:oTF { \use_none:nn #1#2 }
- { \@@_put_arg_expandable:ow { \use_none:nn #1#2 } }
- {
- \str_if_eq:eeTF
- { \exp_not:o { \use_none:nn #1#2 } }
- { { \exp_not:o { \use_iii:nnnn #1#2 \q_nil } } }
- { \@@_put_arg_expandable:ow { \use_iii:nnn #1#2 } }
- { \@@_put_arg_expandable:ow { \use_none:nn #1#2 } }
- }
- #6 \q_@@ #7 #8
- }
- {
- #3
- { \@@_expandable_grab_D:NNNwNNnnn #3#4#5#6 \q_@@ #7 #8 }
- \q_nil {#1} #2 \ERROR \q_@@ \ERROR
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_D_alt:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_D_alt:NNwNNn}
-% \begin{macro}[EXP]{\@@_expandable_grab_D_alt:Nwn}
-% When the delimiters are identical, nesting is not possible and a simplified
-% approach is used. The test concept here is the same as for the case where
-% the delimiters are different but there cannot be any nesting.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_D_alt:w #1 \q_@@ #2#3
- { #2 { \@@_expandable_grab_D_alt:NNwNNn #1 \q_@@ #2 #3 } }
-\cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new:Npn \@@_expandable_grab_D_alt:NNwNNn ##1##2##3 \q_@@ ##4##5##6
- {
- \str_if_eq:nnTF {##6} {##2}
- {
- \str_if_eq:onTF
- { ##1 { } ##6 ##2 ##2 }
- { { } ##2 }
- }
- { \use_ii:nn }
- {
- ##1
- { \@@_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q_@@ }
- ##6 \ERROR
- }
- { ##3 {#1} \q_@@ ##4 ##5 {##6} }
- }
- }
-\exp_args:No \@@_tmp:w { \c_novalue_tl }
-\cs_new:Npn \@@_expandable_grab_D_alt:NNwn #1#2#3 \q_@@ #4
- {
- \tl_if_blank:oTF { \use_none:n #4 }
- { \@@_put_arg_expandable:ow { \use_none:n #4 } }
- {
- \str_if_eq:eeTF
- { \exp_not:o { \use_none:n #4 } }
- { { \exp_not:o { \use_ii:nnn #4 \q_nil } } }
- { \@@_put_arg_expandable:ow { \use_ii:nn #4 } }
- { \@@_put_arg_expandable:ow { \use_none:n #4 } }
- }
- #3 \q_@@ #1 #2
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_E:w, \@@_expandable_grab_E_long:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_E_aux:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_E_test:nnw}
-% \begin{macro}[EXP]{\@@_expandable_grab_E_loop:nnnNNw}
-% \begin{macro}[EXP]{\@@_expandable_grab_E_find:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_E_find:nnw}
-% \begin{macro}[EXP]{\@@_expandable_grab_E_end:nnw}
-% We keep track of long/short by placing the appropriate grabber as
-% the third token after \cs{q_@@}; it is eventually removed by the
-% \texttt{end:nnw} auxiliary. The \texttt{aux:w} auxiliary will be
-% called repeatedly with two arguments: the set
-% of pairs \meta{parser} \meta{token}, and the set of arguments found
-% so far (initially all |{-NoValue-}|). At each step, grab what
-% follows in the input stream then call the \texttt{loop:nnnNNw}
-% auxiliary to compare it with each possible embellishment in turn.
-% This auxiliary's |#1| is what was found in the input, |#2| collects
-% \meta{parser} \meta{token} pairs that did not match, |#3| collects
-% the corresponding arguments found previously, |#4| and |#5| is the
-% current pair, |#6| is the remaining pairs, |#7| is empty or two
-% \cs{q_nil}, and |#8| is the current argument. If none of the pairs
-% matched (determined by \cs{quark_if_nil:NTF}) then call the
-% \texttt{end} auxiliary to stop looking for embellishments,
-% remembering to put what was grabbed in the input back where it
-% belongs, and storing the arguments found just before \cs{q_@@}. If
-% the current argument |#8| is not |-NoValue-| or if the input |#1|
-% does not match |#5| (see \texttt{t}-type arguments below for a
-% similar \cs{str_if_eq:onTF} test) then carry on the loop.
-% Otherwise, we found a new embellishment: grab the corresponding
-% argument in the input using the \texttt{find:w} auxiliary. To avoid
-% losing braces around that auxiliary's argument we include a
-% space, which will be eliminated in the next loop through
-% embellishments.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_E:w #1 \q_@@ #2#3
- { \@@_expandable_grab_E_aux:w #1 \q_@@ #2 #3 #3 }
-\cs_new:Npn \@@_expandable_grab_E_long:w #1 \q_@@ #2#3
- { \@@_expandable_grab_E_aux:w #1 \q_@@ #2 #3 #2 }
-\cs_new:Npn \@@_expandable_grab_E_aux:w #1 \q_@@ #2#3#4
- { #2 { \@@_expandable_grab_E_test:nnw #1 \q_@@ #2 #3 #4 } }
-\cs_new:Npn \@@_expandable_grab_E_test:nnw #1#2#3 \q_@@ #4#5#6#7
- {
- \@@_expandable_grab_E_loop:nnnNNw {#7} { } { }
- #1 \q_nil \q_nil \q_nil \q_mark #2 \q_nil
- #3 \q_@@ #4 #5 #6
- }
-\cs_new:Npn \@@_expandable_grab_E_loop:nnnNNw
- #1#2#3#4#5#6 \q_nil #7 \q_mark #8
- {
- \quark_if_nil:NTF #4
- { \@@_expandable_grab_E_end:nnw {#1} {#3} }
- {
- \tl_if_novalue:nTF {#8}
- { \str_if_eq:onTF { #4 { } #1 #5 } {#5} }
- { \use_ii:nn }
- { \@@_expandable_grab_E_find:w { #2 #4 #5 #6 } {#3} ~ }
- {
- \@@_expandable_grab_E_loop:nnnNNw
- {#1} { #2 #4 #5 } { #3 {#8} }
- #6 \q_nil #7 \q_mark
- }
- }
- }
-\cs_new:Npn \@@_expandable_grab_E_find:w #1 \q_@@ #2#3#4
- { #4 { \@@_expandable_grab_E_find:nnw #1 \q_@@ #2 #3 #4 } }
-\cs_new:Npn \@@_expandable_grab_E_find:nnw #1#2#3 \q_nil #4 \q_@@ #5#6#7#8
- { \@@_expandable_grab_E_aux:w {#1} { #2 {#8} #3 } #4 \q_@@ #5 #6 #7 }
-\cs_new:Npn \@@_expandable_grab_E_end:nnw #1#2#3 \q_@@ #4#5#6
- { #3 #2 \q_@@ #4 #5 {#1} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_m:w, \@@_expandable_grab_m_long:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_m_aux:wNn}
-% The mandatory case is easy: find the auxiliary after the \cs{q_@@},
-% and use it directly to grab the argument, then correctly position
-% the argument before \cs{q_@@}.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_m:w #1 \q_@@ #2#3
- { #3 { \@@_expandable_grab_m_aux:wNn #1 \q_@@ #2 #3 } }
-\cs_new:Npn \@@_expandable_grab_m_long:w #1 \q_@@ #2#3
- { #2 { \@@_expandable_grab_m_aux:wNn #1 \q_@@ #2 #3 } }
-\cs_new:Npn \@@_expandable_grab_m_aux:wNn #1 \q_@@ #2#3#4
- { #1 {#4} \q_@@ #2 #3 }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_R:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_R_aux:NNNwNNn}
-% Much the same as for the \texttt{D}-type argument, with only the lead-off
-% function varying.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_R:w #1 \q_@@ #2#3
- { #2 { \@@_expandable_grab_R_aux:NNNwNNn #1 \q_@@ #2#3 } }
-\cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new:Npn \@@_expandable_grab_R_aux:NNNwNNn ##1##2##3##4 \q_@@ ##5##6##7
- {
- \str_if_eq:nnTF {##7} {##2}
- {
- \str_if_eq:onTF
- { ##1 { } { } ##7 ##2 \q_@@ ##3 }
- { { } {##2} { } }
- }
- { \use_ii:nn }
- {
- ##1
- { \@@_expandable_grab_D:NNNwNNnnn ##1##2##3##4 \q_@@ ##5##6 }
- \q_nil { } ##2 \ERROR \q_@@ \ERROR
- }
- {
- \__kernel_msg_expandable_error:nnff
- { xparse } { missing-required }
- { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##5 } }
- { \tl_to_str:n {##2} }
- ##4 {#1} \q_@@ ##5 ##6 {##7}
- }
- }
- }
-\exp_args:No \@@_tmp:w { \c_novalue_tl }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_R_alt:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_R_alt_aux:NNwNNn}
-% When the delimiters are identical, nesting is not possible and a simplified
-% approach is used. The test concept here is the same as for the case where
-% the delimiters are different.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_R_alt:w #1 \q_@@ #2#3
- { #2 { \@@_expandable_grab_R_alt_aux:NNwNNn #1 \q_@@ #2#3 } }
-\cs_set_protected:Npn \@@_tmp:w #1
- {
- \cs_new:Npn \@@_expandable_grab_R_alt_aux:NNwNNn ##1##2##3 \q_@@ ##4##5##6
- {
- \str_if_eq:nnTF {##6} {##2}
- {
- \str_if_eq:onTF
- { ##1 { } ##6 ##2 ##2 }
- { { } ##2 }
- }
- { \use_ii:nn }
- {
- ##1
- { \@@_expandable_grab_D_alt:NNwn ##4 ##5 ##3 \q_@@ }
- ##6 \ERROR
- }
- {
- \__kernel_msg_expandable_error:nnff
- { xparse } { missing-required }
- { \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N ##4 } }
- { \tl_to_str:n {##2} }
- ##3 {#1} \q_@@ ##4 ##5 {##6}
- }
- }
- }
-\exp_args:No \@@_tmp:w { \c_novalue_tl }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_expandable_grab_t:w}
-% \begin{macro}[EXP]{\@@_expandable_grab_t_aux:NNwn}
-% As for a \texttt{D}-type argument, here we compare the grabbed tokens using
-% the only parser we have in order to work out if |#2| is exactly equal to
-% the output of the grabber.
-% \begin{macrocode}
-\cs_new:Npn \@@_expandable_grab_t:w #1 \q_@@ #2#3
- { #2 { \@@_expandable_grab_t_aux:NNwn #1 \q_@@ #2 #3 } }
-\cs_new:Npn \@@_expandable_grab_t_aux:NNwn #1#2#3 \q_@@ #4#5#6
- {
- \str_if_eq:onTF { #1 { } #6 #2 } {#2}
- { #3 { \BooleanTrue } \q_@@ #4 #5 }
- { #3 { \BooleanFalse } \q_@@ #4 #5 {#6} }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}[EXP]{\@@_expandable_grab_u:w}
% It turns out there is nothing to do: this is followed by an
% auxiliary named after the function, that does everything.
@@ -4188,991 +1330,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]
-% {\@@_put_arg_expandable:nw, \@@_put_arg_expandable:ow}
-% A useful helper, to store arguments when they are ready.
-% \begin{macrocode}
-\cs_new:Npn \@@_put_arg_expandable:nw #1#2 \q_@@ { #2 {#1} \q_@@ }
-\cs_generate_variant:Nn \@@_put_arg_expandable:nw { o }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Argument processors}
-%
-% \begin{macro}{\@@_bool_reverse:N}
-% A simple reversal.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_bool_reverse:N #1
- {
- \bool_if:NTF #1
- { \tl_set:Nn \ProcessedArgument { \c_false_bool } }
- { \tl_set:Nn \ProcessedArgument { \c_true_bool } }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{variable}{\l_@@_split_list_seq, \l_@@_split_list_tl}
-% \begin{macro}{\@@_split_list:nn}
-% \begin{macro}{\@@_split_list_multi:nn, \@@_split_list_multi:nV}
-% \begin{macro}{\@@_split_list_single:Nn}
-% Splitting can take place either at a single token or at a longer
-% identifier. To deal with single active tokens, a two-part procedure is
-% needed.
-% \begin{macrocode}
-\seq_new:N \l_@@_split_list_seq
-\tl_new:N \l_@@_split_list_tl
-\cs_new_protected:Npn \@@_split_list:nn #1#2
- {
- \tl_if_single:nTF {#1}
- {
- \token_if_cs:NTF #1
- { \@@_split_list_multi:nn {#1} {#2} }
- { \@@_split_list_single:Nn #1 {#2} }
- }
- { \@@_split_list_multi:nn {#1} {#2} }
- }
-\cs_new_protected:Npn \@@_split_list_multi:nn #1#2
- {
- \seq_set_split:Nnn \l_@@_split_list_seq {#1} {#2}
- \tl_clear:N \ProcessedArgument
- \seq_map_inline:Nn \l_@@_split_list_seq
- { \tl_put_right:Nn \ProcessedArgument { {##1} } }
- }
-\cs_generate_variant:Nn \@@_split_list_multi:nn { nV }
-\group_begin:
-\char_set_catcode_active:N \^^@
-\cs_new_protected:Npn \@@_split_list_single:Nn #1#2
- {
- \tl_set:Nn \l_@@_split_list_tl {#2}
- \group_begin:
- \char_set_lccode:nn { `\^^@ } { `#1 }
- \tex_lowercase:D
- {
- \group_end:
- \tl_replace_all:Nnn \l_@@_split_list_tl { ^^@ }
- } {#1}
- \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
- }
-\group_end:
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{variable}
-%
-% \begin{macro}{\@@_split_argument:nnn}
-% \begin{macro}{\@@_split_argument_aux:nnnn}
-% \begin{macro}[EXP]{\@@_split_argument_aux:n}
-% \begin{macro}[rEXP]{\@@_split_argument_aux:wn}
-% Splitting to a known number of items is a special version of splitting
-% a list, in which the limit is hard-coded and where there will always be
-% exactly the correct number of output items. An auxiliary function is
-% used to save on working out the token list length several times.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_split_argument:nnn #1#2#3
- {
- \@@_split_list:nn {#2} {#3}
- \exp_args:Nf \@@_split_argument_aux:nnnn
- { \tl_count:N \ProcessedArgument }
- {#1} {#2} {#3}
- }
-\cs_new_protected:Npn \@@_split_argument_aux:nnnn #1#2#3#4
- {
- \int_compare:nNnF {#1} = { #2 + 1 }
- {
- \int_compare:nNnTF {#1} > { #2 + 1 }
- {
- \tl_set:Nx \ProcessedArgument
- {
- \exp_last_unbraced:NnNo
- \@@_split_argument_aux:n
- { #2 + 1 }
- \use_none_delimit_by_q_stop:w
- \ProcessedArgument
- \q_stop
- }
- \__kernel_msg_error:nnxxx { xparse } { split-excess-tokens }
- { \tl_to_str:n {#3} } { \int_eval:n { #2 + 1 } }
- { \tl_to_str:n {#4} }
- }
- {
- \tl_put_right:Nx \ProcessedArgument
- {
- \prg_replicate:nn { #2 + 1 - (#1) }
- { { \exp_not:V \c_novalue_tl } }
- }
- }
- }
- }
-% \end{macrocode}
-% Auxiliaries to leave exactly the correct number of arguments in
-% \cs{ProcessedArgument}.
-% \begin{macrocode}
-\cs_new:Npn \@@_split_argument_aux:n #1
- { \prg_replicate:nn {#1} { \@@_split_argument_aux:wn } }
-\cs_new:Npn \@@_split_argument_aux:wn #1 \use_none_delimit_by_q_stop:w #2
- {
- \exp_not:n { {#2} }
- #1
- \use_none_delimit_by_q_stop:w
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_trim_spaces:n}
-% This one is almost trivial.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_trim_spaces:n #1
- { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } }
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Access to the argument specification}
-%
-% \begin{macro}{\@@_get_arg_spec_error:N, \@@_get_arg_spec_error:n}
-% \begin{macro}{\@@_get_arg_spec_error_aux:n}
-% Provide an informative error when trying to get the argument
-% specification of a non-\pkg{xparse} command or environment.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_get_arg_spec_error:N #1
- {
- \bool_set_false:N \l_@@_environment_bool
- \tl_set:Nn \l_@@_fn_tl {#1}
- \@@_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
- }
-\cs_new_protected:Npn \@@_get_arg_spec_error:n #1
- {
- \bool_set_true:N \l_@@_environment_bool
- \str_set:Nx \l_@@_environment_str {#1}
- \@@_get_arg_spec_error_aux:n
- { \cs_if_exist:cTF { \l_@@_environment_str } }
- }
-\cs_new_protected:Npn \@@_get_arg_spec_error_aux:n #1
- {
- #1
- {
- \__kernel_msg_error:nnx { xparse } { non-xparse }
- { \@@_environment_or_command: }
- }
- {
- \__kernel_msg_error:nnx { xparse } { unknown }
- { \@@_environment_or_command: }
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_get_arg_spec:NTF}
-% If the command is not an \pkg{xparse} command, complain. If it is,
-% its second \enquote{item} is the argument specification.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_get_arg_spec:NTF #1#2#3
- {
- \@@_cmd_if_xparse:NTF #1
- {
- \tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
- #2
- }
- {#3}
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_get_arg_spec:N}
-% \begin{macro}{\@@_get_arg_spec:n}
-% \begin{variable}{\ArgumentSpecification}
-% Recovering the argument specification is now trivial.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_get_arg_spec:N #1
- {
- \@@_get_arg_spec:NTF #1 { }
- { \@@_get_arg_spec_error:N #1 }
- }
-\cs_new_protected:Npn \@@_get_arg_spec:n #1
- {
- \exp_args:Nc \@@_get_arg_spec:NTF
- { environment~ \tl_to_str:n {#1} }
- { }
- { \@@_get_arg_spec_error:n {#1} }
- }
-\tl_new:N \ArgumentSpecification
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_show_arg_spec:N}
-% \begin{macro}{\@@_show_arg_spec:n}
-% Showing the argument specification simply means finding it and then
-% calling the \cs{tl_show:N} function.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_show_arg_spec:N #1
- {
- \@@_get_arg_spec:NTF #1
- { \tl_show:N \ArgumentSpecification }
- { \@@_get_arg_spec_error:N #1 }
- }
-\cs_new_protected:Npn \@@_show_arg_spec:n #1
- {
- \exp_args:Nc \@@_get_arg_spec:NTF
- { environment~ \tl_to_str:n {#1} }
- { \tl_show:N \ArgumentSpecification }
- { \@@_get_arg_spec_error:n {#1} }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Utilities}
-%
-% \begin{macro}{\@@_check_definable:nNT, \@@_check_definable_aux:nN}
-% Check that a token list is appropriate as a first argument of
-% \cs{NewDocumentCommand} and similar functions and otherwise
-% produce an error. First trim whitespace to allow for spaces around
-% the actual command to be defined. If the result has multiple
-% tokens, it is not a valid argument. The single token is a control
-% sequence exactly if its string representation has more than one
-% character (using \cs{token_to_str:N} rather than \cs{tl_to_str:n}
-% to avoid problems with macro parameter characters, and setting
-% \cs{tex_escapechar:D} to prevent it from being non-printable).
-% Finally, check for an active character: this is done by lowercasing
-% the token to fix its character code (arbitrarily to that of~|?|)
-% and comparing the result to an active~|?|. Both control sequences
-% and active characters are valid arguments, and non-active character
-% tokens are not. In all cases, the group opened to keep assignments
-% local must be closed.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_check_definable:nNT #1
- { \tl_trim_spaces_apply:nN {#1} \@@_check_definable_aux:nN }
-\group_begin:
- \char_set_catcode_active:n { `? }
- \cs_new_protected:Npn \@@_check_definable_aux:nN #1#2
- {
- \group_begin:
- \tl_if_single_token:nTF {#1}
- {
- \int_set:Nn \tex_escapechar:D { 92 }
- \exp_args:Nx \tl_if_empty:nTF
- { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
- {
- \exp_args:Nx \char_set_lccode:nn
- { ` \str_head:n {#1} } { `? }
- \tex_lowercase:D { \tl_if_eq:nnTF {#1} } { ? }
- { \group_end: \use_iii:nnn }
- { \group_end: \use_i:nnn }
- }
- { \group_end: \use_iii:nnn }
- }
- { \group_end: \use_ii:nnn }
- {
- \__kernel_msg_error:nnxx { xparse } { not-definable }
- { \tl_to_str:n {#1} } { \token_to_str:N #2 }
- }
- {
- \__kernel_msg_error:nnxx { xparse } { not-one-token }
- { \tl_to_str:n {#1} } { \token_to_str:N #2 }
- }
- }
-\group_end:
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_token_if_cs:NTF}
-% Based on the definition of \cs{@@_check_definable_aux:nN} above, but
-% only checks for an actual control sequence (\emph{i.e.},
-% \cs[no-index]{\meta{anything}}). \cs{tex_escapechar:D} is
-% temporarily changed to a known value and then it checks if
-% |\string#1| contains more than one character: if it does, it's a
-% control sequence. This test differs from \cs{token_if_cs:NTF} for
-% example in \verb|\token_if_cs:NTF \c_group_begin_token {T}{F}|,
-% where \cs{token_if_cs:NTF} returns false.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_token_if_cs:NTF #1
- {
- \group_begin:
- \int_set:Nn \tex_escapechar:D { 92 }
- \exp_args:Nx \tl_if_empty:nTF
- { \exp_args:No \str_tail:n { \token_to_str:N #1 } }
- { \group_end: \use_ii:nn }
- { \group_end: \use_i:nn }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_tl_mapthread_function:NNN, \@@_tl_mapthread_function:nnN}
-% \begin{macro}{\@@_tl_mapthread_loop:w}
-% Analogue of \cs{seq_mapthread_function:NNN} for token lists.
-% \begin{macrocode}
-\cs_new:Npn \@@_tl_mapthread_function:NNN #1#2#3
- {
- \exp_after:wN \exp_after:wN
- \exp_after:wN \@@_tl_mapthread_loop:w
- \exp_after:wN \exp_after:wN
- \exp_after:wN #3
- \exp_after:wN #1
- \exp_after:wN \q_recursion_tail
- \exp_after:wN \q_mark
- #2
- \q_recursion_tail
- \q_recursion_stop
- }
-\cs_new:Npn \@@_tl_mapthread_function:nnN #1#2#3
- {
- \@@_tl_mapthread_loop:w #3
- #1 \q_recursion_tail \q_mark
- #2 \q_recursion_tail \q_recursion_stop
- }
-\cs_new:Npn \@@_tl_mapthread_loop:w #1#2#3 \q_mark #4
- {
- \quark_if_recursion_tail_stop:n {#2}
- \quark_if_recursion_tail_stop:n {#4}
- #1 {#2} {#4}
- \@@_tl_mapthread_loop:w #1#3 \q_mark
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_cmd_if_xparse:NTF}
-% \begin{macro}{\@@_cmd_if_xparse_aux:N}
-% To determine whether the command is an \pkg{xparse} command check
-% that its |arg_spec| is empty (this also excludes non-macros) and
-% that its |replacement_spec| starts with either \cs{@@_start:nNNnnn}
-% (non-expandable command) or \cs{@@_start_expandable:nNNNNn}
-% (expandable command) or \cs{@@_start_env:nnnnn} (environment).
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_cmd_if_xparse:NTF #1
- {
- \exp_args:Nf \str_case_e:nnTF
- {
- \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
- {
- \exp_last_unbraced:Nf \@@_cmd_if_xparse_aux:w
- { \cs_replacement_spec:N #1 } ~ \q_stop
- }
- }
- {
- { \token_to_str:N \@@_start:nNNnnn } { }
- { \token_to_str:N \@@_start_expandable:nNNNNn } { }
- { \token_to_str:N \@@_start_env:nnnnn } { }
- }
- }
-\cs_new:Npn \@@_cmd_if_xparse_aux:w #1 ~ #2 \q_stop {#1}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_peek_nonspace:NTF, \@@_peek_nonspace_remove:NTF, \@@_peek_nonspace_aux:nNNTF}
-% Collect spaces in a loop, and put the collected spaces back in the
-% false branch of a call to \cs{peek_meaning:NTF} or
-% \cs{peek_meaning_remove:NTF}.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_peek_nonspace:NTF
- { \@@_peek_nonspace_aux:nNNTF { } \@@_peek_meaning:NTF }
-\cs_new_protected:Npn \@@_peek_nonspace_remove:NTF
- { \@@_peek_nonspace_aux:nNNTF { } \@@_peek_meaning_remove:NTF }
-\cs_new_protected:Npn \@@_peek_nonspace_aux:nNNTF #1#2#3#4#5
- {
- \peek_meaning_remove:NTF \c_space_token
- { \@@_peek_nonspace_aux:nNNTF { #1 ~ } #2 #3 {#4} {#5} }
- { #2 #3 { #4 } { #5 #1 } }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_peek_meaning:NTF, \@@_peek_meaning_remove:NTF}
-% \begin{macro}{\@@_peek_cs_check_equal:NNN, \@@_peek_meaning_aux:NNTF, \@@_peek_true_remove:NNw}
-% Peek ahead for a token with a given meaning. In case the search
-% token is a control sequence, also check that the \meta{csname} is
-% the same as the control sequence peeked at. This extra verification
-% is necessary when the command is delimited by control sequence tokens
-% (as opposed to character tokens), and we want the the exact same
-% control sequence to match.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_peek_meaning:NTF
- { \@@_peek_meaning_aux:NNTF \c_false_bool }
-\cs_new_protected:Npn \@@_peek_meaning_remove:NTF
- { \@@_peek_meaning_aux:NNTF \c_true_bool }
-\cs_new_protected:Npn \@@_peek_meaning_aux:NNTF #1#2#3#4
- {
- \tl_set:Nn \l_@@_tmpa_tl {#3}
- \tl_set:Nn \l_@@_tmpb_tl {#4}
- \peek_meaning:NTF #2
- {
- \token_if_eq_meaning:NNTF #2 \c_group_begin_token
- { \@@_peek_true_remove:Nw #1 }
- {
- \@@_token_if_cs:NTF #2
- { \@@_peek_cs_check_equal:NNN #1 #2 }
- { \@@_peek_true_remove:Nw #1 }
- }
- }
- { \l_@@_tmpb_tl }
- }
-\cs_new_protected:Npn \@@_peek_cs_check_equal:NNN #1#2#3
- {
- \str_if_eq:nnTF {#2} {#3}
- { \@@_peek_true_remove:Nw #1 }
- { \l_@@_tmpb_tl }
- #3
- }
-\cs_new_protected:Npn \@@_peek_true_remove:Nw #1
- {
- \bool_if:NTF #1
- {
- \tex_afterassignment:D \l_@@_tmpa_tl
- \cs_set_eq:NN \@@_tmp:w
- }
- { \l_@@_tmpa_tl }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Messages}
-%
-% \begin{macro}{\@@_environment_or_command:}
-% \begin{variable}{\c_@@_ignore_def_tl}
-% Two texts used in several messages.
-% \begin{macrocode}
-\cs_new:Npn \@@_environment_or_command:
- {
- \bool_if:NTF \l_@@_environment_bool
- { environment ~ ' \l_@@_environment_str ' }
- {
- command ~ '
- \exp_args:Nf \tl_trim_spaces:n
- { \exp_after:wN \token_to_str:N \l_@@_fn_tl }
- '
- }
- }
-\tl_const:Nn \c_@@_ignore_def_tl
- { \\ \\ LaTeX~will~ignore~this~entire~definition. }
-% \end{macrocode}
-% \end{variable}
-% \end{macro}
-%
-% Some messages intended as errors when defining commands/environments.
-% \begin{macrocode}
-\__kernel_msg_new:nnnn { xparse } { arg-after-body }
- { In~the~definition~of~#1,~b~(body)~argument~must~be~last. }
- {
- The~'body'~argument~type~is~followed~by~'#2'~in~the~argument~
- specification~of~the~#1.~This~is~not~allowed.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { bad-arg-spec }
- { Bad~argument~specification~'#2'~for~#1. }
- {
- The~argument~specification~provided~was~not~valid:~
- one~or~more~mandatory~pieces~of~information~were~missing.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { command-already-defined }
- { Command~'#1'~already~defined! }
- {
- You~have~used~#2~
- with~a~command~that~already~has~a~definition. \\ \\
- The~existing~definition~of~'#1'~will~not~be~altered.
- }
-\__kernel_msg_new:nnnn { xparse } { command-not-yet-defined }
- { Command ~'#1'~not~yet~defined! }
- {
- You~have~used~#2~
- with~a~command~that~was~never~defined.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { environment-already-defined }
- { Environment~'#1'~already~defined! }
- {
- You~have~used~\NewDocumentEnvironment
- with~an~environment~that~already~has~a~definition. \\ \\
- The~existing~definition~of~'#1'~will~not~be~altered.
- }
-\__kernel_msg_new:nnnn { xparse } { environment-not-yet-defined }
- { Environment~'#1'~not~yet~defined! }
- {
- You~have~used~\RenewDocumentEnvironment
- with~an~environment~that~was~never~defined.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { expandable-ending-optional }
- {
- Argument~specification~'#2'~for~expandable~command~'#1'~
- ends~with~optional~argument.
- }
- {
- Expandable~commands~must~have~a~final~mandatory~argument~
- (or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
- argument~with~expandable~commands.
- }
-\__kernel_msg_new:nnnn { xparse } { inconsistent-long }
- { Inconsistent~long~arguments~for~expandable~command~'#1'. }
- {
- The~arguments~for~an~expandable~command~must~not~involve~short~
- arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types.
- }
-\__kernel_msg_new:nnnn { xparse } { invalid-command-arg }
- { Argument~type~'#2'~not~available~for~#1. }
- {
- The~letter~'#2'~can~only~be~used~in~environment~argument~
- specifications,~not~for~commands.
- \\ \\
- LaTeX~will~ignore~this~entire~definition.
- }
-\__kernel_msg_new:nnnn { xparse } { invalid-expandable-argument-type }
- { Argument~type~'#2'~not~available~for~expandable~command~'#1'. }
- {
- The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
- in~an~expandable~command.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { invalid-after-optional-expandably }
- {
- Argument~type~'#2'~not~available~after~optional~argument~
- for~expandable~command~'#1'.
- }
- {
- The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
- in~an~expandable~command~after~an~optional~argument.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { non-trailing-obey-spaces }
- { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. }
- {
- The~prefix~'!'~can~only~apply~to~trailing~optional~arguments.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { not-definable }
- { First~argument~of~'#2'~must~be~a~command. }
- {
- The~first~argument~of~'#2'~should~be~the~document~command~that~will~
- be~defined.~The~provided~argument~'#1'~is~a~character.~Perhaps~a~
- backslash~is~missing?
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { not-one-token }
- { First~argument~of~'#2'~must~be~a~command. }
- {
- The~first~argument~of~'#2'~should~be~the~document~command~that~will~
- be~defined.~The~provided~argument~'#1'~contains~more~than~one~
- token.~Perhaps~a~backslash~is~missing?
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { not-single-token }
- {
- Argument~delimiter~'#2'~for~the~#1~should~be~
- a~single~non-space~token.
- }
- {
- The~argument~specification~provided~was~not~valid:~in~a~place~
- where~a~single~token~is~required,~LaTeX~found~'#2'.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { forbidden-implicit-group-token }
- { Argument~delimiter~'#2'~for~the~#1~is~not~allowed. }
- {
- The~argument~specification~provided~was~not~valid:~the~implicit~
- #3-group~token~'#2'~is~not~allowed~as~an~argument~delimiter.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { processor-in-expandable }
- { Argument~processor~'>{#2}'~cannot~be~used~for~the~expandable~command~'#1'. }
- {
- The~argument~specification~for~#1~contains~a~processor~function:~
- this~is~only~supported~for~standard~robust~commands.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { too-many-arguments }
- { Too~many~arguments~in~argument~specification~'#2'~of~#1. }
- {
- The~argument~specification~provided~has~more~than~9~arguments.~
- This~cannot~be~implemented.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { two-markers }
- { Two~'#2'~apply~to~the~same~argument~in~argument~specification~of~#1. }
- {
- The~argument~specification~provided~has~two~markers~'#2'~applying~
- to~the~same~argument;~these~are~redundant.
- }
-\__kernel_msg_new:nnnn { xparse } { unknown-argument-type }
- { Unknown~argument~type~'#2'~for~the~#1. }
- {
- The~letter~'#2'~does~not~specify~a~known~argument~type.
- \c_@@_ignore_def_tl
- }
-\__kernel_msg_new:nnnn { xparse } { xparse-argument-type }
- { Deprecated~argument~type~'#2'~for~the~#1~requires~xparse. }
- {
- The~letter~'#2'~specifies~a~known~argument~type~that~requires~
- the~xparse~package.
- \c_@@_ignore_def_tl
- }
-% \end{macrocode}
-%
-% Errors when using commands/environments. The \texttt{if-boolean}
-% message is always used in expandable errors. The
-% \texttt{loop-in-defaults} and \texttt{missing-required} messages can
-% be expandable or not expandable.
-% \begin{macrocode}
-\__kernel_msg_new:nnn { xparse } { if-boolean }
- { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
-\__kernel_msg_new:nnnn { xparse } { loop-in-defaults }
- { Defaults~of~#1~have~circular~dependency. }
- {
- The~default~values~of~two~or~more~arguments~of~the~#1~
- depend~on~each~other~in~a~way~that~cannot~be~resolved.
- }
-\__kernel_msg_new:nnnn { xparse } { missing-required }
- { Missing~required~argument~for~#1. }
- {
- The~current~#1~expects~an~argument~starting~with~'#2'.~
- LaTeX~did~not~find~it,~and~will~insert~a~default~value~to~be~processed.
- }
-\__kernel_msg_new:nnnn { xparse } { non-xparse }
- { \str_uppercase:n #1~not~defined~using~xparse. }
- {
- You~have~asked~for~the~argument~specification~for~the~#1,~
- but~this~was~not~defined~using~xparse.
- }
-\__kernel_msg_new:nnnn { xparse } { split-excess-tokens }
- { Too~many~'#1'~tokens~when~trying~to~split~argument. }
- {
- LaTeX~was~asked~to~split~the~input~'#3'~
- at~each~occurrence~of~the~token~'#1',~up~to~a~maximum~of~#2~parts.~
- There~were~too~many~'#1'~tokens.
- }
-\__kernel_msg_new:nnnn { xparse } { unknown }
- { Unknown~document~#1. }
- {
- You~have~asked~for~the~argument~specification~for~the~#1,~
- but~it~is~not~defined.
- }
-\__kernel_msg_new:nnnn { xparse } { verbatim-newline }
- { Verbatim~argument~of~#1~ended~by~end~of~line. }
- {
- The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
- but~the~end~
- of~the~current~line~has~been~reached.~You~may~have~forgotten~the~
- closing~delimiter.
- \\ \\
- LaTeX~will~ignore~'#2'.
- }
-\__kernel_msg_new:nnnn { xparse } { verbatim-tokenized }
- { The~verbatim~#1~cannot~be~used~inside~an~argument. }
- {
- The~#1~takes~a~verbatim~argument.~
- It~may~not~appear~within~the~argument~of~another~function.~
- It~received~an~illegal~token \tl_if_empty:nF {#3} { ~'#3' } .
- \\ \\
- LaTeX~will~ignore~'#2'.
- }
-% \end{macrocode}
-%
-% Intended more for information.
-% \begin{macrocode}
-\__kernel_msg_new:nnn { xparse } { define-command }
- {
- Defining~command~#1~
- with~sig.~'#2'~\msg_line_context:.
- }
-\__kernel_msg_new:nnn { xparse } { define-environment }
- {
- Defining~environment~'#1'~
- with~sig.~'#2'~\msg_line_context:.
- }
-\__kernel_msg_new:nnn { xparse } { redefine-command }
- {
- Redefining~command~#1~
- with~sig.~'#2'~\msg_line_context:.
- }
-\__kernel_msg_new:nnn { xparse } { redefine-environment }
- {
- Redefining~environment~'#1'~
- with~sig.~'#2'~\msg_line_context:.
- }
-\__kernel_msg_new:nnn { xparse } { optional-mandatory }
- {
- Since~the~mandatory~argument~'#1'~has~the~same~delimiter~'#2'~
- as~a~previous~optional~argument,~it~will~not~be~possible~to~
- omit~all~optional~arguments~when~calling~this~command.
- }
-\__kernel_msg_new:nnn { xparse } { unsupported-let }
- {
- The~command~'#1'~was~undefined~but~not~the~associated~commands~
- '#1~code'~and/or~'#1~defaults'.~Maybe~you~tried~using~
- \iow_char:N\\let.~This~may~lead~to~an~infinite~loop.
- }
-% \end{macrocode}
-%
-% \subsection{User functions}
-%
-% The user functions are more or less just the internal functions
-% renamed.
-%
-% \begin{macro}{\BooleanFalse}
-% \begin{macro}{\BooleanTrue}
-% Design-space names for the Boolean values.
-% \begin{macrocode}
-\cs_new_eq:NN \BooleanFalse \c_false_bool
-\cs_new_eq:NN \BooleanTrue \c_true_bool
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\NewDocumentCommand}
-% \begin{macro}{\RenewDocumentCommand}
-% \begin{macro}{\ProvideDocumentCommand}
-% \begin{macro}{\DeclareDocumentCommand}
-% The user macros are pretty simple wrappers around the internal ones.
-% There is however a check that the first argument is a single token,
-% possibly surrounded by spaces (hence the strange \cs{use:nnn}), and
-% is definable.
-% \begin{macrocode}
-\cs_new_protected:Npn \NewDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \NewDocumentCommand
- {
- \cs_if_exist:NTF #1
- {
- \__kernel_msg_error:nnxx { xparse } { command-already-defined }
- { \use:nnn \token_to_str:N #1 { } }
- { \token_to_str:N \NewDocumentCommand }
- }
- { \@@_declare_cmd:Nnn #1 {#2} {#3} }
- }
- }
-\cs_new_protected:Npn \RenewDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \RenewDocumentCommand
- {
- \cs_if_exist:NTF #1
- { \@@_declare_cmd:Nnn #1 {#2} {#3} }
- {
- \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
- { \use:nnn \token_to_str:N #1 { } }
- { \token_to_str:N \RenewDocumentCommand }
- }
- }
- }
-\cs_new_protected:Npn \ProvideDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \ProvideDocumentCommand
- { \cs_if_exist:NF #1 { \@@_declare_cmd:Nnn #1 {#2} {#3} } }
- }
-\cs_new_protected:Npn \DeclareDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \DeclareDocumentCommand
- { \@@_declare_cmd:Nnn #1 {#2} {#3} }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\NewDocumentEnvironment}
-% \begin{macro}{\RenewDocumentEnvironment}
-% \begin{macro}{\ProvideDocumentEnvironment}
-% \begin{macro}{\DeclareDocumentEnvironment}
-% Very similar for environments.
-% \begin{macrocode}
-\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
- {
- \cs_if_exist:cTF {#1}
- { \__kernel_msg_error:nnx { xparse } { environment-already-defined } {#1} }
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
- }
-\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
- {
- \cs_if_exist:cTF {#1}
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
- { \__kernel_msg_error:nnx { xparse } { environment-not-yet-defined } {#1} }
- }
-\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
- { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } }
-\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\NewExpandableDocumentCommand}
-% \begin{macro}{\RenewExpandableDocumentCommand}
-% \begin{macro}{\ProvideExpandableDocumentCommand}
-% \begin{macro}{\DeclareExpandableDocumentCommand}
-% The expandable versions are essentially the same as the basic
-% functions. The strange \cs{use:nnn} is there in case |#1| is
-% surrounded with spaces, as can happen with usual document catcodes
-% in \cs{RenewExpandableDocumentCommand} |{| |\!| |}| \ldots{}
-% \begin{macrocode}
-\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \NewExpandableDocumentCommand
- {
- \cs_if_exist:NTF #1
- {
- \__kernel_msg_error:nnxx { xparse } { command-already-defined }
- { \use:nnn \token_to_str:N #1 { } }
- { \token_to_str:N \NewExpandableDocumentCommand }
- }
- { \@@_declare_expandable_cmd:Nnn #1 {#2} {#3} }
- }
- }
-\cs_new_protected:Npn \RenewExpandableDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \RenewExpandableDocumentCommand
- {
- \cs_if_exist:NTF #1
- { \@@_declare_expandable_cmd:Nnn #1 {#2} {#3} }
- {
- \__kernel_msg_error:nnxx { xparse } { command-not-yet-defined }
- { \use:nnn \token_to_str:N #1 { } }
- { \token_to_str:N \RenewExpandableDocumentCommand }
- }
- }
- }
-\cs_new_protected:Npn \ProvideExpandableDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \ProvideExpandableDocumentCommand
- {
- \cs_if_exist:NF #1
- { \@@_declare_expandable_cmd:Nnn #1 {#2} {#3} }
- }
- }
-\cs_new_protected:Npn \DeclareExpandableDocumentCommand #1#2#3
- {
- \@@_check_definable:nNT {#1} \DeclareExpandableDocumentCommand
- { \@@_declare_expandable_cmd:Nnn #1 {#2} {#3} }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\IfBooleanT, \IfBooleanF, \IfBooleanTF}
-% The logical \meta{true} and \meta{false} statements are just the
-% normal \cs{c_true_bool} and \cs{c_false_bool} so \cs{bool_if:NTF} is
-% almost enough. However, this code-level function blows up badly
-% when passed invalid input. We want \cs{IfBooleanTF} to accept a
-% single (non-space) token equal to \cs{c_true_bool} or
-% \cs{c_false_bool}, possibly surrounded by spaces. If the input is
-% blank or multiple items, jump to the error and pick the false
-% branch. If the input, ignoring spaces (we do this by omitting
-% braces in the \cs{tl_if_single_token:nF} test), is not a single
-% token then jump to the error as well. It is then safe to compare
-% the token to the two booleans, picking the appropriate branch. If
-% neither matches, we jump to the error as well.
-% \begin{macrocode}
-\cs_new:Npn \IfBooleanTF #1
- {
- \tl_if_single:nF {#1}
- { \prg_break:n { \use:n } }
- \tl_if_single_token:nF #1
- { \prg_break:n { \use:n } }
- \token_if_eq_meaning:NNT #1 \c_true_bool
- { \prg_break:n { \use_ii:nnn } }
- \token_if_eq_meaning:NNT #1 \c_false_bool
- { \prg_break:n { \use_iii:nnn } }
- \prg_break:n { \use:n }
- \prg_break_point:
- {
- \__kernel_msg_expandable_error:nnn { xparse } { if-boolean } {#1}
- \use_ii:nn
- }
- }
-\cs_new:Npn \IfBooleanT #1#2 { \IfBooleanTF {#1} {#2} { } }
-\cs_new:Npn \IfBooleanF #1 { \IfBooleanTF {#1} { } }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\IfNoValueT, \IfNoValueF, \IfNoValueTF}
-% Simple re-naming.
-% \begin{macrocode}
-\cs_new_eq:NN \IfNoValueF \tl_if_novalue:nF
-\cs_new_eq:NN \IfNoValueT \tl_if_novalue:nT
-\cs_new_eq:NN \IfNoValueTF \tl_if_novalue:nTF
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\IfValueT, \IfValueF, \IfValueTF}
-% Inverted logic.
-% \begin{macrocode}
-\cs_new:Npn \IfValueF { \tl_if_novalue:nT }
-\cs_new:Npn \IfValueT { \tl_if_novalue:nF }
-\cs_new:Npn \IfValueTF #1#2#3 { \tl_if_novalue:nTF {#1} {#3} {#2} }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ProcessedArgument}
-% Processed arguments are returned using this name, which is reserved
-% here although the definition will change.
-% \begin{macrocode}
-\tl_new:N \ProcessedArgument
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ReverseBoolean, \SplitArgument, \SplitList, \TrimSpaces}
-% Simple copies.
-% \begin{macrocode}
-\cs_new_eq:NN \ReverseBoolean \@@_bool_reverse:N
-\cs_new_eq:NN \SplitArgument \@@_split_argument:nnn
-\cs_new_eq:NN \SplitList \@@_split_list:nn
-\cs_new_eq:NN \TrimSpaces \@@_trim_spaces:n
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ProcessList}
-% To support \cs{SplitList}.
-% \begin{macrocode}
-\cs_new_eq:NN \ProcessList \tl_map_function:nN
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\GetDocumentCommandArgSpec}
-% \begin{macro}{\GetDocumentEnvironmentArgSpec}
-% \begin{macro}{\ShowDocumentCommandArgSpec}
-% \begin{macro}{\ShowDocumentEnvironmentArgSpec}
-% More simple mappings, with a check that the argument is a single
-% control sequence or active character.
-% \begin{macrocode}
-\cs_new_protected:Npn \GetDocumentCommandArgSpec #1
- {
- \@@_check_definable:nNT {#1} \GetDocumentCommandArgSpec
- { \@@_get_arg_spec:N #1 }
- }
-\cs_new_eq:NN \GetDocumentEnvironmentArgSpec \@@_get_arg_spec:n
-\cs_new_protected:Npn \ShowDocumentCommandArgSpec #1
- {
- \@@_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
- { \@@_show_arg_spec:N #1 }
- }
-\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \@@_show_arg_spec:n
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
-\@@_file_end_hook:
-% \end{macrocode}
-%
-% \begin{macrocode}
-%</core>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*2ekernel>
-\ExplSyntaxOff
-%</2ekernel>
+%</package>
% \end{macrocode}
%
% \end{implementation}
diff --git a/macros/latex/contrib/l3packages/xparse.ins b/macros/latex/contrib/l3packages/xparse.ins
index 17a94782a4..da55996744 100644
--- a/macros/latex/contrib/l3packages/xparse.ins
+++ b/macros/latex/contrib/l3packages/xparse.ins
@@ -2,7 +2,7 @@
File: xparse.ins
-Copyright (C) 2000-2012,2016,2017,2019,2020 The LaTeX3 Project
+Copyright (C) 2000-2012,2016,2017,2019-2021 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
@@ -23,7 +23,7 @@ The released version of this bundle is available from CTAN.
\preamble
-Copyright (C) 2009-2020 The LaTeX3 Project
+Copyright (C) 2009-2021 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
@@ -42,8 +42,7 @@ and all files in that bundle must be distributed together.
\keepsilent
-\generate{\file{xparse-generic.tex}{\from{xparse.dtx}{core}}
- \file{xparse.sty}{\from{xparse.dtx}{package}}
+\generate{\file{xparse.sty}{\from{xparse.dtx}{package}}
\file{xparse.ltx}{\from{xparse.dtx}{2ekernel}}}
\endbatchfile
diff --git a/macros/latex/contrib/l3packages/xparse.pdf b/macros/latex/contrib/l3packages/xparse.pdf
index 4331d6c3f0..bdd5f8bfb9 100644
--- a/macros/latex/contrib/l3packages/xparse.pdf
+++ b/macros/latex/contrib/l3packages/xparse.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3packages/xtemplate.dtx b/macros/latex/contrib/l3packages/xtemplate.dtx
index 7ea561b199..a20b55892e 100644
--- a/macros/latex/contrib/l3packages/xtemplate.dtx
+++ b/macros/latex/contrib/l3packages/xtemplate.dtx
@@ -3,8 +3,8 @@
%% File: xtemplate.dtx
%
% Copyright (C) 1999 Frank Mittelbach, Chris Rowley, David Carlisle
-% (C) 2004-2010 Frank Mittelbach, The LaTeX3 Project
-% (C) 2011-2020 The LaTeX3 Project
+% (C) 2004-2010 Frank Mittelbach, The LaTeX Project
+% (C) 2011-2021 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
@@ -55,7 +55,7 @@
% }
%
% \author{^^A
-% The \LaTeX3 Project\thanks
+% The \LaTeX{} Project\thanks
% {^^A
% E-mail:
% \href{mailto:latex-team@latex-project.org}
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2020-10-27}
+% \date{Released 2021-02-02}
%
% \maketitle
%
@@ -682,7 +682,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplPackage{xtemplate}{2020-10-27}{}
+\ProvidesExplPackage{xtemplate}{2021-02-02}{}
{L3 Experimental prototype document functions}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/l3packages/xtemplate.ins b/macros/latex/contrib/l3packages/xtemplate.ins
index 43dfb26620..3e88b5e52c 100644
--- a/macros/latex/contrib/l3packages/xtemplate.ins
+++ b/macros/latex/contrib/l3packages/xtemplate.ins
@@ -2,7 +2,7 @@
File: xtemplate.ins
-Copyright (C) 2000-2012,2016,2017,2019,2020 The LaTeX3 Project
+Copyright (C) 2000-2012,2016,2017,2019-2021 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
@@ -34,7 +34,7 @@ license information is placed in the derived files.
\preamble
-Copyright (C) 2011-2020 The LaTeX3 Project
+Copyright (C) 2011-2021 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
diff --git a/macros/latex/contrib/l3packages/xtemplate.pdf b/macros/latex/contrib/l3packages/xtemplate.pdf
index 8afc1d87b8..d0d755b853 100644
--- a/macros/latex/contrib/l3packages/xtemplate.pdf
+++ b/macros/latex/contrib/l3packages/xtemplate.pdf
Binary files differ