summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex-dev/base/README.md6
-rw-r--r--macros/latex-dev/base/alltt.pdfbin173077 -> 173077 bytes
-rw-r--r--macros/latex-dev/base/bugs.txt9
-rw-r--r--macros/latex-dev/base/cfgguide.pdfbin220211 -> 220211 bytes
-rw-r--r--macros/latex-dev/base/changes.txt1224
-rw-r--r--macros/latex-dev/base/classes.dtx135
-rw-r--r--macros/latex-dev/base/classes.pdfbin521080 -> 520906 bytes
-rw-r--r--macros/latex-dev/base/clsguide.pdfbin372505 -> 372505 bytes
-rw-r--r--macros/latex-dev/base/cmfonts.pdfbin264453 -> 264453 bytes
-rw-r--r--macros/latex-dev/base/cyrguide.pdfbin216976 -> 216976 bytes
-rw-r--r--macros/latex-dev/base/doc.pdfbin629318 -> 629536 bytes
-rw-r--r--macros/latex-dev/base/docstrip.dtx23
-rw-r--r--macros/latex-dev/base/docstrip.pdfbin469448 -> 470217 bytes
-rw-r--r--macros/latex-dev/base/encguide.pdfbin1532114 -> 1532114 bytes
-rw-r--r--macros/latex-dev/base/exscale.pdfbin195880 -> 195880 bytes
-rw-r--r--macros/latex-dev/base/fix-cm.pdfbin262051 -> 262051 bytes
-rw-r--r--macros/latex-dev/base/fntguide.pdfbin361810 -> 361810 bytes
-rw-r--r--macros/latex-dev/base/fontdef.dtx28
-rw-r--r--macros/latex-dev/base/graphpap.pdfbin156280 -> 156280 bytes
-rw-r--r--macros/latex-dev/base/ifthen.pdfbin205205 -> 205205 bytes
-rw-r--r--macros/latex-dev/base/inputenc.dtx12
-rw-r--r--macros/latex-dev/base/inputenc.pdfbin294824 -> 294723 bytes
-rw-r--r--macros/latex-dev/base/latexchanges.pdfbin232380 -> 232380 bytes
-rw-r--r--macros/latex-dev/base/latexrelease.pdfbin246174 -> 246174 bytes
-rw-r--r--macros/latex-dev/base/latexsym.pdfbin192289 -> 192289 bytes
-rw-r--r--macros/latex-dev/base/lb2.pdfbin138223 -> 138223 bytes
-rw-r--r--macros/latex-dev/base/letter.dtx100
-rw-r--r--macros/latex-dev/base/letter.pdfbin304792 -> 305750 bytes
-rw-r--r--macros/latex-dev/base/lgc2.pdfbin101344 -> 101344 bytes
-rw-r--r--macros/latex-dev/base/lppl.pdfbin0 -> 125828 bytes
-rw-r--r--macros/latex-dev/base/lppl.tex511
-rw-r--r--macros/latex-dev/base/ltboxes.dtx12
-rw-r--r--macros/latex-dev/base/ltclass.dtx248
-rw-r--r--macros/latex-dev/base/ltdefns.dtx78
-rw-r--r--macros/latex-dev/base/ltexpl.dtx43
-rw-r--r--macros/latex-dev/base/ltfiles.dtx129
-rw-r--r--macros/latex-dev/base/ltfloat.dtx66
-rw-r--r--macros/latex-dev/base/ltfssaxes.dtx15
-rw-r--r--macros/latex-dev/base/ltfssbas.dtx2
-rw-r--r--macros/latex-dev/base/ltfssdcl.dtx65
-rw-r--r--macros/latex-dev/base/ltfssini.dtx322
-rw-r--r--macros/latex-dev/base/ltlists.dtx8
-rw-r--r--macros/latex-dev/base/ltluatex.dtx7
-rw-r--r--macros/latex-dev/base/ltluatex.pdfbin304104 -> 304468 bytes
-rw-r--r--macros/latex-dev/base/ltmath.dtx131
-rw-r--r--macros/latex-dev/base/ltmiscen.dtx134
-rw-r--r--macros/latex-dev/base/ltnews.pdfbin959539 -> 972412 bytes
-rw-r--r--macros/latex-dev/base/ltnews.tex36
-rw-r--r--macros/latex-dev/base/ltnews01.pdfbin150020 -> 150020 bytes
-rw-r--r--macros/latex-dev/base/ltnews02.pdfbin134750 -> 134750 bytes
-rw-r--r--macros/latex-dev/base/ltnews03.pdfbin134730 -> 134730 bytes
-rw-r--r--macros/latex-dev/base/ltnews04.pdfbin128768 -> 128768 bytes
-rw-r--r--macros/latex-dev/base/ltnews05.pdfbin157174 -> 157174 bytes
-rw-r--r--macros/latex-dev/base/ltnews06.pdfbin133132 -> 133132 bytes
-rw-r--r--macros/latex-dev/base/ltnews07.pdfbin124028 -> 124028 bytes
-rw-r--r--macros/latex-dev/base/ltnews08.pdfbin144471 -> 144471 bytes
-rw-r--r--macros/latex-dev/base/ltnews09.pdfbin120208 -> 120208 bytes
-rw-r--r--macros/latex-dev/base/ltnews10.pdfbin147941 -> 147941 bytes
-rw-r--r--macros/latex-dev/base/ltnews11.pdfbin104942 -> 104942 bytes
-rw-r--r--macros/latex-dev/base/ltnews12.pdfbin137918 -> 137918 bytes
-rw-r--r--macros/latex-dev/base/ltnews13.pdfbin161066 -> 161066 bytes
-rw-r--r--macros/latex-dev/base/ltnews14.pdfbin150920 -> 150920 bytes
-rw-r--r--macros/latex-dev/base/ltnews15.pdfbin122088 -> 122088 bytes
-rw-r--r--macros/latex-dev/base/ltnews16.pdfbin130688 -> 130688 bytes
-rw-r--r--macros/latex-dev/base/ltnews17.pdfbin149835 -> 149835 bytes
-rw-r--r--macros/latex-dev/base/ltnews18.pdfbin36003 -> 36003 bytes
-rw-r--r--macros/latex-dev/base/ltnews19.pdfbin235068 -> 235068 bytes
-rw-r--r--macros/latex-dev/base/ltnews20.pdfbin283323 -> 283323 bytes
-rw-r--r--macros/latex-dev/base/ltnews21.pdfbin233491 -> 233491 bytes
-rw-r--r--macros/latex-dev/base/ltnews22.pdfbin302835 -> 302835 bytes
-rw-r--r--macros/latex-dev/base/ltnews23.pdfbin274453 -> 274453 bytes
-rw-r--r--macros/latex-dev/base/ltnews24.pdfbin252641 -> 252641 bytes
-rw-r--r--macros/latex-dev/base/ltnews25.pdfbin196325 -> 196325 bytes
-rw-r--r--macros/latex-dev/base/ltnews26.pdfbin362836 -> 362836 bytes
-rw-r--r--macros/latex-dev/base/ltnews27.pdfbin239755 -> 239755 bytes
-rw-r--r--macros/latex-dev/base/ltnews28.pdfbin368228 -> 368229 bytes
-rw-r--r--macros/latex-dev/base/ltnews28.tex4
-rw-r--r--macros/latex-dev/base/ltnews29.pdfbin433006 -> 433006 bytes
-rw-r--r--macros/latex-dev/base/ltnews30.pdfbin491245 -> 491245 bytes
-rw-r--r--macros/latex-dev/base/ltnews31.pdfbin500199 -> 500199 bytes
-rw-r--r--macros/latex-dev/base/ltnews32.pdfbin344268 -> 476890 bytes
-rw-r--r--macros/latex-dev/base/ltnews32.tex406
-rw-r--r--macros/latex-dev/base/ltoutenc.dtx10
-rw-r--r--macros/latex-dev/base/ltpictur.dtx30
-rw-r--r--macros/latex-dev/base/ltspace.dtx200
-rw-r--r--macros/latex-dev/base/lttab.dtx45
-rw-r--r--macros/latex-dev/base/lttextcomp.dtx35
-rw-r--r--macros/latex-dev/base/ltvers.dtx2
-rw-r--r--macros/latex-dev/base/ltx3info.pdfbin191528 -> 191528 bytes
-rw-r--r--macros/latex-dev/base/ltxdoc.pdfbin215600 -> 215600 bytes
-rw-r--r--macros/latex-dev/base/ltxref.dtx18
-rw-r--r--macros/latex-dev/base/makeindx.pdfbin160673 -> 160673 bytes
-rw-r--r--macros/latex-dev/base/manifest.txt18
-rw-r--r--macros/latex-dev/base/manual.pdfbin151354 -> 151354 bytes
-rw-r--r--macros/latex-dev/base/modguide.pdfbin220384 -> 220384 bytes
-rw-r--r--macros/latex-dev/base/nfssfont.pdfbin202429 -> 202429 bytes
-rw-r--r--macros/latex-dev/base/proc.pdfbin216899 -> 216899 bytes
-rw-r--r--macros/latex-dev/base/slides.pdfbin351660 -> 351660 bytes
-rw-r--r--macros/latex-dev/base/slifonts.pdfbin214708 -> 214708 bytes
-rw-r--r--macros/latex-dev/base/source2e.pdfbin3117644 -> 3182847 bytes
-rw-r--r--macros/latex-dev/base/syntonly.pdfbin181181 -> 181389 bytes
-rw-r--r--macros/latex-dev/base/tlc2.pdfbin164949 -> 164949 bytes
-rw-r--r--macros/latex-dev/base/tulm.pdfbin156534 -> 156534 bytes
-rw-r--r--macros/latex-dev/base/usrguide.pdfbin398281 -> 398989 bytes
-rw-r--r--macros/latex-dev/base/usrguide.tex94
-rw-r--r--macros/latex-dev/base/utf8ienc.pdfbin330773 -> 330713 bytes
-rw-r--r--macros/latex-dev/base/webcomp.pdfbin136153 -> 136153 bytes
-rw-r--r--macros/latex-dev/required/amsmath/README.md4
-rw-r--r--macros/latex-dev/required/amsmath/amsbsy.dtx6
-rw-r--r--macros/latex-dev/required/amsmath/amsbsy.ins8
-rw-r--r--macros/latex-dev/required/amsmath/amsbsy.pdfbin161330 -> 161323 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amscd.dtx6
-rw-r--r--macros/latex-dev/required/amsmath/amscd.ins8
-rw-r--r--macros/latex-dev/required/amsmath/amscd.pdfbin165748 -> 165742 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsgen.dtx6
-rw-r--r--macros/latex-dev/required/amsmath/amsgen.ins8
-rw-r--r--macros/latex-dev/required/amsmath/amsgen.pdfbin164347 -> 164340 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsldoc.pdfbin475103 -> 475924 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsldoc.tex16
-rw-r--r--macros/latex-dev/required/amsmath/amsmath-2018-12-01.sty12
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.dtx191
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.ins8
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.pdfbin379045 -> 383566 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsopn.dtx6
-rw-r--r--macros/latex-dev/required/amsmath/amsopn.ins8
-rw-r--r--macros/latex-dev/required/amsmath/amsopn.pdfbin129165 -> 129158 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amstex.sty4
-rw-r--r--macros/latex-dev/required/amsmath/amstext.dtx8
-rw-r--r--macros/latex-dev/required/amsmath/amstext.ins9
-rw-r--r--macros/latex-dev/required/amsmath/amstext.pdfbin193899 -> 194266 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsxtra.dtx6
-rw-r--r--macros/latex-dev/required/amsmath/amsxtra.ins9
-rw-r--r--macros/latex-dev/required/amsmath/amsxtra.pdfbin104544 -> 104540 bytes
-rw-r--r--macros/latex-dev/required/amsmath/changes.txt31
-rw-r--r--macros/latex-dev/required/amsmath/subeqn.pdfbin101297 -> 101292 bytes
-rw-r--r--macros/latex-dev/required/amsmath/subeqn.tex2
-rw-r--r--macros/latex-dev/required/amsmath/technote.pdfbin130477 -> 130587 bytes
-rw-r--r--macros/latex-dev/required/amsmath/testmath.pdfbin428682 -> 428947 bytes
-rw-r--r--macros/latex-dev/required/graphics/README.md2
-rw-r--r--macros/latex-dev/required/graphics/changes.txt3
-rw-r--r--macros/latex-dev/required/graphics/color.dtx6
-rw-r--r--macros/latex-dev/required/graphics/color.pdfbin201521 -> 200935 bytes
-rw-r--r--macros/latex-dev/required/graphics/drivers.pdfbin268843 -> 263724 bytes
-rw-r--r--macros/latex-dev/required/graphics/epsfig.pdfbin154491 -> 154485 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphics.pdfbin289788 -> 284646 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphicx.pdfbin232502 -> 232495 bytes
-rw-r--r--macros/latex-dev/required/graphics/grfguide.pdfbin310569 -> 310565 bytes
-rw-r--r--macros/latex-dev/required/graphics/keyval.pdfbin222531 -> 222525 bytes
-rw-r--r--macros/latex-dev/required/graphics/lscape.pdfbin150110 -> 150104 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotating.pdfbin250716 -> 245867 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotex.pdfbin162253 -> 162248 bytes
-rw-r--r--macros/latex-dev/required/graphics/trig.pdfbin191699 -> 191692 bytes
-rw-r--r--macros/latex-dev/required/tools/README.md2
-rw-r--r--macros/latex-dev/required/tools/afterpage.pdfbin189848 -> 189848 bytes
-rw-r--r--macros/latex-dev/required/tools/array-2020-02-10.sty374
-rw-r--r--macros/latex-dev/required/tools/array.dtx30
-rw-r--r--macros/latex-dev/required/tools/array.pdfbin480808 -> 481282 bytes
-rw-r--r--macros/latex-dev/required/tools/bm.pdfbin306775 -> 306775 bytes
-rw-r--r--macros/latex-dev/required/tools/calc.pdfbin340877 -> 340877 bytes
-rw-r--r--macros/latex-dev/required/tools/changes.txt22
-rw-r--r--macros/latex-dev/required/tools/dcolumn.pdfbin199221 -> 199221 bytes
-rw-r--r--macros/latex-dev/required/tools/delarray.pdfbin183432 -> 183432 bytes
-rw-r--r--macros/latex-dev/required/tools/enumerate.pdfbin199049 -> 199049 bytes
-rw-r--r--macros/latex-dev/required/tools/fileerr.pdfbin179882 -> 179548 bytes
-rw-r--r--macros/latex-dev/required/tools/fontsmpl.pdfbin138025 -> 138025 bytes
-rw-r--r--macros/latex-dev/required/tools/ftnright.pdfbin346724 -> 346379 bytes
-rw-r--r--macros/latex-dev/required/tools/hhline.pdfbin175678 -> 175678 bytes
-rw-r--r--macros/latex-dev/required/tools/indentfirst.pdfbin144779 -> 144779 bytes
-rw-r--r--macros/latex-dev/required/tools/layout.pdfbin246931 -> 246931 bytes
-rw-r--r--macros/latex-dev/required/tools/longtable.pdfbin349927 -> 349927 bytes
-rw-r--r--macros/latex-dev/required/tools/multicol.pdfbin491250 -> 491025 bytes
-rw-r--r--macros/latex-dev/required/tools/rawfonts.pdfbin135688 -> 135688 bytes
-rw-r--r--macros/latex-dev/required/tools/shellesc.pdfbin169757 -> 169757 bytes
-rw-r--r--macros/latex-dev/required/tools/showkeys.pdfbin242786 -> 242786 bytes
-rw-r--r--macros/latex-dev/required/tools/somedefs.pdfbin156511 -> 156511 bytes
-rw-r--r--macros/latex-dev/required/tools/tabularx.pdfbin254205 -> 254205 bytes
-rw-r--r--macros/latex-dev/required/tools/theorem.pdfbin323292 -> 322937 bytes
-rw-r--r--macros/latex-dev/required/tools/tools-overview.pdfbin68288 -> 68288 bytes
-rw-r--r--macros/latex-dev/required/tools/trace.pdfbin212730 -> 212730 bytes
-rw-r--r--macros/latex-dev/required/tools/varioref.pdfbin354736 -> 354736 bytes
-rw-r--r--macros/latex-dev/required/tools/verbatim.pdfbin302233 -> 302233 bytes
-rw-r--r--macros/latex-dev/required/tools/xr.dtx13
-rw-r--r--macros/latex-dev/required/tools/xr.pdfbin163785 -> 163612 bytes
-rw-r--r--macros/latex-dev/required/tools/xspace.pdfbin238007 -> 238007 bytes
-rw-r--r--macros/latex/contrib/achemso/CHANGELOG.md4
-rw-r--r--macros/latex/contrib/achemso/achemso-demo.pdfbin359125 -> 359004 bytes
-rw-r--r--macros/latex/contrib/achemso/achemso.dtx130
-rw-r--r--macros/latex/contrib/achemso/achemso.pdfbin514491 -> 514502 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/biblio.bib3
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/history.tex1
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/sample-use-sty.pdfbin112874 -> 112967 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.pdfbin169749 -> 169826 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.tex2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx13
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/swentries.tex3
-rw-r--r--macros/latex/contrib/nicematrix/README.md3
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin349092 -> 355393 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex2840
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx4061
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin845357 -> 875835 bytes
-rw-r--r--macros/latex/contrib/poemscol/poemscol.dtx418
-rw-r--r--macros/latex/contrib/poemscol/poemscol.pdfbin712470 -> 727493 bytes
-rw-r--r--macros/latex/required/amscls/README7
-rw-r--r--macros/latex/required/amscls/amsclass.dtx52
-rw-r--r--macros/latex/required/amscls/amsclass.ins23
-rw-r--r--macros/latex/required/amscls/doc/amsclass.pdfbin373922 -> 340415 bytes
-rw-r--r--macros/latex/required/amscls/doc/diffs-c.txt9
-rw-r--r--macros/luatex/latex/cloze/README.md (renamed from macros/luatex/latex/cloze/README)54
-rw-r--r--macros/luatex/latex/cloze/cloze.dtx1207
-rw-r--r--macros/luatex/latex/cloze/cloze.ins9
-rw-r--r--macros/luatex/latex/cloze/cloze.lua1002
-rw-r--r--macros/luatex/latex/cloze/cloze.pdfbin257712 -> 318609 bytes
212 files changed, 10006 insertions, 4849 deletions
diff --git a/macros/latex-dev/base/README.md b/macros/latex-dev/base/README.md
index 95c699fdea..f2eb61eca3 100644
--- a/macros/latex-dev/base/README.md
+++ b/macros/latex-dev/base/README.md
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2020-10-01 pre-release 5
+Release 2020-10-01 pre-release 6
Overview
--------
@@ -34,16 +34,12 @@ the most significant of these files are
- `README.md` is this file
- `manifest.txt` lists all the files in this LaTeX distribution,
with one line of information about the contents
-- `unpacked.txt` lists all the files in the unpacked LaTeX distribution
- `legal.txt` and `lppl.txt` (LaTeX Project Public License) describe the
LaTeX copyright, warranty and copying restrictions.
-- `patches.txt` describes the how important changes will be distributed
- between releases
- `texpert.txt` contains information about the system that may still be
useful for TeX experts
- `tex2.txt` contains important information for users of extremely
old versions of TeX (pre 1990)
-- `autoload.txt` describes a variant of LaTeX that is no longer supported
- `bugs.txt` describes how to submit a bug report for LaTeX
Other documentation files include files with names of the form:
diff --git a/macros/latex-dev/base/alltt.pdf b/macros/latex-dev/base/alltt.pdf
index 1e49f05ae1..033cb5ff35 100644
--- a/macros/latex-dev/base/alltt.pdf
+++ b/macros/latex-dev/base/alltt.pdf
Binary files differ
diff --git a/macros/latex-dev/base/bugs.txt b/macros/latex-dev/base/bugs.txt
index 1891476325..8fd071c8a7 100644
--- a/macros/latex-dev/base/bugs.txt
+++ b/macros/latex-dev/base/bugs.txt
@@ -1,6 +1,6 @@
LaTeX Error Reports
- January 2017
+ April 2020
ERROR REPORTS
@@ -15,7 +15,8 @@ Before you report an error, please check that:
distribution, e.g. in a .dtx file (in this case it is a feature :-).
* The error has not already been reported. If you have WWW
- access, you can search the LaTeX bugs database using this URL:
+ access, you can find out how to search the LaTeX bugs database
+ using this URL:
https://www.latex-project.org/bugs.html
@@ -52,7 +53,7 @@ core LaTeX software, please report it in the following way:
Submit the test and transcript files through the Web interface at:
- https://www.latex-project.org/bugs/bugs-upload.html
+ https://github.com/latex3/latex2e/issues
Please fill in all required fields; in particular, make sure
that your name, email address, and the summary description
@@ -84,4 +85,4 @@ given in that corresponding errata file.
Please *do not* send such reports to the latex-bugs address.
---- Copyright 1997,1998,2006,2008,2017 the LaTeX3 project. All rights reserved ---
+--- Copyright 1997,1998,2006,2008,2017,2020 the LaTeX3 project. All rights reserved ---
diff --git a/macros/latex-dev/base/cfgguide.pdf b/macros/latex-dev/base/cfgguide.pdf
index f5a3e68425..4c6572d7a3 100644
--- a/macros/latex-dev/base/cfgguide.pdf
+++ b/macros/latex-dev/base/cfgguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/changes.txt b/macros/latex-dev/base/changes.txt
index 96654ea52b..6c37210ae9 100644
--- a/macros/latex-dev/base/changes.txt
+++ b/macros/latex-dev/base/changes.txt
@@ -6,6 +6,141 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2020-05-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Added \IfFontSeriesContextTF so that it is possible to reliably
+ detect the current font series context (gh/335)
+
+2020-05-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltdefns.dtx (subsection{Initex initialisations}):
+ Allow \par in the argument of \typeout and turn it into an empty line
+ if expanded, if not it remains \par (gh/335)
+
+2020-05-11 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltdefns.dtx:
+ Use primitive \- with LuaTeX
+
+2020-05-07 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltxref.dtx:
+ added \@currentcounter to \refstepcounter (gh/300)
+
+2020-05-06 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltspace.dtx:
+ Make Unicode softhyphen U+00AD active and defined as \-.
+
+2020-05-02 Johannes Braams <texniek at braams.xs4all.nl>
+
+ * ltexpl.dtx: Created aliases for two expl3 macros in order to use
+ them to remove leading and trailing spaces from filenames (gh/217)
+
+2020-05-02 Johannes Braams <texniek at braams.xs4all.nl>
+
+ * ltfiles.dtx: Modified \include and \includeony to support
+ filenames with spaces in them (gh/217)
+
+2020-04-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lttextcomp.dtx (subsection{Sub-encoding 2}):
+ Make all captial accents text commands in Unicode engines for
+ hyperref (gh/332)}
+
+2020-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx (subsection{Verbatim}):
+ Drop spaces before \verb delimiter (gh/327)
+
+2020-04-22 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltoutenc.dtx (tuenc.def):
+ corrected unicode value of \=y from "0232 to "0233
+
+2020-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (subsection{The code}):
+ Support calc syntax for \newline (gh/152)
+ Support calc syntax for \addvspace (gh/152)
+
+ * lttab.dtx (subsection{tabbing}):
+ Support calc syntax in tabbing (gh/152)
+
+ * ltpictur.dtx (section{Picture Mode}):
+ Support calc syntax in \shortstack (gh/152)
+
+ * ltmiscen.dtx (subsection{Center, Flushright, Flushleft}):
+ Support calc syntax for \\ (gh/152)
+
+ * ltmath.dtx (subsection{Math Environments}):
+ Support calc syntax for \\ (gh/152)
+
+2020-04-21 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (subsection{Horizontal space (and breaks)}):
+ Support calc syntax with \hspace (gh/152)
+ (subsection{Vertical spacing}):
+ Support calc syntax with \vspace (gh/152)
+
+2020-04-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (subsection{Miscellaneous}):
+ Handling \seriesdefault changes in a better way (gh/315).
+
+2020-04-09 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfloat.dtx (subsection{Footnotes}):
+ Set non-zero baselineskip inside \textsuperscript and \textsubscript
+ so that link boxes drawn by hyperref have a sensible height (gh/249)
+
+2020-04-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltclass.dtx (section{Implementation}):
+ Add \IfFormatAtLeastTF to test if the current format is equal or later than
+ the given date (gh/168)
+ Also add \IfClassAtLeastTF and \IfPackageAtLeastTF as a suggested
+ alternative to \@ifpackagelater and \@ifclasslater (which have a wrong
+ name, because it is really "later or equal") (gh/186)
+ Use different method to ignore unprocessed options (gh/22)
+
+
+2020-04-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Added hooks \@expandfontdefaultshook, \@setbfseriesdefaultshook and
+ \@setmdseriesdefaultshook to better support Japanese etc (gh/306)
+
+2020-03-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * fontdef.dtx (subsection{Defaults}):
+ Support legacy use of \bfdefault and \mddefault (gh/306)
+
+ * ltfssini.dtx (section{Custom series settings for main document families}):
+ Support legacy use of \bfdefault and \mddefault (gh/306)
+
+ * ltfssdcl.dtx (section{Interface Commands}):
+ Avoid generating an Ord math atom when loading a math alphabet using
+ the legacy interface ${\cal ...}$ (gnats/3357)
+
+2020-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx: Moved \cs{thinspace}, \cs{negthinspace} and \cs{,} to
+ ltmath.dtx (gh/303)
+
+ * ltmath.dtx (subsubsection{The UNSORTED Rest}):
+ Add \texttt{amsmath} math/text spacing commands to the kernel (gh/303)
+
+2020-03-08 Johannes Braams <texniek at braams.xs4all.nl>
+
+ * letter.dtx: merged changes to classes.dtx into letter.dtx
+
+2020-03-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltboxes.dtx (subsection{Some low-level constructs}):
+ Macro \clap added (from mathtools)
+
2020-03-05 Joseph Wright <joseph.wright@morningstar2.co.uk>
* ltexpl.dtx: Pre-load xparse where expl3 does not define \NewDocumentCommand
@@ -130,6 +265,11 @@ All changes above are only part of the development branch for the next release.
Use \@tabacckludge for tabbing where necessary if defining \capitalacute
and friends for Unicode engines (gh/271)
+2020-03-07 Marcel Krüger <Marcel.Krueger@latex-project.org>
+
+ * ltluatex.dtx: Fix remove_from_callback for mlist_to_hlist
+ and other engine callbacks hidden by user-defined ones
+
#########################
# 2020-02-02 PL 1 Release
#########################
@@ -10299,62 +10439,62 @@ All changes above are only part of the development branch for the next release.
1994-03-16 David Carlisle <latex-bugs@latex-project.org>
- * ltfiles.dtx v1.0c \document (DPC) directly add file list
+ * ltfiles.dtx: v1.0c \document (DPC) directly add file list
settings
- * ltclass.dtx 0.3f \listfiles Move this code directly into
+ * ltclass.dtx: 0.3f \listfiles Move this code directly into
\document
- * ltclass.dtx 0.3f "General" Add pkgindoc package
+ * ltclass.dtx: 0.3f "General" Add pkgindoc package
1994-03-15 David Carlisle <latex-bugs@latex-project.org>
- * ltdirchk.dtx 1.0c "General" Add \NeedsTeXFormat
+ * ltdirchk.dtx: 1.0c "General" Add \NeedsTeXFormat
- * ltclass.dtx 0.3e \@missingfileerror Quit on x or X just like
+ * ltclass.dtx: 0.3e \@missingfileerror Quit on x or X just like
a real error
- * fontcmds.dtx v3.2a "General" Removed defs of short-forms and
+ * fontcmds.dtx: v3.2a "General" Removed defs of short-forms and
all sizes except \normalize
- * fontcmds.dtx v3.2a "General" Removed \@renewfontswitch
+ * fontcmds.dtx: v3.2a "General" Removed \@renewfontswitch
- * fontcmds.dtx v3.2a "General" Changed \/ to \@@italiccorr
+ * fontcmds.dtx: v3.2a "General" Changed \/ to \@@italiccorr
- * fontcmds.dtx v3.2a "General" Adapted to mass formatting
+ * fontcmds.dtx: v3.2a "General" Adapted to mass formatting
1994-03-15 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
- * varioref.dtx (subsection{Options}):
+ * varioref.dtx: (subsection{Options}):
Text added for spanish default (Julio Sanchez).
Changed all \extra... to \extras... that was a bug
1994-03-14 David Carlisle <latex-bugs@latex-project.org>
- * ltherest.dtx v1.0c \end@float (DPC) Use \color@endgroup
+ * ltherest.dtx: v1.0c \end@float (DPC) Use \color@endgroup
- * ltherest.dtx v1.0c \@xfloat (DPC) Use \color@begingroup
+ * ltherest.dtx: v1.0c \@xfloat (DPC) Use \color@begingroup
- * ltherest.dtx v1.0c \@savemarbox (DPC) Use \color@begingroup
+ * ltherest.dtx: v1.0c \@savemarbox (DPC) Use \color@begingroup
- * ltherest.dtx v1.0c \@footnotetext (DPC) Use
+ * ltherest.dtx: v1.0c \@footnotetext (DPC) Use
\color@begingroup, add \endgraf
- * ltherest.dtx 1.0c \@xympar (DPC) Use \color@begingroup
+ * ltherest.dtx: 1.0c \@xympar (DPC) Use \color@begingroup
- * ltboxes.dtx 1.0b \sbox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \sbox Use \color@begingroup
- * ltboxes.dtx 1.0b \lrbox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \lrbox Use \color@begingroup
- * ltboxes.dtx 1.0b \color@endgroup macro added for colour
+ * ltboxes.dtx: 1.0b \color@endgroup macro added for colour
support
- * ltboxes.dtx 1.0b \color@begingroup macro added for colour
+ * ltboxes.dtx: 1.0b \color@begingroup macro added for colour
support
- * ltboxes.dtx 1.0b \@isavepicbox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \@isavepicbox Use \color@begingroup
- * ltboxes.dtx 1.0b \@isavebox Use \color@begingroup
+ * ltboxes.dtx: 1.0b \@isavebox Use \color@begingroup
1994-03-14 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10364,21 +10504,21 @@ All changes above are only part of the development branch for the next release.
1994-03-14 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
- * classes.dtx (subsubsection{Margins}):
+ * classes.dtx: (subsubsection{Margins}):
Shortened calculation for margins.
1994-03-13 David Carlisle <latex-bugs@latex-project.org>
- * ltinit.dtx v1.0c \@tfor (DPC) Add \@tf@r so a single group is
+ * ltinit.dtx: v1.0c \@tfor (DPC) Add \@tf@r so a single group is
correctly treated.
- * ltfiles.dtx 0.3b \InputIfFileExists Use new cmd
+ * ltfiles.dtx: 0.3b \InputIfFileExists Use new cmd
\@addtofilelist
- * ltclass.dtx 0.3d \listfiles Reset \@addtofilelist at begin
+ * ltclass.dtx: 0.3d \listfiles Reset \@addtofilelist at begin
document
- * ltclass.dtx 0.3d \@addtofilelist Macro added
+ * ltclass.dtx: 0.3d \@addtofilelist Macro added
1994-03-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10426,32 +10566,32 @@ All changes above are only part of the development branch for the next release.
1994-03-12 David Carlisle <latex-bugs@latex-project.org>
- * ltplain.dtx v1.0b "General" Name changed from lplain. The end
+ * ltplain.dtx: v1.0b "General" Name changed from lplain. The end
of an era
- * ltinit.dtx v1.0b \@yargdef Name changed from \XXX@Argdef
+ * ltinit.dtx: v1.0b \@yargdef Name changed from \XXX@Argdef
- * ltinit.dtx v1.0b \@reargdef New defn, in terms of \@yargdef
+ * ltinit.dtx: v1.0b \@reargdef New defn, in terms of \@yargdef
- * ltherest.dtx v0.1b \@xympar (DPC) Extra bgroup for colour
+ * ltherest.dtx: v0.1b \@xympar (DPC) Extra bgroup for colour
- * ltherest.dtx v0.1b \@savemarbox (DPC) Extra group for colour
+ * ltherest.dtx: v0.1b \@savemarbox (DPC) Extra group for colour
- * ltdirchk.dtx 1.0b "General" Minor edits to the typeouts in
+ * ltdirchk.dtx: 1.0b "General" Minor edits to the typeouts in
ltxcheck
- * ltdirchk.dtx 1.0b "General" Change name from dircheck.dtx
+ * ltdirchk.dtx: 1.0b "General" Change name from dircheck.dtx
- * ltclass.dtx 0.3c \ProvidesPackage use \@gtempa
+ * ltclass.dtx: 0.3c \ProvidesPackage use \@gtempa
- * ltclass.dtx 0.3c \ProvidesPackage Add \wlog
+ * ltclass.dtx: 0.3c \ProvidesPackage Add \wlog
- * ltclass.dtx 0.3c \ProvidesFile Add \wlog
+ * ltclass.dtx: 0.3c \ProvidesFile Add \wlog
- * ltclass.dtx 0.3c "General" Change name from docclass to
+ * ltclass.dtx: 0.3c "General" Change name from docclass to
ltclass
- * ltclass.dtx 0.3c \@fileswithoptions Do not use
+ * ltclass.dtx: 0.3c \@fileswithoptions Do not use
\@pr@videpackage to avoid typeout
1994-03-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10500,12 +10640,12 @@ All changes above are only part of the development branch for the next release.
1994-03-08 David Carlisle <latex-bugs@latex-project.org>
- * ltplain.dtx v1.0a "General" Remove need for a driver file.
+ * ltplain.dtx: v1.0a "General" Remove need for a driver file.
- * ltdirchk.dtx 1.0a "General" Reorganise driver module into `new
+ * ltdirchk.dtx: 1.0a "General" Reorganise driver module into `new
style'
- * ltclass.dtx 0.3b "General" Modify driver code into `new style'
+ * ltclass.dtx: 0.3b "General" Modify driver code into `new style'
1994-03-08 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10634,60 +10774,60 @@ All changes above are only part of the development branch for the next release.
1994-03-07 David Carlisle <latex-bugs@latex-project.org>
- * lttab.dtx v1.0a "General" Long lines wrapped to 72 columns
+ * lttab.dtx: v1.0a "General" Long lines wrapped to 72 columns
- * ltpictur.dtx v0.1a "General" Long lines wrapped to 72 columns
+ * ltpictur.dtx: v0.1a "General" Long lines wrapped to 72 columns
- * ltpictur.dtx v0.1a "General" Initial version, split from
- latex.dtx
+ * ltpictur.dtx: v0.1a "General" Initial version, split from
+ latex.dtx:
- * ltlists.dtx v1.0a "General" Long lines wrapped to 72 columns
+ * ltlists.dtx: v1.0a "General" Long lines wrapped to 72 columns
- * ltinit.dtx v1.0a "General" (DPC) Removed input of nfsscode.ltx
+ * ltinit.dtx: v1.0a "General" (DPC) Removed input of nfsscode.ltx
- * ltinit.dtx v1.0a \@@italiccorr Macro added
+ * ltinit.dtx: v1.0a \@@italiccorr Macro added
- * ltinit.dtx v0.1a "General" Long lines wrapped to 72 columns
+ * ltinit.dtx: v0.1a "General" Long lines wrapped to 72 columns
- * ltinit.dtx v0.1a "General" Initial version, split from
- latex.dtx
+ * ltinit.dtx: v0.1a "General" Initial version, split from
+ latex.dtx:
- * ltherest.dtx v0.1a \end@float (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \end@float (DPC) Extra group for colour
- * ltherest.dtx v0.1a "General" Long lines wrapped to 72 columns
+ * ltherest.dtx: v0.1a "General" Long lines wrapped to 72 columns
- * ltherest.dtx v0.1a "General" Initial version, split from
- latex.dtx
+ * ltherest.dtx: v0.1a "General" Initial version, split from
+ latex.dtx:
- * ltherest.dtx v0.1a \@xfloat (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \@xfloat (DPC) Extra group for colour
- * ltherest.dtx v0.1a \@settodim (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \@settodim (DPC) Extra group for colour
- * ltherest.dtx v0.1a \@hangfrom (DPC)Extra groups for colour
+ * ltherest.dtx: v0.1a \@hangfrom (DPC)Extra groups for colour
- * ltherest.dtx v0.1a \@footnotetext (DPC) Extra group for colour
+ * ltherest.dtx: v0.1a \@footnotetext (DPC) Extra group for colour
- * ltfinal.dtx v0.1a "General" Remove oldcomments environment
+ * ltfinal.dtx: v0.1a "General" Remove oldcomments environment
- * ltfinal.dtx v0.1a "General" Initial version, split from
+ * ltfinal.dtx: v0.1a "General" Initial version, split from
latex.dtx
- * ltfinal.dtx 0.1a "General" use \InputIfFileExists not
+ * ltfinal.dtx: 0.1a "General" use \InputIfFileExists not
\IfFileExists
- * ltfinal.dtx 0.1a "General" move code here from lhyphen.dtx
+ * ltfinal.dtx: 0.1a "General" move code here from lhyphen.dtx
- * ltfinal.dtx 0.1a "General" Add code from the old dump.dtx
+ * ltfinal.dtx: 0.1a "General" Add code from the old dump.dtx
- * ltfiles.dtx v1.0a "General" Long lines wrapped to 72 columns
+ * ltfiles.dtx: v1.0a "General" Long lines wrapped to 72 columns
- * ltfiles.dtx v1.0a "General" Initial version, split from
+ * ltfiles.dtx: v1.0a "General" Initial version, split from
latex.dtx
- * ltboxes.dtx v1.0a "General" Unify format with other Kernel
+ * ltboxes.dtx: v1.0a "General" Unify format with other Kernel
files
- * ltboxes.dtx v0.1a \@mpfootnotetext (DPC) Extra group for
+ * ltboxes.dtx: v0.1a \@mpfootnotetext (DPC) Extra group for
colour
1994-03-07 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10713,13 +10853,13 @@ All changes above are only part of the development branch for the next release.
1994-03-04 David Carlisle <latex-bugs@latex-project.org>
- * ltvers.dtx v1.0a "General" Initial version, split from
+ * ltvers.dtx: v1.0a "General" Initial version, split from
latex.dtx
- * lttab.dtx v1.0a "General" Initial version, split from
+ * lttab.dtx: v1.0a "General" Initial version, split from
latex.dtx
- * ltlists.dtx v1.0a "General" Initial version, split from
+ * ltlists.dtx: v1.0a "General" Initial version, split from
latex.dtx
1994-03-04 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10730,7 +10870,7 @@ All changes above are only part of the development branch for the next release.
1994-03-03 David Carlisle <latex-bugs@latex-project.org>
- * ltboxes.dtx 0.1f \@irsbox Replaced a missing \else
+ * ltboxes.dtx: 0.1f \@irsbox Replaced a missing \else
1994-03-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10742,11 +10882,11 @@ All changes above are only part of the development branch for the next release.
1994-03-02 David Carlisle <latex-bugs@latex-project.org>
- * ltclass.dtx 0.3a "General" Remove need for driver file
+ * ltclass.dtx: 0.3a "General" Remove need for driver file
- * ltboxes.dtx v0.1e "General" Remove need for drv file
+ * ltboxes.dtx: v0.1e "General" Remove need for drv file
- * ltboxes.dtx v0.1e "General" Add 2ekernel module
+ * ltboxes.dtx: v0.1e "General" Add 2ekernel module
1994-03-02 Rainer Schoepf <latex-bugs@latex-project.org>
@@ -10796,7 +10936,7 @@ All changes above are only part of the development branch for the next release.
option (reads fleqn.clo).
1994-03-01 David Carlisle <latex-bugs@latex-project.org>
- * ltdirchk.dtx 0.2k "General" Add unstripped module, so that
+ * ltdirchk.dtx: 0.2k "General" Add unstripped module, so that
dircheck.dtx may be used with initex
1994-03-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -10889,8 +11029,940 @@ All changes above are only part of the development branch for the next release.
1994-02-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * ltdirchk.dtx: 0.2j "General" \noboundaryis \relax not undef in
+ TeX2 (initialised in 2e format)
+
+ * ltdirchk.dtx: 0.2j "General" Remove need for drv file
+
* fam.dtx (subsection{Macros for loading fonts}):
Removed catcode settings from \try@load@fontshape and
\DeclareFontShape and placed them into a separate macro called
\nfss@catcodes so that it is easier to maintain special
requirements for packages that make certain characters active.
+
+1994-02-10 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2z \@fileswithoptions Renamed \@compatibility to
+ \@documentclasshook. ASAJ.
+
+ * ltclass.dtx: 0.2z \@documentclasshook Changed the name from
+ \@compatibility to \@documentclasshook, and added the check
+ for whether \@normalsize has been defined. ASAJ.
+
+1994-02-07 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2y \ProcessOptions* Add extra ,s so `two' is not
+ matched with `twocolumn'
+
+ * ltclass.dtx: 0.2y \ProcessOptions* Add extra ,s so `two' is not
+ matched with `twocolumn'
+
+ * ltclass.dtx: 0.2y \@ifclasswith Add extra ,s so `two' is not
+ matched with `twocolumn'
+
+ * ltclass.dtx: 0.2y \@fileswithoptions Run \@compatibility on the
+ first class to start (not the first to finish)
+
+1994-02-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e "General" correct mistakes in the
+ documentation
+
+1994-02-02 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2x \@fileswithoptions Only run the hook and
+ options check if the file was loaded.
+
+1994-02-01 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2e \thispagestyle (DPC) Modify to get nicer
+ error message
+
+ * ltherest.dtx: LaTeX2e \pagestyle (DPC) Modify to get nicer
+ error message
+
+1994-01-31 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e "General" use \@normalsize instead of
+ \normalsizeinternally
+
+ * ltfiles.dtx: v0.9t \document set `@normalsize or `normalsize if
+ necessary
+
+ * ltclass.dtx: 0.2w \g@addto@macro Use toks register to avoid
+ `hash' problems
+
+ * fontcmds.dtx: v3.1b "General" `@normalsize no longer defined
+
+1994-01-29 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2v \@fileswithoptions All options raise error if
+ no \ProcessOptions\ appears
+
+ * ltclass.dtx: 0.2v \@@unprocessedoptions Macro added.
+
+1994-01-28 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e "General" Let \fmtversion point to current
+ file date.
+
+1994-01-27 N.N. <latex-bugs@latex-project.org>
+
+ * fontcmds.dtx: v3.1a \nocorrlist Only ., used as default for cm
+ fonts
+
+1994-01-25 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: LaTeX2e \bordermatrix Removed \p@renwd.
+
+ * ltdirchk.dtx: 0.2i "General" Protect against looping on
+ \@@input and \@@end
+
+1994-01-24 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2e \pagestyle (DPC) Complain if pagestyle is
+ undefined.
+
+ * ltdirchk.dtx: 0.2h \IfFileExists Stop testing once texsys.aux
+ has been found
+
+1994-01-21 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9s \verbatim@font Removed unnecessary category
+ code hackery.
+
+ * ltherest.dtx: LaTeX2e \@xfloat Added missing percent
+ characters.
+
+ * ltdirchk.dtx: 0.2g \today Name changeed from \stamp, to save
+ memory
+
+ * ltdirchk.dtx: 0.2g \filename@parse Minor changes, and add Mac
+ version (:)
+
+ * ltdirchk.dtx: 0.2g "General" Improve documentation, reorganise
+ docstrip module
+
+ * ltclass.dtx: 0.2u \documentstyle compatibility file now
+ latex209.def.
+
+1994-01-20 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: 0.2f \IfFileExists \@copytexsys removed
+
+ * ltdirchk.dtx: 0.2f "General" \@copytexsys and the texsys.new
+ file removed
+
+ * ltdirchk.dtx: 0.2f "General" Modify all of ltxcheck
+
+1994-01-19 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: 0.2e \strip@prefix name changed from
+ \strip@meaning, to match NFSS
+
+ * ltdirchk.dtx: 0.2e \input@path No longer check that an empty
+ group is in the path
+
+ * ltdirchk.dtx: 0.2e \IfFileExists name changed from \test
+
+1994-01-18 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9p \@verbatim Only add \penaltyif in hmode
+
+ * ltherest.dtx: LaTeX2e \bibliography Use \@input@ so include
+ files are listed.
+
+ * ltfiles.dtx: v0.9p \include Use \@input@ so include files are
+ listed.
+
+ * ltfiles.dtx: v0.9p \InputIfFileExists New Definition
+
+ * ltfiles.dtx: v0.9p \IfFileExists New Definition
+
+ * ltfiles.dtx: v0.9p \@input@ Macro added
+
+ * ltfiles.dtx: v0.9p \@input do not use a different definition
+ for \input@path
+
+ * ltfiles.dtx: v0.9p \@iffileonpath Macro added
+
+ * ltfiles.dtx: v0.9p \@break@loop Macro added
+
+ * ltclass.dtx: 0.2t \@ifclassloaded Fix typo \@pkgetension
+
+1994-01-17 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2s \listfiles New Version, adds `.tex' if
+ needed, and lines up columns
+
+ * ltclass.dtx: 0.2s "General" Wrapped long lines to column 72
+
+ * ltclass.dtx: 0.2s "General" Added many more \@onlypreamble
+ commands
+
+ * ltclass.dtx: 0.2s \@fileswithoptions Modify to reduce parameter
+ stack usage
+
+ * ltclass.dtx: 0.2s \@fileswithoptions Modify to reduce parameter
+ stack usage
+
+1994-01-15 N.N. <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: v0.9o \document move `@preamblecmds after document
+ hook
+
+1994-01-14 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltdirchk.dtx: 0.2d \IfFileExists Close the texsys.aux output
+ stream
+
+1993-12-20 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \@reargdef Kept old version of \@reargdef,
+ for array.sty
+
+ * ltfiles.dtx: 0.9m \@obsoletefile Added this command, removed
+ @oldfilewarning
+
+1993-12-19 Alan Jeffrey <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \@esphack There seem to be problems with
+ selfmade birthday presents
+
+ * ltclass.dtx: 0.2r \endfilecontents Different message when
+ ignoring a file
+
+ * fontcmds.dtx: v3.0b "General" Untidying added, so this is now a
+ TEMPORARY version.
+
+ * fontcmds.dtx: v3.0b "General" Some more tidying done.
+
+ * fontcmds.dtx: v3.0b "General" Other tidying
+
+ * fontcmds.dtx: v3.0b "General" @pdef comand added
+
+ * fontcmds.dtx: v3.0b \@protecteddef Command added
+
+ * fontcmds.dtx: v3.0b \@newtextcmd Corrected and tidied
+
+ * fontcmds.dtx: v3.0b \@newfontswitch Corrected and tidied
+
+ * fontcmds.dtx: 3.0b "General" Wording changes by CAR.
+
+ * fontcmds.dtx: 3.0b "General" Made \@newfontswitch produce an
+ error if the command already exists, and added
+ \@renewfontswitch. ASAJ.
+
+ * fontcmds.dtx: 3.0b "General" Added by ASAJ.
+
+1993-12-17 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0j \@tracemessage tracefloatvals made a
+ document command
+
+ * ltoutput.dtx: v1.0j \@topnewpage check for vsize too small
+ added
+
+ * ltoutput.dtx: v1.0j \@startpagehook Hook removed
+
+ * ltoutput.dtx: v1.0j \@opcol Hook removed
+
+ * ltoutput.dtx: 1.0j \@topnewpage Page room test added
+
+ * ltoutput.dtx: 1.0j \@specialoutput Page room test added
+
+ * ltoutput.dtx: 1.0j \@addtocurcol Extra space test added
+
+ * ltherest.dtx: LaTeX2e \mark Removed init \mark at begin
+ document, since it doesn't work.
+
+ * ltclass.dtx: 0.2q \documentstyle Match Alan's new code.
+
+ * ltclass.dtx: 0.2q \@fileswithoptions Add \ompatibility hook
+
+ * ltclass.dtx: 0.2q \@documentclasshook Macro added
+
+ * ltmiscen.dtx: v0.9i \literal Macro added
+
+1993-12-16 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \LaTeXe Extended logo by DPC
+
+ * ltinit.dtx: LaTeX2e \@esphack Corrected optimisation :-)
+
+ * ltherest.dtx: LaTeX2e \mark Init \mark at begin document
+
+1993-12-15 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2p "General" Removed extra \.'s from \@@warnings
+
+ * ltboxes.dtx: 0.1d \parbox Changed default from `c' to `s'
+
+ * ltboxes.dtx: 0.1d \minipage extra space removed.
+
+ * ltboxes.dtx: 0.1d \minipage Changed default from `c' to `s'
+
+ * ltboxes.dtx: 0.1d \@iparbox Changed default from `c' to `s'
+
+ * ltboxes.dtx: 0.1d \@iminipage Changed default from `c' to `s'
+
+1993-12-14 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0i "General" Section added to declare all
+ parameters
+
+1993-12-13 David Carlisle <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2e Initialised \@itemlabel
+
+ * ltmiscen.dtx: v0.9h \@verbatim Removed optional argument of
+ \item
+
+ * ltmiscen.dtx: v0.9h \@verbatim Readded \@noligs
+
+ * ltmiscen.dtx: v0.9h \@noligs Readded \@noligs
+
+ * ltdirchk.dtx: 0.2a \strip@prefix modified, name changed from
+ \stripmeaning
+
+ * ltdirchk.dtx: 0.2a \IfFileExists Removed interactive prompting
+ for current directory syntax
+
+ * ltdirchk.dtx: 0.2a "General" on the `docstrip' pass, do not
+ check openin path
+
+ * ltclass.dtx: 0.2o \usepackage Fixed error handling
+
+ * ltclass.dtx: 0.2o \documentstyle compatibility file now
+ latex209.sty.
+
+ * ltclass.dtx: 0.2o "General" Removed setting \errcontextlines\
+ (now in latex.tex)
+
+1993-12-12 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0h \@tracemessage Commands changed
+
+ * ltoutput.dtx: v1.0h \@testfp defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@startdblcolumn defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@startcolumn defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@resethfps Warnings added: minimal
+
+ * ltoutput.dtx: v1.0h \@makecol defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@doclearpage defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@doclearpage defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@doclearpage defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@cflt name changed
+
+ * ltoutput.dtx: v1.0h \@ccflb defs changed to lets
+
+ * ltoutput.dtx: v1.0h \@ccflb boxmaxdepth setting moved
+
+1993-12-11 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9g \ref Macro reimplemented
+
+ * ltmiscen.dtx: v0.9g \pageref Macro reimplemented
+
+ * ltmiscen.dtx: v0.9g \frac Added group around first arg
+
+ * ltmiscen.dtx: v0.9g \@setref Macro added
+
+ * ltherest.dtx: LaTeX2e \@title Added default
+
+ * ltherest.dtx: LaTeX2e \@author Added default
+
+ * fontcmds.dtx: v3.0a \textup Macros changed
+
+ * fontcmds.dtx: v3.0a \sw@slant Macro changed
+
+ * fontcmds.dtx: v3.0a \maybe@ic@ Macro and name changed
+
+ * fontcmds.dtx: v3.0a \maybe@ic Macro name changed
+
+ * fontcmds.dtx: v3.0a \fix@penalty Macro added
+
+ * fontcmds.dtx: v3.0a \emph Macro changed
+
+ * fontcmds.dtx: v3.0a "General" newfontswitch command corrected
+ and changed
+
+ * fontcmds.dtx: v3.0a "General" newcommands replaced by defs
+
+ * fontcmds.dtx: v3.0a "General" italic correction now put in
+ front of penalty before glue
+
+ * fontcmds.dtx: v3.0a "General" Complete reworking of all text
+ commands, using just one creator function
+
+ * fontcmds.dtx: v3.0a \@newtextcmd Macro changed
+
+1993-12-09 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9e \enddocument Hook added
+
+ * ltfiles.dtx: v0.9e \document Hook added
+
+ * ltclass.dtx: 0.2n \documentstyle input 209 compatibility file.
+
+ * ltboxes.dtx: 0.1c \@irsbox fix another typo
+
+1993-12-08 N.N. <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2e \@item use \sboxto support colour
+
+ * ltinit.dtx: LaTeX2e \@vbsphack Command added
+
+ * ltinit.dtx: LaTeX2e \@esphack Command reimplemented
+
+ * ltinit.dtx: LaTeX2e \@bsphack Command reimplemented; late
+ birthday present for Chris
+
+ * ltboxes.dtx: 0.1b \lrbox move \@endpefalse out of the inner
+ group
+
+ * ltboxes.dtx: 0.1b \@irsbox fix typo
+
+ * ltboxes.dtx: 0.1b \@iiiparbox \endgraf added due to extra group
+ in \@begin@tempboxa
+
+ * ltboxes.dtx: 0.1b \@begin@tempboxa Extra braces for color
+ support (braces removed from other macros)
+
+ * fontcmds.dtx: 2.1b "General" Macros \rm, \bf and \sf moved to
+ classes.dtx:
+
+1993-12-07 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2m \@fileswithoptions Reset \CurrentOption
+
+ * ltclass.dtx: 0.2l \ProvidesFile Macro added
+
+1993-12-06 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0g \@topnewpage \@floatplacement placement bug
+ fixed
+
+ * ltoutput.dtx: v1.0f \@specialoutput Unboxing of 255 added to
+ rescue writes
+
+ * ltclass.dtx: 0.2k \ExecuteOptions Preserve \CurrentOption
+
+1993-12-05 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0f \output Command changed
+
+ * ltoutput.dtx: v1.0f @\getfpsbit Command added
+
+ * ltoutput.dtx: v1.0f @\boxfpsbit Command added
+
+ * ltoutput.dtx: v1.0f \@topnewpage Commands changed
+
+ * ltoutput.dtx: v1.0f \@textfloatsheight Commands added
+
+ * ltoutput.dtx: v1.0f \@testfp Command changed
+
+ * ltoutput.dtx: v1.0f \@testfp Command added
+
+ * ltoutput.dtx: v1.0f \@startpagehook Hook added
+
+ * ltoutput.dtx: v1.0f \@startdblcolumn Command changed
+
+ * ltoutput.dtx: v1.0f \@startcolumn Command changed
+
+ * ltoutput.dtx: v1.0f \@shipoutsetup Command added
+
+ * ltoutput.dtx: v1.0f \@setfpsbit Command added
+
+ * ltoutput.dtx: v1.0f \@setfloattypecounts Command added
+
+ * ltoutput.dtx: v1.0f \@resethfps Command added
+
+ * ltoutput.dtx: v1.0f \@outputpage Command changed
+
+ * ltoutput.dtx: v1.0f \@opcol Hook added
+
+ * ltoutput.dtx: v1.0f \@opcol Command changed
+
+ * ltoutput.dtx: v1.0f \@fpsadddefault Command added
+
+ * ltoutput.dtx: v1.0f \@flupdates Command added
+
+ * ltoutput.dtx: v1.0f \@flstop Commands added
+
+ * ltoutput.dtx: v1.0f \@flsettextmin Command added
+
+ * ltoutput.dtx: v1.0f \@flsetnum Command added
+
+ * ltoutput.dtx: v1.0f \@flcheckspace Command added
+
+ * ltoutput.dtx: v1.0f \@addtotoporbot Command changed
+
+ * ltoutput.dtx: v1.0f \@addtonextcol Command changed
+
+ * ltoutput.dtx: v1.0f \@addtodblcol Command changed
+
+ * ltoutput.dtx: v1.0f \@addtocurcol Command changed
+
+ * ltoutput.dtx: v1.0f \@addtobot Command changed
+
+ * ltherest.dtx: LaTeX2e \@xfloat Command changed
+
+ * ltherest.dtx: LaTeX2e \@dblfloatplacement Command changed
+
+1993-12-04 N.N. <latex-bugs@latex-project.org>
+
+ * ltfiles.dtx: v0.9b \input Macro reimplemented
+
+ * ltfiles.dtx: v0.9b \InputIfFileExists Macro added
+
+ * ltfiles.dtx: v0.9b \IfFileExists Macro added
+
+ * ltfiles.dtx: v0.9b \@input Macro reimplemented
+
+ * ltfiles.dtx: v0.9b \@iinput Macro reimplemented
+
+1993-12-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: v0.9b \@latexerr Set \c@errorcontextlines to -1
+
+ * ltclass.dtx: 0.2i "General" \@onlypreamble: Many commands
+ declared.
+
+ * ltclass.dtx: 0.2i "General" Removed obsolete \@documentclass
+
+ * ltclass.dtx: 0.2i \@cls@pkg Name changed to avoid clash with
+ output routine.
+
+ * ltboxes.dtx: 0.1a \set@color macro added
+
+ * ltboxes.dtx: 0.1a \set@color color support
+
+ * ltboxes.dtx: 0.1a \sbox extra group
+
+ * ltboxes.dtx: 0.1a \sbox color support
+
+ * ltboxes.dtx: 0.1a \raisebox redefined to support \height
+
+ * ltboxes.dtx: 0.1a \parbox Redefined to support extra optional
+ arguments
+
+ * ltboxes.dtx: 0.1a \newsavebox Pass the whole of arg 1 to
+ \@ifdefinable
+
+ * ltboxes.dtx: 0.1a \minipage Redefined to support extra optional
+ arguments
+
+ * ltboxes.dtx: 0.1a \mbox extra group
+
+ * ltboxes.dtx: 0.1a \makebox modified
+
+ * ltboxes.dtx: 0.1a \lrbox macro added
+
+ * ltboxes.dtx: 0.1a \lrbox color support
+
+ * ltboxes.dtx: 0.1a \fbox extra group
+
+ * ltboxes.dtx: 0.1a \endlrbox macro added
+
+ * ltboxes.dtx: 0.1a \bm@b macros added
+
+ * ltboxes.dtx: 0.1a \@savebox default c not x
+
+ * ltboxes.dtx: 0.1a \@makepicbox macro modified
+
+ * ltboxes.dtx: 0.1a \@makebox default changed from x to c
+
+ * ltboxes.dtx: 0.1a \@isavepicbox extra group
+
+ * ltboxes.dtx: 0.1a \@isavebox extra group
+
+ * ltboxes.dtx: 0.1a \@isavebox color support
+
+ * ltboxes.dtx: 0.1a \@irsbox redefined to support \height
+
+ * ltboxes.dtx: 0.1a \@imakebox macro modified
+
+ * ltboxes.dtx: 0.1a \@iirsbox redefined to support \height
+
+ * ltboxes.dtx: 0.1a \@end@tempboxa macro added
+
+ * ltboxes.dtx: 0.1a \@begin@tempboxa macro added
+
+ * ltboxes.dtx: 0.1a \@argrsbox macro removed
+
+1993-12-01 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0e \@reinserts Command added
+
+1993-11-30 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v1.0c \@tracemessage Commands added
+
+ * ltmiscen.dtx: LaTeX2e \eqnarray initialised everycr to {}
+
+1993-11-29 N.N. <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: ??? "General" All accents in decimals; suggested
+ by Paul Taylor
+
+ * ltoutput.dtx: v1.0b \@makespecialcolbox Command added
+
+ * ltoutput.dtx: v1.0b \@makecol \@makespecialcolbox added
+
+1993-11-28 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2h \endfilecontents Don't globally allocate a
+ write stream (always use 15)
+
+ * ltclass.dtx: 0.2h "General" Primitive filenames now terminated
+ by space not \relax.
+
+ * ltclass.dtx: 0.2h "General" Directory syntax checing moved to
+ dircheck.dtx:
+
+ * ltclass.dtx: 0.2h "General" Assorted commands now in the kernel
+ removed.
+
+ * ltclass.dtx: 0.2h \@twoclasseserror Macro added
+
+ * ltclass.dtx: 0.2h \@missingfileerror Use filename parser from
+ dircheck
+
+1993-11-24 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \P@LaTeX Macro changed
+
+ * fontcmds.dtx: v2.1a \test@next Macro added
+
+ * fontcmds.dtx: v2.1a \maybe@ic@ Use \test@next
+
+1993-11-23 N.N. <latex-bugs@latex-project.org>
+
+ * ltoutput.dtx: v0.1c \enlargethispage* Commands added
+
+ * ltoutput.dtx: v0.1c \@specialoutput Command changed
+
+ * ltoutput.dtx: v0.1c \@makecol Command changed
+
+ * ltoutput.dtx: v0.1c \@kludgeins Insert added
+
+ * ltoutput.dtx: v0.1c \@enlargepage Command added
+
+ * ltoutput.dtx: v0.1a \paperwidth Register added
+
+ * ltoutput.dtx: v0.1a \paperheight Register added
+
+ * ltinit.dtx: LaTeX2e \two@digits Macro added
+
+ * ltinit.dtx: LaTeX2e \renewenvironment Macro reimplemented and
+ extended
+
+ * ltinit.dtx: LaTeX2e \renewcommand Macro reimplemented and
+ extended
+
+ * ltinit.dtx: LaTeX2e \newcommand Macro reimplemented and
+ extended
+
+ * ltinit.dtx: LaTeX2e "General" replaced plus by \@plus if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e \@yargdef Macro interface changed
+
+ * ltinit.dtx: LaTeX2e \@yargdef Avoid \@?@? token
+
+ * ltinit.dtx: LaTeX2e \@xargdef Macro interface changed
+
+ * ltinit.dtx: LaTeX2e \@xargdef Macro added
+
+ * ltinit.dtx: LaTeX2e \@newenv Macro interface changed
+
+ * ltinit.dtx: LaTeX2e \@newcommand Macro added
+
+ * ltinit.dtx: LaTeX2e \@ifundefined Redefined to remove a
+ trailing \fi
+
+ * ltclass.dtx: 0.2g "General" Warnings and errors now directly
+ coded.
+
+ * ltclass.dtx: 0.2g "General" Various macros now moved to
+ latex.tex.
+
+ * ltclass.dtx: 0.2g \@use@ption Name changed from \@executeoption
+
+1993-11-22 N.N. <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX2e \providecommand Macro added
+
+ * ltinit.dtx: LaTeX2e \c@errorcontextlines Macro added
+
+ * ltinit.dtx: LaTeX2e \LaTeXe Macro added
+
+ * ltinit.dtx: LaTeX2e \@plus Macro added
+
+ * ltinit.dtx: LaTeX2e \@minus Macro added
+
+ * ltinit.dtx: LaTeX2e \@checkcommand Macro added
+
+ * ltherest.dtx: LaTeX2e \settoheight Macro added
+
+ * ltherest.dtx: LaTeX2e \settodepth Macro added
+
+ * ltherest.dtx: LaTeX2e \@settopoint Macro added
+
+ * ltherest.dtx: LaTeX2e \@settodim Macro added
+
+ * ltclass.dtx: 0.2f \listfiles Removed checking for
+ \@unknownversion
+
+ * ltclass.dtx: 0.2f \@unknownversion Macro removed
+
+ * ltclass.dtx: 0.2f \@ifclasslater Added //00 so parsing never
+ produces a runaway argument.
+
+ * ltclass.dtx: 0.2f \@fileswithoptions Made the initial version
+ [] not [\@unknownversion]
+
+ * ltclass.dtx: 0.2f \@fileswithoptions Made the default [] not
+ [\@unknownversion]
+
+1993-11-21 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9a \verbatim@font Macro added
+
+ * ltmiscen.dtx: v0.9a \verb use \verbatim@font instead of \tt
+
+1993-11-21 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: v0.9a \@verbatim use \verbatim@font instead of
+ \tt
+
+ * ltinit.dtx: LaTeX2e "General" replaced \tt by \ttfamily if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \sf by \sffamily if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \sc by \scshape if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \rm by \rmfamily if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \it by \itshape if
+ appropriate
+
+ * ltinit.dtx: LaTeX2e "General" replaced \bf by \bfseries if
+ appropriate
+
+ * ltclass.dtx: 0.2e \@missingfileerror Stop infinite looping on
+ \@er@ext
+
+1993-11-18 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2d \documentstyle Modified \RequirePackage stuff.
+
+ * ltclass.dtx: 0.2d \NeedsTeXFormat \fmtname \fmtversion not
+ \@\pldots
+
+ * ltclass.dtx: 0.2d \ExecuteOptions Use \CurrentOption not \@tempa
+
+1993-11-17 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2c \ProcessOptions* restoring \@fileswith@pti@ns
+ added.
+
+ * ltclass.dtx: 0.2c \NeedsTeXFormat Name changed from
+ \NeedsFormat
+
+ * ltclass.dtx: 0.2c \DeclareOption* Error checking added
+
+ * ltclass.dtx: 0.2c \CurrentOption Name changed from \@curroption
+
+ * ltclass.dtx: 0.2c \@twoloadclasserror Macro added
+
+ * ltclass.dtx: 0.2c \@fileswithoptions Added trap for two
+ \LoadClass commands.
+
+ * ltclass.dtx: 0.2c \@badrequireerror Macro added
+
+ * ltclass.dtx: 0.2c \@@fileswith@pti@ns Macro added
+
+1993-11-15 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2b \documentstyle Modified to match
+ \ProcessOption*
+
+ * ltclass.dtx: 0.2b \ProcessOptions* Star form added.
+
+1993-11-14 N.N. <latex-bugs@latex-project.org>
+
+ * ltclass.dtx: 0.2a \g@addto@macro Made global
+
+ * ltclass.dtx: 0.2a \documentstyle Added \RequirePackage
+ \@unusedoptionlist stuff.
+
+ * ltclass.dtx: 0.2a \ProcessOptions* Stop adding the global
+ option list inside class files.
+
+ * ltclass.dtx: 0.2a \ProcessOptions* Optimise `empty option'
+ code.
+
+ * ltclass.dtx: 0.2a \NeedsTeXFormat made more robust for
+ alternative syntax for other formats.
+
+ * ltclass.dtx: 0.2a \AtEndDocument Included extension in the
+ generated macro name for package and class hooks.
+
+ * ltclass.dtx: 0.2a \@reset@ptions macro added
+
+ * ltclass.dtx: 0.2a \@fileswithoptions Moved reseting of
+ \default@ds, \ds@ and \@declaredoptions here, from the end of
+ \ProcessOptions.
+
+ * ltclass.dtx: 0.2a \@currext Name changed from \@currextension
+
+1993-11-03 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltpictur.dtx: LaTeX2.09 "General" (RmS) changed \halign to
+ \ialignto initialize \tabskip and \everycr
+
+1993-09-08 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \enddocument Added warning in case of
+ undefined references.
+
+1993-09-07 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 Changed definition of \verb so that
+ it detects a missing second delimiter.
+
+1993-09-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \verbatim@nolig@list Replaced \@noligs
+ by extensible list
+
+1993-08-05 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@sect (RmS) Made sure that
+ \protectworks correctly in expansion of \the<counter>
+
+1993-08-03 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \enddocument Changed redefinition of
+ \global to redefinition of \@setckpt.
+
+1993-05-05 N.N. <latex-bugs@latex-project.org>
+
+ * fontcmds.dtx: v2.0b "General" Removed all LaTeX related cmds
+
+1992-11-26 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \footnote (RmS) Changed all to
+ \def\protect{\noexpand\protect\noexpand}
+
+ * ltherest.dtx: LaTeX2.09 \@footnotetext (RmS) added protection
+ for \edef
+
+ * ltboxes.dtx: LaTeX2.09 \@mpfootnotetext (RmS) added protection
+ for \edef
+
+1992-08-25 Frank Mittelbach <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@sect (FMi) replaced explicit setting
+ of \@svsec by call to \@seccntformat
+
+1992-08-24 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \verb Changed \verband \@sverb to work
+ correctly in math mode
+
+ * ltinit.dtx: LaTeX2.09 \@ifnextchar Changed so first argument
+ can be `='.
+
+1992-08-19 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@othm (RmS) Changed error message to
+ complain about undefined counter
+
+1992-03-18 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \end@float (RmS) changed \@esphack to
+ \@Esphack
+
+ * ltherest.dtx: LaTeX2.09 \@xympar (RmS) added
+ \global\@ignorefalse
+
+1992-01-10 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@othm (RmS) Check for existence of
+ theorem environment
+
+1991-11-22 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2.09 \@item (RmS) Changed second call to
+ \makelabelto \unhbox\@tempboxa. Avoids problems with side
+ effects in \makelabeland is more efficient.
+
+ * ltherest.dtx: LaTeX2.09 \footnote (RmS) Added
+ \let\protect\noexpandin \@xfootnote, \@xfootnotemark, and
+ \@xfootnotetext
+
+1991-11-06 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \end@float (RmS) added warning message
+ perhaps we should use an error message
+
+1991-11-04 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltlists.dtx: LaTeX2.09 \makelabel (RmS) added default
+ definition for \makelabel, to produce an error message.
+
+1991-11-01 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \footnote (RmS) Added
+ \let\protect\noexpandin \footnote, \footnotemark, and
+ \footnotetext, since \xdef is used
+
+1991-10-17 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltinit.dtx: LaTeX209 \@tfor (Rms) \xdef replaced by \def (See
+ FMi's array.doc)
+
+1991-09-29 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltherest.dtx: LaTeX2.09 \@footnotetext (RmS) added \reset@font
+
+ * ltherest.dtx: LaTeX2.09 \@dottedtocline (RmS) added
+ \reset@font for page number
+
+ * ltboxes.dtx: LaTeX2.09 \@mpfootnotetext (RmS) added
+ \reset@font
+
+1991-08-26 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \@verbatim \@@par added
+
+1991-08-14 Rainer Schoepf <latex-bugs@latex-project.org>
+
+ * ltplain.dtx: LaTeX2.09 \cases (RmS) inserted extra braces
+ around entry for NFSS
+
+ * ltpictur.dtx: LaTeX2.09 "General" (RmS) inserted extra braces
+ around entry for NFSS
+
+ * ltherest.dtx: LaTeX2.09 \@endtheorem Moved \itshapeafter \item
+ to make it work with NFSS
+
+1991-07-24 N.N. <latex-bugs@latex-project.org>
+
+ * ltmiscen.dtx: LaTeX2.09 \@verbatim Added
+ \penalty\interlinepenalty to definition of \par so that
+ \samepage works
diff --git a/macros/latex-dev/base/classes.dtx b/macros/latex-dev/base/classes.dtx
index ea3b014c89..d6f2bb64e6 100644
--- a/macros/latex-dev/base/classes.dtx
+++ b/macros/latex-dev/base/classes.dtx
@@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{classes.drv}
%</driver>
- [2019/12/20 v1.4l
+ [2020/04/10 v1.4m
%<article|report|book> Standard LaTeX document class]
%<10pt|11pt|12pt> Standard LaTeX file (size option)]
% \end{macrocode}
@@ -214,6 +214,7 @@
% options that are new in \LaTeXe.}
% \changes{v1.3v}{1997/06/16}{Documentation fixes.}
% \changes{v1.4j}{2019/08/27}{Various commands made robust}
+% \changes{v1.4m}{2020/04/10}{(JLB) prettyprinting the code}
%
%
% \title{Standard Document Classes for \LaTeX{} version 2e\thanks{This
@@ -221,7 +222,7 @@
%
% \author{%
% Copyright (C) 1992 by Leslie Lamport \and
-% Copyright (C) 1994-2019 by Frank Mittelbach \and Johannes Braams \and
+% Copyright (C) 1994-2020 by Frank Mittelbach \and Johannes Braams \and
% \LaTeX3 Project Team
% }
% \date{\filedate}
@@ -322,34 +323,34 @@
% \changes{v1.0g}{1993/12/09}{Removed typo, A4 is not 279 mm high}
% \begin{macrocode}
\if@compatibility\else
-\DeclareOption{a4paper}
- {\setlength\paperheight {297mm}%
- \setlength\paperwidth {210mm}}
-\DeclareOption{a5paper}
- {\setlength\paperheight {210mm}%
- \setlength\paperwidth {148mm}}
-\DeclareOption{b5paper}
- {\setlength\paperheight {250mm}%
- \setlength\paperwidth {176mm}}
-\DeclareOption{letterpaper}
- {\setlength\paperheight {11in}%
- \setlength\paperwidth {8.5in}}
-\DeclareOption{legalpaper}
- {\setlength\paperheight {14in}%
- \setlength\paperwidth {8.5in}}
-\DeclareOption{executivepaper}
- {\setlength\paperheight {10.5in}%
- \setlength\paperwidth {7.25in}}
+ \DeclareOption{a4paper}
+ {\setlength\paperheight {297mm}%
+ \setlength\paperwidth {210mm}}
+ \DeclareOption{a5paper}
+ {\setlength\paperheight {210mm}%
+ \setlength\paperwidth {148mm}}
+ \DeclareOption{b5paper}
+ {\setlength\paperheight {250mm}%
+ \setlength\paperwidth {176mm}}
+ \DeclareOption{letterpaper}
+ {\setlength\paperheight {11in}%
+ \setlength\paperwidth {8.5in}}
+ \DeclareOption{legalpaper}
+ {\setlength\paperheight {14in}%
+ \setlength\paperwidth {8.5in}}
+ \DeclareOption{executivepaper}
+ {\setlength\paperheight {10.5in}%
+ \setlength\paperwidth {7.25in}}
% \end{macrocode}
%
% The option \Lopt{landscape} switches the values of |\paperheight|
% and |\paperwidth|, assuming the dimensions were given for portrait
% paper.
% \begin{macrocode}
-\DeclareOption{landscape}
- {\setlength\@tempdima {\paperheight}%
- \setlength\paperheight {\paperwidth}%
- \setlength\paperwidth {\@tempdima}}
+ \DeclareOption{landscape}
+ {\setlength\@tempdima {\paperheight}%
+ \setlength\paperheight {\paperwidth}%
+ \setlength\paperwidth {\@tempdima}}
\fi
% \end{macrocode}
%
@@ -368,7 +369,7 @@
\if@compatibility
\renewcommand\@ptsize{0}
\else
-\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+ \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
\fi
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
@@ -382,7 +383,7 @@
% paragraphs into the outside margin.
% \begin{macrocode}
\if@compatibility\else
-\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+ \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\fi
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
% \end{macrocode}
@@ -395,7 +396,7 @@
% \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\if@compatibility\else
-\DeclareOption{final}{\setlength\overfullrule{0pt}}
+ \DeclareOption{final}{\setlength\overfullrule{0pt}}
\fi
% \end{macrocode}
%
@@ -405,7 +406,7 @@
% \begin{macrocode}
\DeclareOption{titlepage}{\@titlepagetrue}
\if@compatibility\else
-\DeclareOption{notitlepage}{\@titlepagefalse}
+ \DeclareOption{notitlepage}{\@titlepagefalse}
\fi
% \end{macrocode}
%
@@ -427,7 +428,7 @@
% Two-column and one-column printing is again realized via a switch.
% \begin{macrocode}
\if@compatibility\else
-\DeclareOption{onecolumn}{\@twocolumnfalse}
+ \DeclareOption{onecolumn}{\@twocolumnfalse}
\fi
\DeclareOption{twocolumn}{\@twocolumntrue}
% \end{macrocode}
@@ -468,7 +469,7 @@
% First some hook into the bibliography environment is filled.
% \begin{macrocode}
\AtEndOfPackage{%
- \renewcommand\@openbib@code{%
+ \renewcommand\@openbib@code{%
\advance\leftmargin\bibindent
\itemindent -\bibindent
\listparindent \itemindent
@@ -477,7 +478,7 @@
% \end{macrocode}
% In addition the definition of |\newblock| is overwritten.
% \begin{macrocode}
- \renewcommand\newblock{\par}}%
+ \renewcommand\newblock{\par}}%
}
% \end{macrocode}
%
@@ -950,7 +951,7 @@
% |\topskip|.
% \begin{macrocode}
\if@compatibility \setlength\maxdepth{4\p@} \else
-\setlength\maxdepth{.5\topskip} \fi
+ \setlength\maxdepth{.5\topskip} \fi
% \end{macrocode}
% \end{macro}
%
@@ -1106,7 +1107,7 @@
% between two marginal notes is controlled by |\marginparpush|.
% \begin{macrocode}
\if@twocolumn
- \setlength\marginparsep {10\p@}
+ \setlength\marginparsep {10\p@}
\else
%<10pt&!bk> \setlength\marginparsep{11\p@}
%<11pt&!bk> \setlength\marginparsep{10\p@}
@@ -1801,7 +1802,7 @@
% \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in
% title, etc}
% \begin{macrocode}
- \if@titlepage
+\if@titlepage
\newcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
@@ -1867,7 +1868,7 @@
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
-}
+ }
% \end{macrocode}
% When the title is not on a page of its own, the layout of the
% title is a little different. We use symbols to mark the footnotes
@@ -1884,12 +1885,12 @@
% \cs{@makefntext} to a) work and b) without using math}
% \begin{macrocode}
\else
-\newcommand\maketitle{\par
- \begingroup
- \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
- \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
- \long\def\@makefntext##1{\parindent 1em\noindent
- \hb@xt@1.8em{%
+ \newcommand\maketitle{\par
+ \begingroup
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hb@xt@1.8em{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
% \end{macrocode}
% If this is a twocolumn document we start a new page in twocolumn
@@ -1899,27 +1900,27 @@
% \changes{v1.2k}{1994/05/06}{Added check on number of columns in use
% locally}
% \begin{macrocode}
- \if@twocolumn
- \ifnum \col@number=\@ne
- \@maketitle
+ \if@twocolumn
+ \ifnum \col@number=\@ne
+ \@maketitle
+ \else
+ \twocolumn[\@maketitle]%
+ \fi
\else
- \twocolumn[\@maketitle]%
- \fi
- \else
% \end{macrocode}
% When this is not a twocolumn document we just start a new page,
% prevent floating objects from appearing on the top of this page
% and print the title information.
% \begin{macrocode}
\newpage
- \global\@topnum\z@ % Prevents figures from going at top of page.
- \@maketitle
- \fi
+ \global\@topnum\z@ % Prevents figures from going at top of page.
+ \@maketitle
+ \fi
% \end{macrocode}
% This page gets a \pstyle{plain} layout. We call |\@thanks| to
% produce the footnotes.
% \begin{macrocode}
- \thispagestyle{plain}\@thanks
+ \thispagestyle{plain}\@thanks
% \end{macrocode}
% Now we can close the group, reset the \Lcount{footnote} counter,
% disable |\thanks|, |\maketitle| and |\@maketitle| and save some
@@ -1928,20 +1929,20 @@
% \changes{v1.3k}{1995/08/27}{Disable \cs{title} and similar decls}
% \changes{v1.3n}{1995/10/29}{Empty \cs{@date} as well}
% \begin{macrocode}
- \endgroup
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@author\@empty
- \global\let\@date\@empty
- \global\let\@title\@empty
- \global\let\title\relax
- \global\let\author\relax
- \global\let\date\relax
- \global\let\and\relax
-}
+ \endgroup
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+ }
% \end{macrocode}
% \end{macro}
%
@@ -3144,7 +3145,7 @@
% First we do give the definition for compatibility mode.
% \begin{macrocode}
\if@compatibility
-\newenvironment{titlepage}
+ \newenvironment{titlepage}
{%
%<book> \cleardoublepage
\if@twocolumn
@@ -3162,7 +3163,7 @@
% And here is the one for native \LaTeXe{}.
% \begin{macrocode}
\else
-\newenvironment{titlepage}
+ \newenvironment{titlepage}
{%
%<book> \cleardoublepage
\if@twocolumn
diff --git a/macros/latex-dev/base/classes.pdf b/macros/latex-dev/base/classes.pdf
index f72dae4514..1c33a811b0 100644
--- a/macros/latex-dev/base/classes.pdf
+++ b/macros/latex-dev/base/classes.pdf
Binary files differ
diff --git a/macros/latex-dev/base/clsguide.pdf b/macros/latex-dev/base/clsguide.pdf
index b0459b419b..ef43b41db0 100644
--- a/macros/latex-dev/base/clsguide.pdf
+++ b/macros/latex-dev/base/clsguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/cmfonts.pdf b/macros/latex-dev/base/cmfonts.pdf
index b942338d53..cd291a5f9a 100644
--- a/macros/latex-dev/base/cmfonts.pdf
+++ b/macros/latex-dev/base/cmfonts.pdf
Binary files differ
diff --git a/macros/latex-dev/base/cyrguide.pdf b/macros/latex-dev/base/cyrguide.pdf
index a2f9f702ce..2bbc7d8f18 100644
--- a/macros/latex-dev/base/cyrguide.pdf
+++ b/macros/latex-dev/base/cyrguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/doc.pdf b/macros/latex-dev/base/doc.pdf
index 88da0aa984..f4f1b1fa76 100644
--- a/macros/latex-dev/base/doc.pdf
+++ b/macros/latex-dev/base/doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/docstrip.dtx b/macros/latex-dev/base/docstrip.dtx
index 9cc7945d60..3ce6ed5696 100644
--- a/macros/latex-dev/base/docstrip.dtx
+++ b/macros/latex-dev/base/docstrip.dtx
@@ -29,8 +29,8 @@
\catcode`\{=1
\catcode`\}=2
\def\filename{docstrip.dtx}
-\def\fileversion{2.5g}
-\def\filedate{2018/05/03}
+\def\fileversion{v2.5h}
+\def\filedate{2020/04/18}
\def\docdate {2018/05/03}
%%
%
@@ -1635,6 +1635,16 @@ Z
\x
% \end{macrocode}
%
+% \begin{macro}{\quote@name}
+% \changes{v2.5h}{2020/04/18}{Macro added gfh/221)}
+% A macro copied from \texttt{ltfiles.dtx} in order to be able to
+% allow spaces in filenames.
+% \begin{macrocode}
+\def\quote@name#1{"\quote@@name#1\@gobble""}
+\def\quote@@name#1"{#1\quote@@name}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\StreamOpen}\begin{macro}{\StreamPut}
% \begin{macro}{\StreamClose}
% Here is stream opening operator. Its parameter should be a macro
@@ -1642,6 +1652,10 @@ Z
% write to file |foo.tex| use |\StreamOpen\foo|, then
% |\StreamPut\foo| and |\StreamClose\foo|.
%
+% \changes{v2.5h}{2020/04/18}{Allow spaces in filenames by enclosing
+% them in quotes (gh/221)}
+% \changes{v2.5h}{2020/04/18}{Added two times two \cs{expandafters} to
+% make the case with a filename in quotes work as well}
% \begin{macrocode}
\chardef\stream@closed=16
\def\StreamOpen#1{%
@@ -1649,7 +1663,10 @@ Z
\def\s@do##1{\ifnum##1=0
\chardef#1=\expandafter\@stripstr\string##1 %
\global\chardef##1=1 %
- \immediate\openout#1=\csname pth@\@stripstring#1\endcsname %
+ \edef\q@curr@file{%
+ \expandafter\expandafter\expandafter\quote@name
+ \expandafter\expandafter\expandafter{\csname pth@\@stripstring#1\endcsname}}
+ \immediate\openout#1=\q@curr@file\relax
\@streamfound
\fi}
\@outputstreams
diff --git a/macros/latex-dev/base/docstrip.pdf b/macros/latex-dev/base/docstrip.pdf
index dc31dee8fa..3f74e31d4e 100644
--- a/macros/latex-dev/base/docstrip.pdf
+++ b/macros/latex-dev/base/docstrip.pdf
Binary files differ
diff --git a/macros/latex-dev/base/encguide.pdf b/macros/latex-dev/base/encguide.pdf
index 64ceff2a9a..d651b88475 100644
--- a/macros/latex-dev/base/encguide.pdf
+++ b/macros/latex-dev/base/encguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/exscale.pdf b/macros/latex-dev/base/exscale.pdf
index 2912bad8fd..65bc658e9e 100644
--- a/macros/latex-dev/base/exscale.pdf
+++ b/macros/latex-dev/base/exscale.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fix-cm.pdf b/macros/latex-dev/base/fix-cm.pdf
index 856c5c0ec2..2cd2d911b8 100644
--- a/macros/latex-dev/base/fix-cm.pdf
+++ b/macros/latex-dev/base/fix-cm.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fntguide.pdf b/macros/latex-dev/base/fntguide.pdf
index 46a96dcb9a..2b2017d501 100644
--- a/macros/latex-dev/base/fntguide.pdf
+++ b/macros/latex-dev/base/fntguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fontdef.dtx b/macros/latex-dev/base/fontdef.dtx
index c5623c5566..936db0d7a2 100644
--- a/macros/latex-dev/base/fontdef.dtx
+++ b/macros/latex-dev/base/fontdef.dtx
@@ -39,7 +39,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
-%<-latexrelease> [2020/02/11 v3.0g LaTeX Kernel
+%<-latexrelease> [2020/04/24 v3.0h LaTeX Kernel
% \iftrue (\else
%<text, >(Text
%<math, >(Math
@@ -489,8 +489,8 @@
% Series changing commands are influenced by the following hooks.
% \changes{v3.0e}{2019/12/17}{Set \cs{bfdefault} to ``b''}
% \begin{macrocode}
-\newcommand\bfdefault{b} % overwritten below
-\newcommand\mddefault{m}
+\newcommand\bfdefault{b} % overwritten below (for rollback)
+\newcommand\mddefault{m} % overwritten below (for rollback)
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -506,7 +506,7 @@
\newcommand\itdefault{it}
\newcommand\sldefault{sl}
\newcommand\scdefault{sc}
-\newcommand\updefault{up} % overwritten below
+\newcommand\updefault{up} % overwritten below (for rollback)
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -519,8 +519,21 @@
%<*text|latexrelease>
%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {\updefault}{font defaults change}%
+% \begin{macrocode}
\renewcommand\updefault{up}
-\renewcommand\bfdefault{b}
+% \end{macrocode}
+% We append \cs{@empty} to the series value so that we can detect
+% if it got changed via \cs{def} or \cs{renewcommand} later.
+% \changes{v3.0h}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \begin{macrocode}
+\renewcommand\bfdefault{b\@empty}
+\renewcommand\mddefault{m\@empty}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\bfdefault@previous\bfdefault
+\let\mddefault@previous\mddefault
%</text|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
@@ -528,6 +541,9 @@
%<latexrelease>
%<latexrelease>\renewcommand\updefault{n}
%<latexrelease>\renewcommand\bfdefault{bx}
+%<latexrelease>
+%<latexrelease>\let\bfdefault@previous\undefined
+%<latexrelease>\let\mddefault@previous\undefined
%<latexrelease>\EndIncludeInRelease
%<*text>
% \end{macrocode}
@@ -549,8 +565,8 @@
% which resolved to \texttt{n}, but these days that is no longer
% the case (and \texttt{up} is wrong when you want to do a
% reset. So we now use \texttt{n} explicitly.
-% \begin{macrocode}
% \changes{v3.0e}{2019/12/17}{Set \cs{shapedefault} explicitly to ``n''}
+% \begin{macrocode}
\newcommand\shapedefault{n}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex-dev/base/graphpap.pdf b/macros/latex-dev/base/graphpap.pdf
index 8c59ea2651..6445993704 100644
--- a/macros/latex-dev/base/graphpap.pdf
+++ b/macros/latex-dev/base/graphpap.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ifthen.pdf b/macros/latex-dev/base/ifthen.pdf
index be07cdedb5..d9c284461f 100644
--- a/macros/latex-dev/base/ifthen.pdf
+++ b/macros/latex-dev/base/ifthen.pdf
Binary files differ
diff --git a/macros/latex-dev/base/inputenc.dtx b/macros/latex-dev/base/inputenc.dtx
index 641125cc75..01a8303ecf 100644
--- a/macros/latex-dev/base/inputenc.dtx
+++ b/macros/latex-dev/base/inputenc.dtx
@@ -261,18 +261,18 @@
% turn should ``hopefully'' set up the corresponding UTF-8 mapping).
%
% This works well enough for the main Western languages for which \LaTeX{}
-% has proper font encoding support, but currently already falls short on
-% languages like Greek (which has some semi-official font support, but for
-% which corresponding UTF-8 mappings still need to be defined).
+% has proper font encoding support, but can fall short on other
+% languages.
%
-% For some languages (such as Greek mentioned above) all that remains doing is
+% For some of these languages all that remains doing is
% to provide the necessary mappings and stick them into |utf8ienc.dtx|, so
% volunteers are welcome. For other languages that do not fit well into
% \LaTeX{} font selection scheme, e.g., Asian languages the outlined inputenc
% approach will not work. If that is the case one can try using Dominique
% Unruh's option |utf8x| for inputenc which has a somewhat different approach
% and encodes many more UTF-8 characters than the standard |utf8| option.
-% However, we recommend to do so only if you really need such alphabets as
+% However, we recommend to do so only if you really need such alphabets and can not
+% switch to one of the unicode engines xelatex or lualatex as
% there are problems with this extended approach which were precisely the
% reason that we decided to limit the support to what is properly supported
% within the boundaries of \LaTeX's font selection.
@@ -410,7 +410,7 @@
%<cp1252&!ansinew> \ProvidesFile{cp1252.def}
%<cp1250> \ProvidesFile{cp1250.def}
%<cp1257> \ProvidesFile{cp1257.def}
- [2018/08/11 v1.3c Input encoding file]
+ [2020/04/14 v1.3c Input encoding file]
%<cp850>%%
%<cp850>%% If you need a Euro symbol, try cp858 instead.
%<cp850>%%
diff --git a/macros/latex-dev/base/inputenc.pdf b/macros/latex-dev/base/inputenc.pdf
index 48d288b0de..ee5a4e8bbe 100644
--- a/macros/latex-dev/base/inputenc.pdf
+++ b/macros/latex-dev/base/inputenc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/latexchanges.pdf b/macros/latex-dev/base/latexchanges.pdf
index 4730d7f8cd..d4b0bd2de2 100644
--- a/macros/latex-dev/base/latexchanges.pdf
+++ b/macros/latex-dev/base/latexchanges.pdf
Binary files differ
diff --git a/macros/latex-dev/base/latexrelease.pdf b/macros/latex-dev/base/latexrelease.pdf
index 396d04c8f5..e914f5ee30 100644
--- a/macros/latex-dev/base/latexrelease.pdf
+++ b/macros/latex-dev/base/latexrelease.pdf
Binary files differ
diff --git a/macros/latex-dev/base/latexsym.pdf b/macros/latex-dev/base/latexsym.pdf
index f6b265cee5..5a41af7123 100644
--- a/macros/latex-dev/base/latexsym.pdf
+++ b/macros/latex-dev/base/latexsym.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lb2.pdf b/macros/latex-dev/base/lb2.pdf
index b04c71d42c..abb4820d33 100644
--- a/macros/latex-dev/base/lb2.pdf
+++ b/macros/latex-dev/base/lb2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/letter.dtx b/macros/latex-dev/base/letter.dtx
index ee9a87cf84..7b31dfbbc9 100644
--- a/macros/latex-dev/base/letter.dtx
+++ b/macros/latex-dev/base/letter.dtx
@@ -45,7 +45,7 @@
%<*driver>
\ProvidesFile{letter.drv}
%</driver>
- [2014/09/29 v1.2z
+ [2020/03/11 v1.3b
%<+letter> Standard LaTeX document class]
% \end{macrocode}
%
@@ -115,10 +115,10 @@
% \end{macrocode}
% Some commonly used abbreviations
% \begin{macrocode}
-\newcommand*{\Lopt}[1]{\textsf {#1}}
-\newcommand*{\file}[1]{\texttt {#1}}
-\newcommand*{\Lcount}[1]{\textsl {\small#1}}
-\newcommand*{\pstyle}[1]{\textsl {#1}}
+\newcommand*\Lopt[1]{\textsf {#1}}
+\newcommand*\file[1]{\texttt {#1}}
+\newcommand*\Lcount[1]{\textsl {\small#1}}
+\newcommand*\pstyle[1]{\textsl {#1}}
% \end{macrocode}
% We also want the full details.
% \begin{macrocode}
@@ -162,6 +162,7 @@
% \changes{v1.2q}{1995/05/17}{cleaned up \cs{changes entries}}
% \changes{v1.2q}{1995/05/18}{replaced \cs{hbox to} by \cs{hb@xt@}}
% \changes{v1.2r}{1995/05/23}{removed a superfluous brace}
+% \changes{v1.3a}{2020/03/07}{merged changes to classes.dtx into letter.dtx}
%
% \iffalse
% Copyright (C) 1994 LaTeX3 project, Frank Mittelbach
@@ -751,29 +752,29 @@
% \item |\name{Dr. L. User}| : to be used for the return address on
% the envelope.
% \begin{macrocode}
-\newcommand*{\name}[1]{\def\fromname{#1}}
+\newcommand*\name[1]{\def\fromname{#1}}
% \end{macrocode}
% \item |\signature{Larry User}| : goes after the closing.
% \begin{macrocode}
-\newcommand*{\signature}[1]{\def\fromsig{#1}}
+\newcommand*\signature[1]{\def\fromsig{#1}}
% \end{macrocode}
% \item |\address{3245 Foo St.\\Gnu York}| : used as the return
% address in the
% letter and on the envelope. If not declared, then an
% institutional standard address is used.
% \begin{macrocode}
-\newcommand*{\address}[1]{\def\fromaddress{#1}}
+\newcommand*\address[1]{\def\fromaddress{#1}}
% \end{macrocode}
% \item |\location{Room 374}| : Acts as modifier to the standard
% institutional address.
% \begin{macrocode}
-\newcommand*{\location}[1]{\def\fromlocation{#1}}
+\newcommand*\location[1]{\def\fromlocation{#1}}
% \end{macrocode}
% \item |\telephone{(415)123-4567}| : Just in case some style puts it
% on the letter.
% \changes{v1.2m}{1994/06/23}{Removed typo (\#[] instead of [1])}
% \begin{macrocode}
-\newcommand*{\telephone}[1]{\def\telephonenum{#1}}
+\newcommand*\telephone[1]{\def\telephonenum{#1}}
% \end{macrocode}
% \end{itemize}
% \end{macro}
@@ -805,7 +806,7 @@
% \begin{macro}{\makelabels}
% The |\makelabels| declaration causes mailing labels to be made.
% \begin{macrocode}
-\newcommand*{\makelabels}{%
+\newcommand*\makelabels{%
% \end{macrocode}
% At the beginning of the document, we need to activate the
% |\@mlabel| and |\@startlabels| commands, as well as write
@@ -914,7 +915,7 @@
% When the command |\stopbreaks| is issued no page breaks should
% occur until |\startbreaks| is called.
% \begin{macrocode}
-\newcommand*{\stopbreaks}{%
+\newcommand*\stopbreaks{%
\interlinepenalty\@M
\def\par{\@@par\nobreak}%
\let\\\@nobreakcr
@@ -953,7 +954,7 @@
% \begin{macro}{\startbreaks}
% This cancels the effect of |\stopbreaks|.
% \begin{macrocode}
-\newcommand*{\startbreaks}{%
+\newcommand*\startbreaks{%
\let\\\@normalcr
\interlinepenalty 200%
\def\par{\@@par\penalty 200\relax}}
@@ -1004,7 +1005,7 @@
% declaration--null if none.
% \end{itemize}
% \begin{macrocode}
-\newcommand*{\opening}[1]{\ifx\@empty\fromaddress
+\newcommand*\opening[1]{\ifx\@empty\fromaddress
\thispagestyle{firstpage}%
{\raggedleft\@date\par}%
\else % home address
@@ -1039,7 +1040,7 @@
% \item |\stopbreaks| : a macro that inhibits page breaking.
% \end{itemize}
% \begin{macrocode}
-\newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
+\newcommand\closing[1]{\par\nobreak\vspace{\parskip}%
\stopbreaks
\noindent
\ifx\@empty\fromaddress\else
@@ -1085,7 +1086,7 @@
% \changes{v1.2s}{1995/05/25}{replace \cs{reset@font} with
% \cs{normalfont}; remove \cs{rm}}
% \begin{macrocode}
-\newcommand*{\cc}[1]{%
+\newcommand*\cc[1]{%
\par\noindent
\parbox[t]{\textwidth}{%
\@hangfrom{\normalfont\ccname: }%
@@ -1100,7 +1101,7 @@
% & Bar
% \end{tabular}
% \begin{macrocode}
-\newcommand*{\encl}[1]{%
+\newcommand*\encl[1]{%
\par\noindent
\parbox[t]{\textwidth}{%
\@hangfrom{\normalfont\enclname: }%
@@ -1110,7 +1111,7 @@
% The only thing |\ps| needs to do is call |\startbreaks|,
% which allows page breaking again.
% \begin{macrocode}
-\newcommand*{\ps}{\par\startbreaks}
+\newcommand*\ps{\par\startbreaks}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1137,7 +1138,7 @@
% |\protect\standardreturnaddress|.
% \end{itemize}
% \begin{macrocode}
-\newcommand*{\stopletter}{}
+\newcommand*\stopletter{}
% \end{macrocode}
% \end{macro}
%
@@ -1159,7 +1160,7 @@
% The return address for the mailing labels can be stored in this
% macro.
% \begin{macrocode}
-\newcommand*{\returnaddress}{}
+\newcommand*\returnaddress{}
% \end{macrocode}
% \end{macro}
%
@@ -1177,7 +1178,7 @@
% 5352 address labels.
% \changes{v1.2q}{1995/03/14}{changed value of \cs{columnsep} by 1pt}
% \begin{macrocode}
-\newcommand*{\startlabels}{\labelcount\z@
+\newcommand*\startlabels{\labelcount\z@
\pagestyle{empty}%
\let\@texttop\relax
\topmargin -50\p@
@@ -1226,7 +1227,7 @@
% \changes{v1.2q}{1995/03/14}{changed width of the labels slightly to
% prevent \LaTeX\ stuffing two on each line}
% \begin{macrocode}
-\newcommand*{\mlabel}[2]{%
+\newcommand*\mlabel[2]{%
\parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}%
}
% \end{macrocode}
@@ -1267,7 +1268,7 @@
% For efficiency, level-one list's values are defined at top level, and
% |\@listi| is defined to set only |\leftmargin|.
% \begin{macrocode}
-\setlength\leftmargini {2.5em}
+\setlength\leftmargini {2.5em}
% \end{macrocode}
% The following three are calculated so that they are larger than
% the sum of |\labelsep| and the width of the default labels (which
@@ -1276,8 +1277,8 @@
\setlength\leftmarginii {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv {1.7em}
-\setlength\leftmarginv {1em}
-\setlength\leftmarginvi {1em}
+\setlength\leftmarginv {1em}
+\setlength\leftmarginvi {1em}
% \end{macrocode}
% Here we set the top level leftmargin.
% \begin{macrocode}
@@ -1453,11 +1454,30 @@
% \changes{v1.2x}{1997/04/16}{Changed to \cs{textbullet},
% \cs{textasteriskcentered} and \cs{textperiodcentered}}
% \begin{macrocode}
-\newcommand\labelitemi{\textbullet}
-\newcommand\labelitemii{\normalfont\bfseries \textendash}
-\newcommand\labelitemiii{\textasteriskcentered}
-\newcommand\labelitemiv{\textperiodcentered}
+\newcommand\labelitemi {\labelitemfont \textbullet}
+\newcommand\labelitemii {\labelitemfont \bfseries \textendash}
+\newcommand\labelitemiii{\labelitemfont \textasteriskcentered}
+\newcommand\labelitemiv {\labelitemfont \textperiodcentered}
% \end{macrocode}
+%
+% \begin{macro}{\labelitemfont}
+% The default definition for \cs{labelitemfont} is to reset the
+% font to \cs{normalfont} so that always the same symbol is
+% produced regardless of surrounding conditions.
+%
+% \changes{v1.3a}{2020/03/07}{Normalize label fonts}
+% A possible alternative would be
+%\begin{verbatim}
+%\renewcommand\labelitemfont{%
+% \fontseries\seriesdefault
+% \fontshape\shapedefault\selectfont}
+%\end{verbatim}
+% which resets series and shape doesn't touch the family.
+% \begin{macrocode}
+\newcommand\labelitemfont{\normalfont}
+% \end{macrocode}
+% \changes{v1.3b}{2020/03/11}{Added a missing \cs{end{macro}} statement}
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
@@ -1484,8 +1504,8 @@
%
% \changes{v1.2q}{1995/03/14}{made command short}
% \begin{macrocode}
-\newcommand*{\descriptionlabel}[1]{\hspace\labelsep
- \normalfont\bfseries #1}
+\newcommand*\descriptionlabel[1]{\hspace\labelsep
+ \normalfont\bfseries #1}
% \end{macrocode}
% \end{macro}
%
@@ -1795,8 +1815,10 @@
% |\parindent| to the appropriate value for succeeding paragraphs
% and put the proper indentation before the mark.
%
+% \changes{v1.3b}{2020/03/11}{make the switch to the use of
+% \cs{newcommand} complete.}
% \begin{macrocode}
-\long\def\@makefntext#1{%
+\newcommand\@makefntext[1]{%
\noindent
\hangindent 5\p@
\hb@xt@5\p@{\hss\@makefnmark}#1}
@@ -1808,10 +1830,12 @@
% footnotes should be produced by the macro |\@makefnmark|. We use
% the default definition for it.
% \begin{macrocode}
-%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
+%\renewcommand\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
% \end{macrocode}
% \end{macro}
%
+% \section{Initialization}
+%
% \subsection{Words}
%
% \begin{macro}{\ccname}
@@ -1823,10 +1847,10 @@
% English words must be replaced. All the English words that
% require replacement are defined below in command names.
% \begin{macrocode}
-\newcommand*{\ccname}{cc}
-\newcommand*{\enclname}{encl}
-\newcommand*{\pagename}{Page}
-\newcommand*{\headtoname}{To}
+\newcommand*\ccname{cc}
+\newcommand*\enclname{encl}
+\newcommand*\pagename{Page}
+\newcommand*\headtoname{To}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1839,7 +1863,7 @@
% This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
% to provide the date of the \LaTeX-run.
% \begin{macrocode}
-\newcommand*{\today}{\ifcase\month\or
+\newcommand*\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
diff --git a/macros/latex-dev/base/letter.pdf b/macros/latex-dev/base/letter.pdf
index ef5e8173e4..4df0771074 100644
--- a/macros/latex-dev/base/letter.pdf
+++ b/macros/latex-dev/base/letter.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lgc2.pdf b/macros/latex-dev/base/lgc2.pdf
index d365e0f353..f3c7b5ff3e 100644
--- a/macros/latex-dev/base/lgc2.pdf
+++ b/macros/latex-dev/base/lgc2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lppl.pdf b/macros/latex-dev/base/lppl.pdf
new file mode 100644
index 0000000000..14c251a554
--- /dev/null
+++ b/macros/latex-dev/base/lppl.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lppl.tex b/macros/latex-dev/base/lppl.tex
new file mode 100644
index 0000000000..c2a54c1532
--- /dev/null
+++ b/macros/latex-dev/base/lppl.tex
@@ -0,0 +1,511 @@
+%
+% Copyright 1999 2002-2011 LaTeX3 Project
+% Everyone is allowed to distribute verbatim copies of this
+% license document, but modification of it is not allowed.
+%
+%
+% If you wish to load it as part of a ``doc'' source, you have to
+% ensure that a) % is a comment character and b) that short verb
+% characters are being turned off, i.e.,
+%
+% \DeleteShortVerb{\'} % or whatever was made a shorthand
+% \MakePercentComment
+% \input{lppl}
+% \MakePercentIgnore
+% \MakeShortVerb{\'} % turn it on again if necessary
+%
+%
+% By default the license is produced with \section* as the highest
+% heading level. If this is not appropriate for the document in which
+% it is included define the commands listed below before loading this
+% document, e.g., for inclusion as a separate chapter define:
+%
+% \providecommand{\LPPLsection}{\chapter*}
+% \providecommand{\LPPLsubsection}{\section*}
+% \providecommand{\LPPLsubsubsection}{\subsection*}
+% \providecommand{\LPPLparagraph}{\subsubsection*}
+%
+%
+% To allow cross-referencing the headings \label's have been attached
+% to them, all starting with ``LPPL:''. As by default headings without
+% numbers are produced, this will only allow page references.
+% However, you can use the titleref package to produce textual
+% references or you change the definitions of \LPPLsection, and
+% friends to generated numbered headings.
+%
+%
+% We want it to be possible that this file can be processed by
+% (pdf)LaTeX on its own, or that this file can be included in another
+% LaTeX document without any modification whatsoever.
+% Hence the little test below.
+%
+%
+\makeatletter
+\ifx\@preamblecmds\@notprerr
+ % In this case the preamble has already been processed so this file
+ % is loaded as part of another document; just enclose everything in
+ % a group
+ \let\LPPLicense\bgroup
+ \let\endLPPLicense\egroup
+\else
+ % In this case the preamble has not been processed yet so this file
+ % is processed by itself.
+ \documentclass{article}
+ \let\LPPLicense\document
+ \let\endLPPLicense\enddocument
+\fi
+\makeatother
+
+
+\begin{LPPLicense}
+ \providecommand{\LPPLsection}{\section*}
+ \providecommand{\LPPLsubsection}{\subsection*}
+ \providecommand{\LPPLsubsubsection}{\subsubsection*}
+ \providecommand{\LPPLparagraph}{\paragraph*}
+ \providecommand*{\LPPLfile}[1]{\texttt{#1}}
+ \providecommand*{\LPPLdocfile}[1]{`\LPPLfile{#1.tex}'}
+ \providecommand*{\LPPL}{\textsc{lppl}}
+
+ \LPPLsection{The \LaTeX\ Project Public License}
+ \label{LPPL:LPPL}
+
+ \emph{LPPL Version 1.3c 2008-05-04}
+
+ \textbf{Copyright 1999, 2002--2008 \LaTeX3 Project}
+ \begin{quotation}
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+ \end{quotation}
+
+ \LPPLsubsection{Preamble}
+ \label{LPPL:Preamble}
+
+ The \LaTeX\ Project Public License (\LPPL) is the primary license
+ under which the \LaTeX\ kernel and the base \LaTeX\ packages are
+ distributed.
+
+ You may use this license for any work of which you hold the
+ copyright and which you wish to distribute. This license may be
+ particularly suitable if your work is \TeX-related (such as a
+ \LaTeX\ package), but it is written in such a way that you can use
+ it even if your work is unrelated to \TeX.
+
+ The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS
+ LICENSE', below, gives instructions, examples, and recommendations
+ for authors who are considering distributing their works under this
+ license.
+
+ This license gives conditions under which a work may be distributed
+ and modified, as well as conditions under which modified versions of
+ that work may be distributed.
+
+ We, the \LaTeX3 Project, believe that the conditions below give you
+ the freedom to make and distribute modified versions of your work
+ that conform with whatever technical specifications you wish while
+ maintaining the availability, integrity, and reliability of that
+ work. If you do not see how to achieve your goal while meeting
+ these conditions, then read the document \LPPLdocfile{cfgguide} and
+ \LPPLdocfile{modguide} in the base \LaTeX\ distribution for suggestions.
+
+
+ \LPPLsubsection{Definitions}
+ \label{LPPL:Definitions}
+
+ In this license document the following terms are used:
+
+ \begin{description}
+ \item[Work] Any work being distributed under this License.
+
+ \item[Derived Work] Any work that under any applicable law is
+ derived from the Work.
+
+ \item[Modification] Any procedure that produces a Derived Work under
+ any applicable law -- for example, the production of a file
+ containing an original file associated with the Work or a
+ significant portion of such a file, either verbatim or with
+ modifications and/or translated into another language.
+
+ \item[Modify] To apply any procedure that produces a Derived Work
+ under any applicable law.
+
+ \item[Distribution] Making copies of the Work available from one
+ person to another, in whole or in part. Distribution includes
+ (but is not limited to) making any electronic components of the
+ Work accessible by file transfer protocols such as \textsc{ftp} or
+ \textsc{http} or by shared file systems such as Sun's Network File
+ System (\textsc{nfs}).
+
+ \item[Compiled Work] A version of the Work that has been processed
+ into a form where it is directly usable on a computer system.
+ This processing may include using installation facilities provided
+ by the Work, transformations of the Work, copying of components of
+ the Work, or other activities. Note that modification of any
+ installation facilities provided by the Work constitutes
+ modification of the Work.
+
+ \item[Current Maintainer] A person or persons nominated as such
+ within the Work. If there is no such explicit nomination then it
+ is the `Copyright Holder' under any applicable law.
+
+ \item[Base Interpreter] A program or process that is normally needed
+ for running or interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these are
+ not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `\LaTeX-Format' or in the case of files belonging to the
+ `\LaTeX-format' a program implementing the `\TeX{} language'.
+ \end{description}
+
+ \LPPLsubsection{Conditions on Distribution and Modification}
+ \label{LPPL:Conditions}
+
+ \begin{enumerate}
+ \item Activities other than distribution and/or modification of the
+ Work are not covered by this license; they are outside its scope.
+ In particular, the act of running the Work is not restricted and
+ no requirements are made concerning any offers of support for the
+ Work.
+
+ \item\label{LPPL:item:distribute} You may distribute a complete, unmodified
+ copy of the Work as you received it. Distribution of only part of
+ the Work is considered modification of the Work, and no right to
+ distribute such a Derived Work may be assumed under the terms of
+ this clause.
+
+ \item You may distribute a Compiled Work that has been generated
+ from a complete, unmodified copy of the Work as distributed under
+ Clause~\ref{LPPL:item:distribute} above, as long as that Compiled Work is
+ distributed in such a way that the recipients may install the
+ Compiled Work on their system exactly as it would have been
+ installed if they generated a Compiled Work directly from the
+ Work.
+
+ \item\label{LPPL:item:currmaint} If you are the Current Maintainer of the
+ Work, you may, without restriction, modify the Work, thus creating
+ a Derived Work. You may also distribute the Derived Work without
+ restriction, including Compiled Works generated from the Derived
+ Work. Derived Works distributed in this manner by the Current
+ Maintainer are considered to be updated versions of the Work.
+
+ \item If you are not the Current Maintainer of the Work, you may
+ modify your copy of the Work, thus creating a Derived Work based
+ on the Work, and compile this Derived Work, thus creating a
+ Compiled Work based on the Derived Work.
+
+ \item\label{LPPL:item:conditions} If you are not the Current Maintainer
+ of the
+ Work, you may distribute a Derived Work provided the following
+ conditions are met for every component of the Work unless that
+ component clearly states in the copyright notice that it is exempt
+ from that condition. Only the Current Maintainer is allowed to
+ add such statements of exemption to a component of the Work.
+ \begin{enumerate}
+ \item If a component of this Derived Work can be a direct
+ replacement for a component of the Work when that component is
+ used with the Base Interpreter, then, wherever this component of
+ the Work identifies itself to the user when used interactively
+ with that Base Interpreter, the replacement component of this
+ Derived Work clearly and unambiguously identifies itself as a
+ modified version of this component to the user when used
+ interactively with that Base Interpreter.
+
+ \item\label{LPPL:item:changelog} Every component of the Derived Work
+ contains prominent
+ notices detailing the nature of the changes to that component,
+ or a prominent reference to another file that is distributed as
+ part of the Derived Work and that contains a complete and
+ accurate log of the changes.
+
+ \item No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original
+ version of the Work, provide any support, including (but not
+ limited to) the reporting and handling of errors, to recipients
+ of the Derived Work unless those persons have stated explicitly
+ that they do provide such support for the Derived Work.
+
+ \item\label{LPPL:item:unmodifiedcopy} You distribute at least one of
+ the following with the Derived Work:
+ \begin{enumerate}
+ \item A complete, unmodified copy of the Work; if your
+ distribution of a modified component is made by offering
+ access to copy the modified component from a designated place,
+ then offering equivalent access to copy the Work from the same
+ or some similar place meets this condition, even though third
+ parties are not compelled to copy the Work along with the
+ modified component;
+
+ \item Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+ \end{enumerate}
+ \end{enumerate}
+ \item If you are not the Current Maintainer of the Work, you may
+ distribute a Compiled Work generated from a Derived Work, as long
+ as the Derived Work is distributed to all recipients of the
+ Compiled Work, and as long as the conditions of
+ Clause~\ref{LPPL:item:conditions}, above, are met with regard to the
+ Derived Work.
+
+ \item The conditions above are not intended to prohibit, and hence
+ do not apply to, the modification, by any method, of any component
+ so that it becomes identical to an updated version of that
+ component of the Work as it is distributed by the Current
+ Maintainer under Clause~\ref{LPPL:item:currmaint}, above.
+
+ \item Distribution of the Work or any Derived Work in an alternative
+ format, where the Work or that Derived Work (in whole or in part)
+ is then produced by applying some process to that format, does not
+ relax or nullify any sections of this license as they pertain to
+ the results of applying that process.
+
+ \item
+ \begin{enumerate}
+ \item A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause~\ref{LPPL:item:conditions} above, in regard to the Work, though it
+ does not have to honor the rest of the conditions in this
+ license.
+
+ \item If a Derived Work is distributed under a different license,
+ that Derived Work must provide sufficient documentation as part
+ of itself to allow each recipient of that Derived Work to honor
+ the restrictions in Clause~\ref{LPPL:item:conditions} above, concerning
+ changes from the Work.
+ \end{enumerate}
+ \item This license places no restrictions on works that are
+ unrelated to the Work, nor does this license place any
+ restrictions on aggregating such works with the Work by any means.
+
+ \item Nothing in this license is intended to, or may be used to,
+ prevent complete compliance by all parties with all applicable
+ laws.
+ \end{enumerate}
+
+ \LPPLsubsection{No Warranty}
+ \label{LPPL:Warranty}
+
+ There is no warranty for the Work. Except when otherwise stated in
+ writing, the Copyright Holder provides the Work `as is', without
+ warranty of any kind, either expressed or implied, including, but
+ not limited to, the implied warranties of merchantability and
+ fitness for a particular purpose. The entire risk as to the quality
+ and performance of the Work is with you. Should the Work prove
+ defective, you assume the cost of all necessary servicing, repair,
+ or correction.
+
+ In no event unless required by applicable law or agreed to in
+ writing will The Copyright Holder, or any author named in the
+ components of the Work, or any other party who may distribute and/or
+ modify the Work as permitted above, be liable to you for damages,
+ including any general, special, incidental or consequential damages
+ arising out of any use of the Work or out of inability to use the
+ Work (including, but not limited to, loss of data, data being
+ rendered inaccurate, or losses sustained by anyone as a result of
+ any failure of the Work to operate with any other programs), even if
+ the Copyright Holder or said author or said other party has been
+ advised of the possibility of such damages.
+
+ \LPPLsubsection{Maintenance of The Work}
+ \label{LPPL:Maintenance}
+
+ The Work has the status `author-maintained' if the Copyright Holder
+ explicitly and prominently states near the primary copyright notice
+ in the Work that the Work can only be maintained by the Copyright
+ Holder or simply that it is `author-maintained'.
+
+ The Work has the status `maintained' if there is a Current
+ Maintainer who has indicated in the Work that they are willing to
+ receive error reports for the Work (for example, by supplying a
+ valid e-mail address). It is not required for the Current Maintainer
+ to acknowledge or act upon these error reports.
+
+ The Work changes from status `maintained' to `unmaintained' if there
+ is no Current Maintainer, or the person stated to be Current
+ Maintainer of the work cannot be reached through the indicated means
+ of communication for a period of six months, and there are no other
+ significant signs of active maintenance.
+
+ You can become the Current Maintainer of the Work by agreement with
+ any existing Current Maintainer to take over this role.
+
+ If the Work is unmaintained, you can become the Current Maintainer
+ of the Work through the following steps:
+ \begin{enumerate}
+ \item Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of an
+ Internet or similar search.
+ \item If this search is successful, then enquire whether the Work is
+ still maintained.
+ \begin{enumerate}
+ \item If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ \item\label{LPPL:item:intention} If the search is unsuccessful or
+ no action to resume active maintenance is taken by the Current
+ Maintainer, then announce within the pertinent community your
+ intention to take over maintenance. (If the Work is a \LaTeX{}
+ work, this could be done, for example, by posting to
+ \texttt{comp.text.tex}.)
+ \end{enumerate}
+ \item {}
+ \begin{enumerate}
+ \item If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ \item\label{LPPL:item:announce} If the Current Maintainer is not
+ reachable and the Copyright Holder agrees that maintenance of
+ the Work be passed to you, then this takes effect immediately
+ upon announcement.
+ \end{enumerate}
+ \item\label{LPPL:item:change} If you make an `intention
+ announcement' as described in~\ref{LPPL:item:intention} above and
+ after three months your intention is challenged neither by the
+ Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as to
+ name you as the (new) Current Maintainer.
+
+ \item If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of~\ref{LPPL:item:announce}
+ or~\ref{LPPL:item:change}, then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided they
+ then update their communication data within one month.
+ \end{enumerate}
+ A change in the Current Maintainer does not, of itself, alter the
+ fact that the Work is distributed under the \LPPL\ license.
+
+ If you become the Current Maintainer of the Work, you should
+ immediately provide, within the Work, a prominent and unambiguous
+ statement of your status as Current Maintainer. You should also
+ announce your new status to the same pertinent community as
+ in~\ref{LPPL:item:intention} above.
+
+ \LPPLsubsection{Whether and How to Distribute Works under This License}
+ \label{LPPL:Distribute}
+
+ This section contains important instructions, examples, and
+ recommendations for authors who are considering distributing their
+ works under this license. These authors are addressed as `you' in
+ this section.
+
+ \LPPLsubsubsection{Choosing This License or Another License}
+ \label{LPPL:Choosing}
+
+ If for any part of your work you want or need to use
+ \emph{distribution} conditions that differ significantly from those
+ in this license, then do not refer to this license anywhere in your
+ work but, instead, distribute your work under a different license.
+ You may use the text of this license as a model for your own
+ license, but your license should not refer to the \LPPL\ or
+ otherwise give the impression that your work is distributed under
+ the \LPPL.
+
+ The document \LPPLdocfile{modguide} in the base \LaTeX\ distribution
+ explains the motivation behind the conditions of this license. It
+ explains, for example, why distributing \LaTeX\ under the
+ \textsc{gnu} General Public License (\textsc{gpl}) was considered
+ inappropriate. Even if your work is unrelated to \LaTeX, the
+ discussion in \LPPLdocfile{modguide} may still be relevant, and authors
+ intending to distribute their works under any license are encouraged
+ to read it.
+
+ \LPPLsubsubsection{A Recommendation on Modification Without Distribution}
+ \label{LPPL:WithoutDistribution}
+
+ It is wise never to modify a component of the Work, even for your
+ own personal use, without also meeting the above conditions for
+ distributing the modified component. While you might intend that
+ such modifications will never be distributed, often this will happen
+ by accident -- you may forget that you have modified that component;
+ or it may not occur to you when allowing others to access the
+ modified version that you are thus distributing it and violating the
+ conditions of this license in ways that could have legal
+ implications and, worse, cause problems for the community. It is
+ therefore usually in your best interest to keep your copy of the
+ Work identical with the public one. Many works provide ways to
+ control the behavior of that work without altering any of its
+ licensed components.
+
+ \LPPLsubsubsection{How to Use This License}
+ \label{LPPL:HowTo}
+
+ To use this license, place in each of the components of your work
+ both an explicit copyright notice including your name and the year
+ the work was authored and/or last substantially modified. Include
+ also a statement that the distribution and/or modification of that
+ component is constrained by the conditions in this license.
+
+ Here is an example of such a notice and statement:
+\begin{verbatim}
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % https://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+\end{verbatim}
+
+ Given such a notice and statement in a file, the conditions given in
+ this license document would apply, with the `Work' referring to the
+ three files `\LPPLfile{pig.dtx}', `\LPPLfile{pig.ins}', and
+ `\LPPLfile{pig.sty}' (the last being generated from
+ `\LPPLfile{pig.dtx}' using `\LPPLfile{pig.ins}'), the `Base
+ Interpreter' referring to any `\LaTeX-Format', and both `Copyright
+ Holder' and `Current Maintainer' referring to the person `M. Y.
+ Name'.
+
+ If you do not want the Maintenance section of \LPPL\ to apply to
+ your Work, change `maintained' above into `author-maintained'.
+ However, we recommend that you use `maintained' as the Maintenance
+ section was added in order to ensure that your Work remains useful
+ to the community even when you can no longer maintain and support it
+ yourself.
+
+ \LPPLsubsubsection{Derived Works That Are Not Replacements}
+ \label{LPPL:NotReplacements}
+
+ Several clauses of the \LPPL\ specify means to provide reliability
+ and stability for the user community. They therefore concern
+ themselves with the case that a Derived Work is intended to be used
+ as a (compatible or incompatible) replacement of the original
+ Work. If this is not the case (e.g., if a few lines of code are
+ reused for a completely different task), then clauses
+ \ref{LPPL:item:changelog} and \ref{LPPL:item:unmodifiedcopy}
+ shall not apply.
+
+ \LPPLsubsubsection{Important Recommendations}
+ \label{LPPL:Recommendations}
+
+ \LPPLparagraph{Defining What Constitutes the Work}
+
+ The \LPPL\ requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a way
+ for the licensee to determine which files constitute the Work. This
+ could, for example, be achieved by explicitly listing all the files
+ of the Work near the copyright notice of each file or by using a
+ line such as:
+\begin{verbatim}
+ % This work consists of all files listed in manifest.txt.
+\end{verbatim}
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
+
+\end{LPPLicense}
+\endinput
diff --git a/macros/latex-dev/base/ltboxes.dtx b/macros/latex-dev/base/ltboxes.dtx
index 61ea87235a..051922b6f3 100644
--- a/macros/latex-dev/base/ltboxes.dtx
+++ b/macros/latex-dev/base/ltboxes.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltboxes.dtx}
- [2019/08/27 v1.3b LaTeX Kernel (Box Commands)]
+ [2020/03/06 v1.3c LaTeX Kernel (Box Commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltboxes.dtx}
@@ -1290,13 +1290,21 @@
%
% \begin{macro}{\rlap}
% \begin{macro}{\llap}
+% \begin{macro}{\clap}
% These macros place text to the left or right of the current
% reference point without taking up space.
-% \end{macro}
% \begin{macrocode}
\DeclareRobustCommand\rlap[1]{\hb@xt@\z@{#1\hss}}
\DeclareRobustCommand\llap[1]{\hb@xt@\z@{\hss#1}}
% \end{macrocode}
+% And here is the version that centers, it was initially introduced by
+% \texttt{mathtools}.
+% \changes{v1.3c}{2020/03/06}{Macro \cs{clap} added}
+% \begin{macrocode}
+\DeclareRobustCommand\clap[1]{\hb@xt@\z@{\hss#1\hss}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \begin{macrocode}
diff --git a/macros/latex-dev/base/ltclass.dtx b/macros/latex-dev/base/ltclass.dtx
index f43e8f0c0d..dd35be9ae4 100644
--- a/macros/latex-dev/base/ltclass.dtx
+++ b/macros/latex-dev/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2020/03/02 v1.3j LaTeX Kernel (Class & Package Interface)]
+ [2020/04/24 v1.3k LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -620,15 +620,60 @@
%
% \begin{macro}{\@ifpackagelater}
% \begin{macro}{\@ifclasslater}
-% |\@ifpackagelater{|\meta{name}|}{YYYY/MM/DD}|
-% Checks that the package loaded is more recent than the given date.
+% |\@ifpackagelater{|\meta{name}|}{YYYY/MM/DD}{|\meta{true
+% code}|}{|\meta{false code}|}|
+% Checks that the package loaded is more recent or equal to the
+% given date.
+% A better name for it would therefore been
+% |\@ifpackagelaterorequal| but it is in use for more than 30
+% years, so \ldots
% \begin{macrocode}
\def\@ifpackagelater{\@ifl@ter\@pkgextension}
\def\@ifclasslater{\@ifl@ter\@clsextension}
\@onlypreamble\@ifpackagelater
\@onlypreamble\@ifclasslater
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
%
+%
+% \begin{macro}{\IfPackageAtLeastTF}
+% \begin{macro}{\IfClassAtLeastTF}
+% \begin{macro}{\IfFormatAtLeastTF}
+% |\IfFormatAtLeastTF{YYYY/MM/DD}{|\meta{true
+% code}|}{|\meta{false code}|}|
+% Test if the format is later or equal to the given date.
+% \changes{v1.3k}{2020/04/07}{Macro added; also in rollback (gh/168)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\IfFormatAtLeastTF}{Test format date}%
+\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+\let\IfPackageAtLeastTF\@ifpackagelater
+\let\IfClassAtLeastTF\@ifclasslater
+\@onlypreamble\IfFormatAtLeastTF
+\@onlypreamble\IfPackageAtLeastTF
+\@onlypreamble\IfClassAtLeastTF
+% \end{macrocode}
+% For rollback pretend it was available since the beginning of dawn.
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\IfFormatAtLeastTF}{Test format date}%
+%<latexrelease>\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+%<latexrelease>\let\IfPackageAtLeastTF\@ifpackagelater
+%<latexrelease>\let\IfClassAtLeastTF\@ifclasslater
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@ifl@ter}
% \begin{macrocode}
\def\@ifl@ter#1#2{%
\expandafter\@ifl@t@r
@@ -675,6 +720,7 @@
% \begin{macrocode}
\@onlypreamble\@ifl@t@r
% \end{macrocode}
+% \end{macro}
%
% \changes{v1.1j}{2016/06/20}
% {don't declare as \cs{@onlypreamble}}
@@ -695,8 +741,8 @@
%</2ekernel|latexreleasefirst>
%<*2ekernel>
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+%
+%
%
% \begin{macro}{\@ifpackagewith}
% \begin{macro}{\@ifclasswith}
@@ -1050,6 +1096,10 @@
%
% The common part of |\ProcessOptions| and |\ProcessOptions*|.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@process@pti@ns}{Unused options issue}%
\def\@process@pti@ns{%
\@for\CurrentOption:=\@curroptions\do{%
\@ifundefined{ds@\CurrentOption}%
@@ -1073,11 +1123,33 @@
% \end{macrocode}
% \changes{v1.0r}{1995/10/17}
% {Reset \cs{CurrentOption} for graphics/1873}
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
% \begin{macrocode}
\let\CurrentOption\@empty
\let\@fileswith@pti@ns\@@fileswith@pti@ns
- \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+ \AtEndOfPackage{\expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \relax}}
\@onlypreamble\@process@pti@ns
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@process@pti@ns}{Unused options issue}%
+%<latexrelease>
+%<latexrelease>\def\@process@pti@ns{%
+%<latexrelease> \@for\CurrentOption:=\@curroptions\do{%
+%<latexrelease> \@ifundefined{ds@\CurrentOption}%
+%<latexrelease> {\@use@ption
+%<latexrelease> \default@ds}%
+%<latexrelease> \@use@ption}%
+%<latexrelease> \@for\CurrentOption:=\@declaredoptions\do{%
+%<latexrelease> \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
+%<latexrelease> \let\CurrentOption\@empty
+%<latexrelease> \let\@fileswith@pti@ns\@@fileswith@pti@ns
+%<latexrelease> \AtEndOfPackage{\let\@unprocessedoptions\relax}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1243,13 +1315,45 @@
% \changes{v1.0v}{1996/10/04}{Reset \cs{@unprocessedoptions} for /2269}
% Load package `|#1|' with the current option list.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\RequirePackageWithOptions}{Unused options issue}%
\def\RequirePackageWithOptions{%
- \AtEndOfPackage{\let\@unprocessedoptions\relax}%
+% \end{macrocode}
+% The resetting of the unprocessed options is now done on a par package basis.
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
+% \begin{macrocode}
+ \AtEndOfPackage{\expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \relax}%
\@loadwithoptions\@pkgextension\RequirePackage}
\@onlypreamble\RequirePackageWithOptions
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\RequirePackageWithOptions}{Unused options issue}%
+%<latexrelease>
+%<latexrelease>\def\RequirePackageWithOptions{%
+%<latexrelease> \AtEndOfPackage{\let\@unprocessedoptions\relax}%
+%<latexrelease> \@loadwithoptions\@pkgextension\RequirePackage}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+
+
+
+
+
+
+%
% \begin{macro}{\usepackage}
% To begin with, |\usepackage| produces an error. This is reset by
% |\documentclass|.
@@ -1482,6 +1586,10 @@
% \changes{v1.3d}{2019/10/18}{Initialize \cs{...-h@@k} only when loading
% the package or class (gh/198)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@onefilewithoptions}{Unused options issue}%
\def\@onefilewithoptions#1[#2][#3]#4{%
\@pushfilename
\xdef\@currname{#1}%
@@ -1531,19 +1639,49 @@
{}%
{\@missingfileerror\@currname\@currext}%
% \end{macrocode}
-% |\@unprocessedoptions| will generate an error for each specified
-% option in a package unless a |\ProcessOptions| has appeared in the
-% package file.
+% In older versions of the code |\@unprocessedoptions| would
+% generate an error for each specified
+% option in a package unless a |\ProcessOptions| has appeared in the
+% package file.
% \changes{v0.2v}{1994/01/29}
% {All options raise error if no \cs{ProcessOptions} appears}
% \changes{v0.2x}{1994/02/02}
-% {Only run the hook and options check if the file was loaded.}
-% \begin{macrocode}
- \let\@unprocessedoptions\@@unprocessedoptions
+% {Only run the hook and options check if the file was
+% loaded.}
+%
+% This has changed in 2020. We now use a separate macro per package
+% to avoid interferences in case of nested packages. The whole
+% code for handling this issue (GitHub 22) was provided by Hironobu
+% Yamashita, thanks for that.
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
+% \begin{macrocode}
+ \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname
+ \@@unprocessedoptions
\csname\@currname.\@currext-h@@k\endcsname
\expandafter\let\csname\@currname.\@currext-h@@k\endcsname
\@undefined
- \@unprocessedoptions}%
+% \end{macrocode}
+% Catch the case where the packages has handled the options and
+% redefined \cs{@unprocessedoptions} to \cs{relax} (old interface).
+% In that case no error should be produced.
+% \changes{v1.3k}{2020/04/07}{Use different method to ignore
+% unprocessed options (gh/22)}
+% \begin{macrocode}
+ \ifx\@unprocessedoptions\relax
+ \let\@unprocessedoptions\@undefined
+% \end{macrocode}
+% Otherwise run the per package set of unused options.
+% \begin{macrocode}
+ \else
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \fi
+% \end{macrocode}
+% In either case we drop the macro afterwards as it is no longer needed.
+% \begin{macrocode}
+ \expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \@undefined}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1565,8 +1703,82 @@
\reserved@a}
\@onlypreamble\@onefilewithoptions
% \end{macrocode}
+%
+% The kernel no longer uses \cs{@unprocessedoptions}
+% \begin{macrocode}
+\let\@unprocessedoptions\@undefined
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@onefilewithoptions}{Unused options issue}%
+%<latexrelease>
+% \end{macrocode}
+% Because of the way \cs{@onfilewithoptions} is changed for
+% rollback handling below we have to define
+% \cs{load@onefilewithoptions} when rollowing back!
+% \begin{macrocode}
+%<latexrelease>\def\load@onefilewithoptions#1[#2][#3]#4{%
+%<latexrelease> \@pushfilename
+%<latexrelease> \xdef\@currname{#1}%
+%<latexrelease> \global\let\@currext#4%
+%<latexrelease> \let\CurrentOption\@empty
+%<latexrelease> \@reset@ptions
+%<latexrelease> \makeatletter
+%<latexrelease> \def\reserved@a{%
+%<latexrelease> \@ifl@aded\@currext{#1}%
+%<latexrelease> {\@if@ptions\@currext{#1}{#2}{}%
+%<latexrelease> {\@latex@error
+%<latexrelease> {Option clash for \@cls@pkg\space #1}%
+%<latexrelease> {The package #1 has already been loaded
+%<latexrelease> with options:\MessageBreak
+%<latexrelease> \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
+%<latexrelease> There has now been an attempt to load it
+%<latexrelease> with options\MessageBreak
+%<latexrelease> \space\space[#2]\MessageBreak
+%<latexrelease> Adding the global options:\MessageBreak
+%<latexrelease> \space\space
+%<latexrelease> \@ptionlist{#1.\@currext},#2\MessageBreak
+%<latexrelease> to your \noexpand\documentclass declaration may fix this.%
+%<latexrelease> \MessageBreak
+%<latexrelease> Try typing \space <return> \space to proceed.}}}%
+%<latexrelease> {\@pass@ptions\@currext{#2}{#1}%
+%<latexrelease> \global\expandafter
+%<latexrelease> \let\csname ver@\@currname.\@currext\endcsname\@empty
+%<latexrelease> \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
+%<latexrelease> \InputIfFileExists
+%<latexrelease> {\@currname.\@currext}%
+%<latexrelease> {}%
+%<latexrelease> {\@missingfileerror\@currname\@currext}%
+%<latexrelease> \let\@unprocessedoptions\@@unprocessedoptions
+%<latexrelease> \csname\@currname.\@currext-h@@k\endcsname
+%<latexrelease> \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
+%<latexrelease> \@undefined
+%<latexrelease> \@unprocessedoptions}%
+%<latexrelease> \@ifl@ter\@currext{#1}{#3}{}%
+%<latexrelease> {\@latex@warning@no@line
+%<latexrelease> {You have requested,\on@line,
+%<latexrelease> version\MessageBreak
+%<latexrelease> `#3' of \@cls@pkg\space #1,\MessageBreak
+%<latexrelease> but only version\MessageBreak
+%<latexrelease> `\csname ver@#1.\@currext\endcsname'\MessageBreak
+%<latexrelease> is available}}%
+%<latexrelease> \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
+%<latexrelease> \@popfilename
+%<latexrelease> \@reset@ptions}%
+%<latexrelease> \reserved@a}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
% \end{macro}
%
+%
+%
+%
+%
+%
% \begin{macro}{\@@fileswith@pti@ns}
% Save the definition (for error checking).
% \changes{v0.2c}{1993/11/17}
@@ -1593,6 +1805,9 @@
% \end{macrocode}
% \end{macro}
%
+%
+%
+%
% \subsection{Hooks}
%
% Allow code do be saved to be executed at specific later times.
@@ -1760,6 +1975,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{filecontents}
% \begin{macro}{\filecontents}
% \begin{macro}{\endfilecontents}
% This environment implements inline files.
@@ -1776,13 +1992,12 @@
% \changes{v1.0m}{1995/04/21}
% {Close input check stream: latex/1487}
% \changes{v1.0p}{1995/05/25}{Delete \cs{filec@ntents} after preamble}
-% \begin{macrocode}
% \changes{v1.3a}{2019/07/01}{Support UTF8 and spaces in
% filecontents environment file name}
% \changes{v1.3b}{2019/08/27}{Make various commands robust}
% \changes{v1.3c}{2019/09/11}{Support optional argument for filecontents}
% \changes{v1.3f}{2020/01/05}{Support more write streams in LuaTeX gh/238}
-%
+% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2019/10/01}%
@@ -2142,6 +2357,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{environment}
%
%
%
diff --git a/macros/latex-dev/base/ltdefns.dtx b/macros/latex-dev/base/ltdefns.dtx
index 303b9e5604..8b7a307ad2 100644
--- a/macros/latex-dev/base/ltdefns.dtx
+++ b/macros/latex-dev/base/ltdefns.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltdefns.dtx}
- [2020/02/27 v1.5g LaTeX Kernel (definition commands)]
+ [2020/05/15 v1.5h LaTeX Kernel (definition commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltdefns.dtx}
@@ -118,9 +118,25 @@
%
% \begin{macro}{\typeout}
% Display something on the terminal.
+% \changes{v1.5g}{2020/05/15}{Allow \cs{par} in the argument (gh/335)}
% \begin{macrocode}
-\def\typeout#1{\begingroup\set@display@protect
- \immediate\write\@unused{#1}\endgroup}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\typeout}{Allow "par" in \typeout}%
+\protected\long\def\typeout#1{\begingroup
+ \set@display@protect
+ \def\par{^^J^^J}%
+ \immediate\write\@unused{#1}\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\typeout}{Allow "par" in \typeout}%
+%<latexrelease>
+%<latexrelease>\def\typeout#1{\begingroup\set@display@protect
+%<latexrelease> \immediate\write\@unused{#1}\endgroup}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -1560,6 +1576,7 @@
% \changes{v1.0g}{1994/04/12}
% {Define \cs{@dischyph}, was previously in ltboxes.dtx}
% \changes{v1.5b}{2017/03/27}{Define \cs{@dischyph} after \cs{-}}
+% \changes{v1.5h}{2020/05/11}{Do not overwrite \cs{-} under Lua\TeX}
% \end{macro}
% Moved here to be after the definition of |\DeclareRobustCommand|.
%
@@ -1589,35 +1606,56 @@
% older \LaTeX\ definition accessible via \textsf{latexrelease}
% as usual.
%
-% \begin{macrocode}
-%</2ekernel>
-%<latexrelease>\IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}%
-% \end{macrocode}
+% In Lua\LaTeX\ the primitive definition of \cs{-} is used directly
+% because it's use of extended hyphenation parameters means that \cs{-}
+% works correctly even with \cs{hyphenchar} set to $-1$. This change
+% makes \cs{-} under Lua\LaTeX\ compatible with language specific
+% hyphenation characters.
+%
% Temporary definition of |\@latex@info|, final definition is later.
% \begin{macrocode}
-%<*2ekernel>
\def\@latex@info#1{}
-%</2ekernel>
% \end{macrocode}
%
% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2020/10/01}{\-}{Use primitive \- in Lua\LaTeX}%
%<*2ekernel|latexrelease>
-\DeclareRobustCommand{\-}{%
- \discretionary{%
- \char \ifnum\hyphenchar\font<\z@
- \defaulthyphenchar
- \else
- \hyphenchar\font
- \fi
- }{}{}%
-}
-\let\@dischyph=\-
+\ifx\directlua\@undefined
+ \DeclareRobustCommand{\-}{%
+ \discretionary{%
+ \char \ifnum\hyphenchar\font<\z@
+ \defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}%
+ }
+\else
+ \let\-\@@hyph
+\fi
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}%
+%<latexrelease>\DeclareRobustCommand{\-}{%
+%<latexrelease> \discretionary{%
+%<latexrelease> \char \ifnum\hyphenchar\font<\z@
+%<latexrelease> \defaulthyphenchar
+%<latexrelease> \else
+%<latexrelease> \hyphenchar\font
+%<latexrelease> \fi
+%<latexrelease> }{}{}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}{\-}{Use \hyphenchar in \-}%
%<latexrelease>\def\-{\discretionary{-}{}{}}
-%<latexrelease>\let\@dischyph=\-
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+\let\@dischyph=\-
+%</2ekernel|latexrelease>
%<*2ekernel>
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex-dev/base/ltexpl.dtx b/macros/latex-dev/base/ltexpl.dtx
index e86b80acaf..5e726298b2 100644
--- a/macros/latex-dev/base/ltexpl.dtx
+++ b/macros/latex-dev/base/ltexpl.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltexpl.dtx}
- [2020-03-05 v1.1 LaTeX Kernel (expl3-dependent code)]
+ [2020-05-03 v1.2b LaTeX Kernel (expl3-dependent code)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -75,7 +75,8 @@
% \changes{v1.0a}{2020/03/02}
% {Don't load expl3 if already in the format (gh/295)}
% \changes{v1.1}{2020/03/05}
-% {Load xparse.ltx if \cs{NewDocumentCommand} is not defined by expl3.ltx}
+% {Load xparse.ltx if \cs{NewDocumentCommand} is not defined
+% by expl3.ltx}
% \begin{macrocode}
\expandafter\ifx\csname tex\string _let:D\endcsname\relax
\IfFileExists{expl3.ltx}
@@ -111,6 +112,44 @@
\fi
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \subsection{Using expl3 code}
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@expl@tl@trim@spaces@apply@@nN}
+%<latexrelease> {l3 macro for use in include}%
+% \end{macrocode}
+% In order to ease the implemantation of some new features in
+% \LaTeXe\ we may (temporarily) use some coding based on the
+% \pkg{expl3}-code.
+% Such macros will eventually vanish and may be changed
+% unannounced. They are there for internal use in the \LaTeXe\
+% kernel and are not meant to be used in third-party
+% packages. These macros will always have the \verb|@expl@|
+% prefix in their name.
+%
+% \changes{v1.2a}{2020/05/02}
+% {Define a macro based on l3 language to support inclusion of
+% files with space in the name (gh/217)}
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_new_eq:NN \@expl@tl@trim@spaces@apply@@nN \tl_trim_spaces_apply:nN
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@expl@tl@trim@spaces@apply@@nN}
+%<latexrelease> {l3 macro for use in include}%
+%<latexrelease>
+%<latexrelease>\let\@expl@tl@trim@spaces@apply@@nN\@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
%
diff --git a/macros/latex-dev/base/ltfiles.dtx b/macros/latex-dev/base/ltfiles.dtx
index 33594a7b91..8e9611d918 100644
--- a/macros/latex-dev/base/ltfiles.dtx
+++ b/macros/latex-dev/base/ltfiles.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2019/11/11 v1.2f LaTeX Kernel (File Handling)]
+ [2020-05-05 v1.2g LaTeX Kernel (File Handling)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfiles.dtx}
@@ -542,15 +542,32 @@
% \begin{macro}{\includeonly}
% \changes{v1.0p}{1995/04/22}{Allow blanks in argument}
% \changes{v1.2a}{2019/07/01}{Support UTF-8}
+% \changes{v1.2g}{2020/05/02}{Improved support for spaces in filenames
+% (gh/217)}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\includeonly}{Spaces in file names}%
\def\includeonly#1{%
\@partswtrue
- \set@curr@file{\zap@space#1 \@empty}%
- \let\@partlist\@curr@file
+% \end{macrocode}
+% Because the argument to |\includeonly| is a comma-separated list
+% of filenames where there may be comma's precedeing some of the
+% filenames or trailing them. Therefore we need to take the list
+% apart, remove the unwanted spaces while leaving the spaces
+% \emph{in} the filenames intact.
+% \begin{macrocode}
+ \let\@partlist\@empty
+ \@for\reserved@a:=#1 \do
+ {
+ \expandafter\set@curr@file@trim@spaces\expandafter{\reserved@a}%
+ \ifx\@partlist\@empty
+ \edef\@partlist{\@curr@file}%
+ \else
+ \edef\@partlist{\@partlist,\@curr@file}%
+ \fi
+ }%
}
\@onlypreamble\includeonly
% \end{macrocode}
@@ -572,21 +589,68 @@
%
% Made |\include| check for being used inside an |\include|'d file, as
% this will not work and cause surprising results.
+% \changes{v1.2g}{2020/05/02}{Get rid of leading and trailing spaces
+% from the filename (gh/217)}
+% \changes{v1.2g}{2020-05-02}{Pass the filename to \cs{@include} by
+% value instead of by reference (gh/217)}
% \begin{macrocode}
\def\include#1{\relax
\ifnum\@auxout=\@partaux
\@latex@error{\string\include\space cannot be nested}\@eha
\else
- \set@curr@file{#1 }%
- \expandafter\@include\@curr@file
+ \set@curr@file@trim@spaces{#1}%
+% \end{macrocode}
+% For historical reasons \cs{@include} expects an argument
+% delimited by a space. This is kept (though uncessary now) to avoid
+% errors in other packages that use \cs{@include} directly.
+% \begin{macrocode}
+ \expandafter\@include\expandafter{\@curr@file} % deliberate space
\fi}
% \end{macrocode}
% \end{macro}
%
%
+%
+% \begin{macro}{\set@curr@file@trim@spaces}
+%
+% For |\include| and |\includeonly| we need a variant that removes
+% any leading and trailing spaces from the filename, while leaving
+% any spaces \emph{inside} the filename intact. In order simplify
+% the implementaion we borrow some code from the \texttt{expl3}
+% language, \textbf{\emph{beware}: this may change unannounced}.
+% \begin{macrocode}
+\def\set@curr@file@trim@spaces#1{%
+ \@expl@tl@trim@spaces@apply@@nN {#1} \set@curr@file }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\includeonly}{Spaces in file names}%
+%<latexrelease>
+%<latexrelease>\def\includeonly#1{%
+%<latexrelease> \@partswtrue
+%<latexrelease> \set@curr@file{\zap@space#1 \@empty}%
+%<latexrelease> \let\@partlist\@curr@file
+%<latexrelease> }
+%<latexrelease>
+%<latexrelease>\def\include#1{\relax
+%<latexrelease> \ifnum\@auxout=\@partaux
+%<latexrelease> \@latex@error{\string\include\space cannot be nested}\@eha
+%<latexrelease> \else
+%<latexrelease> \set@curr@file{#1 }%
+%<latexrelease> \expandafter\@include\@curr@file
+%<latexrelease> \fi}
+%<latexrelease>
+%<latexrelease>\let\set@curr@file@trim@spaces\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\includeonly}{Spaces in file names}%
%<latexrelease>\def\includeonly#1{%
@@ -604,11 +668,20 @@
%
% \begin{macro}{\@include}
+% \changes{v1.2g}{2020/05/02}{Support spaces in filenames by enclosing
+% the names of \texttt{.aux}-files in quotes (gh/217)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@include}{Spaces in file names}%
+% \end{macrocode}
+%
% \begin{macrocode}
\def\@include#1 {%
\clearpage
\if@filesw
- \immediate\write\@mainaux{\string\@input{#1.aux}}%
+ \immediate\write\@mainaux{\string\@input{"#1.aux"}}%
\fi
\@tempswatrue
\if@partsw
@@ -620,7 +693,7 @@
\if@tempswa
\let\@auxout\@partaux
\if@filesw
- \immediate\openout\@partaux #1.aux
+ \immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}%
\fi
\@input@{#1.tex}%
@@ -640,6 +713,42 @@
\@nameuse{cp@#1}%
\fi
\let\@auxout\@mainaux}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@include}{Spaces in file names}%
+%<latexrelease>\def\@include#1 {%
+%<latexrelease> \clearpage
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\write\@mainaux{\string\@input{#1.aux}}%
+%<latexrelease> \fi
+%<latexrelease> \@tempswatrue
+%<latexrelease> \if@partsw
+%<latexrelease> \@tempswafalse
+%<latexrelease> \edef\reserved@b{#1}%
+%<latexrelease> \@for\reserved@a:=\@partlist\do
+%<latexrelease> {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
+%<latexrelease> \fi
+%<latexrelease> \if@tempswa
+%<latexrelease> \let\@auxout\@partaux
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\openout\@partaux #1.aux
+%<latexrelease> \immediate\write\@partaux{\relax}%
+%<latexrelease> \fi
+%<latexrelease> \@input@{#1.tex}%
+%<latexrelease> \clearpage
+%<latexrelease> \@writeckpt{#1}%
+%<latexrelease> \if@filesw
+%<latexrelease> \immediate\closeout\@partaux
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \deadcycles\z@
+%<latexrelease> \@nameuse{cp@#1}%
+%<latexrelease> \fi
+%<latexrelease> \let\@auxout\@mainaux}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -698,8 +807,8 @@
% the code in \texttt{utf8.def}). By setting \cs{escapchar} to
% \texttt{-1} we ensure that we don't get a backslash in front. As a
% result we end up with all characters as catcode 12 (plus
-% spaces). We then sometimes add quotes around the contruct
-% (removing any existing inner quotes. Somes we only remove the
+% spaces). We then sometimes add quotes around the construct
+% (removing any existing inner quotes. Sometimes we only remove the
% quotes if they have been supplied by the user. There is clearly
% some room for improvement.
%
diff --git a/macros/latex-dev/base/ltfloat.dtx b/macros/latex-dev/base/ltfloat.dtx
index 23c3f464d3..dee9a10197 100644
--- a/macros/latex-dev/base/ltfloat.dtx
+++ b/macros/latex-dev/base/ltfloat.dtx
@@ -31,7 +31,7 @@
%
%<*driver>
% \fi
-\ProvidesFile{ltfloat.dtx}[2015/02/21 v1.2c LaTeX Kernel (Floats)]
+\ProvidesFile{ltfloat.dtx}[2020/04/09 v1.2d LaTeX Kernel (Floats)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfloat.dtx}
@@ -1327,13 +1327,36 @@
% always start with a font selection command, to activate the font
% size switch.
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@textsuperscript}{superscript baseline}%
\def\@textsuperscript#1{%
- {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
+ {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@textsuperscript}{superscript baseline}%
+%<latexrelease>
+%<latexrelease>\def\@textsuperscript#1{%
+%<latexrelease> {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+%
+%
+%
+%
+%
% \begin{macro}{\textsubscript}
% \changes{v1.2a}{2014/12/30}{Command added (latexrelease)}
+% \changes{v1.2d}{2020/04/09}{Set non-zero baseline (gh/249)}
% \begin{macrocode}
%</2ekernel>
%<latexrelease>\IncludeInRelease{2015/01/01}%
@@ -1345,27 +1368,54 @@
\DeclareRobustCommand*\textsubscript[1]{%
\@textsubscript{\selectfont#1}}%
% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\textsubscript}{\textsubscript}%
+%<latexrelease>\let\textsubscript\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
% \end{macro}
%
+%
+%
+%
% \begin{macro}{\@textsubscript}
% \changes{v1.2a}{2014/12/30}{Command added (latexrelease)}
-%
+% \changes{v1.2d}{2020/04/09}{Set non-zero baseline (gh/249)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@textsubscript}{subscript baseline}%
\def\@textsubscript#1{%
- {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
+ {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\@textsubscript}{subscript baseline}%
+%<latexrelease>
+%<latexrelease>\def\@textsubscript#1{%
+%<latexrelease> {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
% \end{macrocode}
-% \end{macro}
%
% \begin{macrocode}
-%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\textsubscript}{\textsubscript}%
-%<latexrelease>\let\textsubscript\@undefined
+%<latexrelease> {\@textsubscript}{subscript baseline}%
%<latexrelease>\let\@textsubscript\@undefined
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
+% \end{macro}
+%
+%
%
% \begin{macro}{\footnotesep}
% \begin{macrocode}
diff --git a/macros/latex-dev/base/ltfssaxes.dtx b/macros/latex-dev/base/ltfssaxes.dtx
index 58d9aa159e..08a0ff1b4c 100644
--- a/macros/latex-dev/base/ltfssaxes.dtx
+++ b/macros/latex-dev/base/ltfssaxes.dtx
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssaxes.dtx}
- [2020/03/02 v1.0e LaTeX Kernel (NFSS Axes handing)]
+ [2020/05/19 v1.0f LaTeX Kernel (NFSS Axes handing)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -695,7 +695,7 @@
%
% \begin{macro}{\fontseriesforce}
% To change unconditionally to a new series you can use
-% \cs{fontseriesforce}. If course, if the series doesn't exist for
+% \cs{fontseriesforce}. Of course, if the series doesn't exist for
% the current family substitution still happens, but there is not
% dependency on the current series.
% \changes{v1.0c}{2020/02/10}{Switch \cs{if@forced@series} added}
@@ -881,7 +881,16 @@
,ulm,elm,lm,slm,mm,sbm,bm,ebm,ubm,muc,mec,mc,msc,msx,mx,mex,mux,{}{},#1,}%
\edef\in@@{\the\series@check@toks}%
\ifx\in@@\@empty
- \def#2{#1}%
+% \end{macrocode}
+% The default definition for \cs{bfdefault} etc is actually
+% \texttt{b\cs{@empty}} so that we can detect if the user has
+% changed the default. However that means a) the above test will
+% definitely fail (maybe something to change) and b) we better use
+% \cs{edef} on the next line to get rid of it as otherwise the test
+% against \verb=#2= (e.g. \cs{bfdef@ult}) will fail in other places.
+% \changes{v1.0e}{2020/05/19}{Need to use \cs{edef} (gh/336)}
+% \begin{macrocode}
+ \edef#2{#1}%
\else
\edef#2{\expandafter\series@drop@one@m #1m\series@drop@one@m}%
\fi
diff --git a/macros/latex-dev/base/ltfssbas.dtx b/macros/latex-dev/base/ltfssbas.dtx
index 5715106ca6..4a6afca3ac 100644
--- a/macros/latex-dev/base/ltfssbas.dtx
+++ b/macros/latex-dev/base/ltfssbas.dtx
@@ -1850,7 +1850,7 @@
% Finally, it is not possible to simply call the new definition
% since we
% have an argument (the third argument of |\use@mathgroup|
-% or more exactly the argument od |\math@egroup| if the {\ttfamily
+% or more exactly the argument of |\math@egroup| if the {\ttfamily
% margid} option is in force)
% which would swallow our closing |\fi|. So
% we use the |\expandafter| technique to remove the |\fi|
diff --git a/macros/latex-dev/base/ltfssdcl.dtx b/macros/latex-dev/base/ltfssdcl.dtx
index 951c6de2e5..291cd1368f 100644
--- a/macros/latex-dev/base/ltfssdcl.dtx
+++ b/macros/latex-dev/base/ltfssdcl.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2020/01/20 v3.0t LaTeX Kernel (NFSS Declarative Interface)]
+ [2020/03/19 v3.0v LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -465,7 +465,7 @@
% \changes{v3.0q}{2015/03/18}{Introduce \cs{e@mathgroup@top}}
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease>\IncludeInRelease{2020/10/01}
%<latexrelease> {\document@select@group}{\document@select@group}%
%<*2ekernel|latexrelease>
\def\document@select@group#1#2#3#4{%
@@ -491,13 +491,54 @@
\@eha
\fi
\else \expandafter\non@alpherr\fi
- #1{#4}%
+% \end{macrocode}
+% If the legacy interface is used, e.g., \verb=$\sf -1$= the math
+% alphabet \verb=#1= does not take an argument so we better do not
+% surround \verb=#4= with braces, because then we get
+% \verb={\relax}= into the formula and introduce an extra Ord
+% atom. The two different cases can be distinguished by looking at
+% the current value of \cs{math@bgroup}.
+% \changes{v3.0u}{2020/03/19}{fix for (gnats/3357)}
+% \begin{macrocode}
+ \expandafter#1\ifx\math@bgroup\bgroup{#4}\else#4\fi
}%
}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2015/01/01}
+%<latexrelease> {\document@select@group}{\document@select@group}%
+%<latexrelease>
+%<latexrelease>\def\document@select@group#1#2#3#4{%
+%<latexrelease> \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
+%<latexrelease> {%
+%<latexrelease> \ifmmode
+%<latexrelease> \ifnum\csname c@mv@\math@version\endcsname<\e@mathgroup@top
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m@ne
+%<latexrelease> \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3%
+%<latexrelease> \globaldefs\@ne \math@fonts
+%<latexrelease> \endgroup
+%<latexrelease> \expandafter\extract@alph@from@version
+%<latexrelease> \csname mv@\math@version\expandafter\endcsname
+%<latexrelease> \expandafter{\number\csname
+%<latexrelease> c@mv@\math@version\endcsname}%
+%<latexrelease> #1%
+%<latexrelease> \global\advance\csname c@mv@\math@version\endcsname\@ne
+%<latexrelease> \else
+%<latexrelease> \let#1\relax
+%<latexrelease> \@latex@error{Too many math alphabets used
+%<latexrelease> in version \math@version}%
+%<latexrelease> \@eha
+%<latexrelease> \fi
+%<latexrelease> \else \expandafter\non@alpherr\fi
+%<latexrelease> #1{#4}%
+%<latexrelease> }%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>
%<latexrelease>\IncludeInRelease{0000/00/00}
%<latexrelease> {\document@select@group}{\document@select@group}%
+%<latexrelease>
%<latexrelease>\def\document@select@group#1#2#3#4{%
%<latexrelease> \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi
%<latexrelease> {%
@@ -582,17 +623,19 @@
% \begin{macrocode}
\let\select@group\document@select@group
% \end{macrocode}
-% Install the default font attributes they are currently pointing
-% to error font shape.
+% Install the default font attributes as they are currently pointing
+% to error font face. We can speed up the process by just using
+% \cs{edef}, thereby avoiding all kind of extra processing.
% Don't use |\reset@font| since that would trigger |\selectfont|.
+% \changes{v3.0v}{2020/04/13}{Small update for speed.}
% \begin{macrocode}
- \fontencoding{\encodingdefault}%
- \fontfamily{\familydefault}%
- \fontseries{\seriesdefault}%
- \fontshape{\shapedefault}%
+ \fontencoding\encodingdefault
+ \edef\f@family{\familydefault}%
+ \edef\f@series{\seriesdefault}%
+ \edef\f@shape{\shapedefault}%
% \end{macrocode}
-% kill all macros not longer needed.
-% we need to add many more!!!!!!
+% Drop stuff not longer needed.
+% We need to add many more!!!!!!
% \begin{macrocode}
\everyjob{}%
}
diff --git a/macros/latex-dev/base/ltfssini.dtx b/macros/latex-dev/base/ltfssini.dtx
index 3947b4d953..952025375b 100644
--- a/macros/latex-dev/base/ltfssini.dtx
+++ b/macros/latex-dev/base/ltfssini.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssini.dtx}
- [2020/03/02 v3.1k LaTeX Kernel (NFSS Initialisation)]
+ [2020/05/19 v3.2a LaTeX Kernel (NFSS Initialisation)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -288,8 +288,16 @@
\ifx\reserved@a\@empty
\ifcsname #2series\endcsname % supported are
% \[md/bf]default
+% \end{macrocode}
+% Adding \cs{@empty} allows us to detect if the default gets
+% redefined with \cs{renewcommand} or \cs{def} by the user.
+% \changes{v3.1k}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \begin{macrocode}
\expandafter\def
- \csname #2default\endcsname{#3}%
+ \csname #2default\endcsname{#3\@empty}%
+ \expandafter\def
+ \csname #2default@previous\endcsname{#3\@empty}%
\else
% \end{macrocode}
%
@@ -381,6 +389,11 @@
% \begin{macro}{\expand@font@defaults}
+% \begin{macro}{\rm@def@ult}
+% \begin{macro}{\sf@def@ult}
+% \begin{macro}{\tt@def@ult}
+% \begin{macro}{\md@def@ult}
+% \begin{macro}{\bf@def@ult}
%
% The family specific defaults are fully expanded, i.e., they are
% defined via \cs{edef} inside \cs{DeclareFontSeriesDefault}.
@@ -402,10 +415,19 @@
% \begin{macrocode}
\series@maybe@drop@one@m\bfdefault\bfdef@ult
\series@maybe@drop@one@m\mddefault\mddef@ult
- \edef\famdef@ult{\familydefault}%
+% \end{macrocode}
+% Formats that set up parallel fonts, e.g., for Japanese, can use
+% this hook to add additional code here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+% \begin{macrocode}
+ \@expandfontdefaultshook
}
% \end{macrocode}
-%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
@@ -425,6 +447,41 @@
% of \cs{fontseries} argument so that it is not done several times}
% \begin{macrocode}
\expand@font@defaults
+% \end{macrocode}
+% If \cs{bfdefault} and \cs{befdefault@previous} are different then
+% the default got changed directly through the legacy interface
+% (i.e., via \cs{def} or \cs{renewcommand}. In that case we reset
+% all meta family defaults so that the document behaves like it was
+% the case before the new mechanism was introduced.
+% \changes{v3.1k}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
+% \begin{macrocode}
+ \ifx\bfdefault\bfdefault@previous\else
+% \end{macrocode}
+% We add \cs{@empty} and then let \cs{bfdefault@previous} to
+% \cs{bfdefault} so that we can detect any further change.
+% \begin{macrocode}
+ \expandafter\def\expandafter\bfdefault
+ \expandafter{\bfdefault\@empty}%
+ \let\bfseries@previous\bfdefault
+% \end{macrocode}
+% And we reset the meta family defaults (\cs{bfdef@ult} is an
+% expanded version of \cs{bfdefault}.
+% \begin{macrocode}
+ \let\bfseries@rm\bfdef@ult
+ \let\bfseries@sf\bfdef@ult
+ \let\bfseries@tt\bfdef@ult
+% \end{macrocode}
+%
+% Formats that set up parallel fonts, e.g., for Japanese, can use
+% this hook to add resets here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+% \begin{macrocode}
+ \@setbfseriesdefaultshook
+ \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
\ifx\f@family\rmdef@ult \fontseries\bfseries@rm
\else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
\else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
@@ -444,10 +501,26 @@
% This document command switches to the medium series.
% \changes{v3.1i}{2020/02/18}{Make the \cs{ifx} selection outside
% of \cs{fontseries} argument so that it is not done several times}
+% \changes{v3.1k}{2020/03/19}{Support legacy use of \cs{bfdefault}
+% and \cs{mddefault} (gh/306)}
% \begin{macrocode}
\DeclareRobustCommand\mdseries{%
\not@math@alphabet\mdseries\relax
\expand@font@defaults
+ \ifx\mddefault\mddefault@previous\else
+ \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}%
+ \let\mdseries@previous\mddefault
+ \let\mdseries@rm\mddef@ult
+ \let\mdseries@sf\mddef@ult
+ \let\mdseries@tt\mddef@ult
+% \end{macrocode}
+%
+% Formats that set up parallel fonts, e.g., for Japanese, can use
+% this hook to add resets here.
+% \changes{v3.1m}{2020/04/06}{Hook added (gh/306)}
+% \begin{macrocode}
+ \@setmdseriesdefaultshook
+ \fi
\ifx\f@family\rmdef@ult \fontseries\mdseries@rm
\else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
\else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
@@ -610,11 +683,20 @@
% \end{macro}
%
%
+% \begin{macro}{\@expandfontdefaultshook}
+% \begin{macro}{\@setbfseriesdefaultshook}
+% \begin{macro}{\@setmdseriesdefaultshook}
% \begin{macro}{\@rmfamilyhook}
% \begin{macro}{\@sffamilyhook}
% \begin{macro}{\@ttfamilyhook}
% By default the hooks do nothing.
% \begin{macrocode}
+\let\@expandfontdefaultshook\@empty
+\let\@setbfseriesdefaultshook\@empty
+\let\@setmdseriesdefaultshook\@empty
+% \end{macrocode}
+%
+% \begin{macrocode}
\let\@rmfamilyhook\@empty
\let\@sffamilyhook\@empty
\let\@ttfamilyhook\@empty
@@ -622,6 +704,9 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
%
@@ -873,23 +958,42 @@
% \end{macrocode}
%
% If the document preamble has changed the \cs{familydefault} or if
-% the if the \cs{rmdefault} contains a new font family, we have to
+% the if the \cs{rmdefault} contains a new font family, we may have to
% adjust the series defaults accordingly, before starting
% typesetting.
-%
-% On the other hand if we still typeset in CM or LM then
-% \cs{bfdefault} is wrong since it is now saying \texttt{b} and not
-% \texttt{bx}.
-
-% To fix this we run \cs{rmfamily}, \cs{sffamily} or
-% \cs{ttfamily} depending on the situation and this will correct
-% the setup for us.
-% \begin{macrocode}
- \expand@font@defaults
- \ifx\famdef@ult\rmdef@ult \rmfamily
- \else\ifx\famdef@ult\sfdef@ult \sffamily
- \else\ifx\famdef@ult\ttdef@ult \ttfamily
- \fi\fi\fi
+%
+% Similarly, if the user has changed the \cs{mddefault} or the
+% medium series for the family selected as document font we may
+% also have to adjust the \cs{seriesdefault}.
+%
+% On the other hand if the document font is still CM or LM then
+% \cs{bfdefault} is wrong, because it is now saying \texttt{b} and not
+% \texttt{bx} as it should for such fonts.
+%
+% To fix all this we first run \cs{reset@font} (the internal kernel
+% name for \cs{normalfont}). This will set up the document encoding,
+% family, series and shape based on the current values of
+% \cs{encodingdefault}, \cs{familydefault}, \cs{seriesdefault} and
+% \cs{shapedefault}.
+% However, if the family (from \cs{familydefault}) has special medium
+% default we should switch to that (and not use what is current
+% value from \cs{seriesdefault}). This can be achieved by afterwards
+% calling \cs{mediumseries} and then changing \cs{seriesdefault} to
+% the now current series value (in \cs{f@series}).
+%
+% But what should happen if \cs{seriesdefault} got explicitly
+% changed? In that case the explicit change should surive and we
+% should not alter \cs{seriesdefault}. This is solved by comparing
+% the current value of \cs{seriesdefault} with a kernel version
+% saved in the format and if they differ we do not call
+% \cs{mdseries} or change \cs{seriesdefault}.
+% \changes{v3.1n}{2020/04/13}{Handling \cs{seriesdefault} changes (gh/315)}
+% \begin{macrocode}
+ \reset@font
+ \ifx\seriesdefault\seriesdefault@kernel
+ \mdseries
+ \let\seriesdefault\f@series
+ \fi
}%
% \end{macrocode}
% \end{macro}
@@ -948,6 +1052,9 @@
%<latexrelease> {\not@math@alphabet\ttfamily\mathtt
%<latexrelease> \fontfamily\ttdefault\selectfont}
%<latexrelease>
+%<latexrelease>\let\@expandfontdefaultshook\@undefined
+%<latexrelease>\let\@setbfseriesdefaultshook\@undefined
+%<latexrelease>\let\@setmdseriesdefaultshook\@undefined
%<latexrelease>\let\@rmfamilyhook\@undefined
%<latexrelease>\let\@sffamilyhook\@undefined
%<latexrelease>\let\@ttfamilyhook\@undefined
@@ -963,9 +1070,166 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\IfFontSeriesContextTF}
+%
+% With the ability for \cs{bfseries} or \cs{mdseries} to be mapped
+% to different NFSS axis values it becomes important to have the
+% ability to determine the current context as we can no longer look
+% at \cs{f@series} to answer a question such as ``am I currently
+% typsetting in a bold typeface?''
+%
+% This is provided by the test \cs{IfFontSeriesContextTF}. It takes
+% three arguments:
+% \begin{itemize}
+% \item
+% The context we try to check (either \texttt{bf} for bold or
+% \texttt{md} for medium, i.e., the same that can go into the
+% first mandatory argument of \cs{DeclareFontSeriesDefault}),
+%
+% \item
+% what to do if we are in this context (true case) and
+%
+% \item
+% what to do if we are not (false case).
+% \end{itemize}
+% This allows you to define commands like \cs{IfBold}, e.g.,
+%\begin{verbatim}
+% \newcommand\IfBold[2]{\IfSeriesContextTF{bf}{#1}{#2}}
+%\end{verbatim}
+% and then do
+%\begin{verbatim}
+% This is \IfBold{bold}{non-bold} text.
+%\end{verbatim}
+% and get the appropriate result.
+%
+% \changes{v3.2a}{2020/05/19}{Macros added (gh/335)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\IfFontSeriesContext}{Font series context}%
+\DeclareRobustCommand\IfFontSeriesContextTF[1]{%
+ \expand@font@defaults
+% \end{macrocode}
+% In the beginning we haven't found the context we are loking for.
+% \begin{macrocode}
+ \@font@series@contextfalse
+% \end{macrocode}
+% We store the requested context away for use in the tests.
+% \begin{macrocode}
+ \def\requested@test@context{#1}%
+% \end{macrocode}
+% The next definition is there to ensure that get a final match
+% during testing
+% even if the current family is non of the meta families
+% (\texttt{rm}, \texttt{sf} or \texttt{tt}). This will then
+% basically tests if the current font family matches the overall default.
+% \begin{macrocode}
+ \expandafter\edef\csname ??def@ult\endcsname{\f@family}%
+% \end{macrocode}
+% Then we run through the meta family list (currently containing
+% just the three values) followed by the artifical meta family
+% \texttt{??} and test each of them in turn using
+% \cs{test@font@series@context} as the testing command.
+% \begin{macrocode}
+ \let\@elt\test@font@series@context
+ \@meta@family@list
+ \@elt{??}%
+ \let\@elt\relax
+% \end{macrocode}
+% Following that we evaluate the status of
+% \cs{if@font@series@context} to determine which of the remaining
+% arguments (true/false case) we have to execute.
+% \begin{macrocode}
+ \if@font@series@context
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\test@font@series@context}
+% This tests the context (stored in \cs{requested@test@context})
+% and updates the bookean if the right context is found.
+% \begin{macrocode}
+\def\test@font@series@context#1{%
+% \end{macrocode}
+% First task is to figure out whether the current family matches
+% \cs{rmfamily}, \cs{sffamily}, etc.\ so in \cs{reserved@a} we
+% store the value of \cs{rmdef@ult} (or whatever the given meta
+% family is) and compare that to \cs{f@family}.
+% \begin{macrocode}
+ \edef\reserved@a{\csname #1def@ult\endcsname}%
+ \ifx\f@family\reserved@a
+% \end{macrocode}
+% If they match we have found the right meta family so we don't
+% need to test any of the remaining meta family and therefore
+% change \cs{@elt} to \cs{@gobble}.
+% \begin{macrocode}
+ \let\@elt\@gobble
+% \end{macrocode}
+% Now we have to test if \cs{f@series} matches the requested
+% context (e.g., whether \cs{bfseries@rm} has that value if the
+% current meta family is \texttt{rm} and we are looking for the
+% \texttt{bf} context).
+% \begin{macrocode}
+ \expandafter\ifx
+ \csname\requested@test@context series@#1\endcsname\f@series
+% \end{macrocode}
+% If yes we change the boolean and are done.
+% \begin{macrocode}
+ \@font@series@contexttrue
+% \end{macrocode}
+% If not then maybe the reason is that nothing special was set up
+% for that meta family so we also check now check if \cs{f@series}
+% matches the overall default (e.g., \cs{bfdef@ult} if we are
+% looking for the bold context). If that matches we change the boolean.
+% \begin{macrocode}
+ \else
+ \expandafter\ifx
+ \csname\requested@test@context def@ult\endcsname\f@series
+ \@font@series@contexttrue
+ \fi\fi\fi
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\if@font@series@context}
+% The boolean to signal if we found the requested font series context.
+% \begin{macrocode}
+\newif\if@font@series@context
+% \end{macrocode}
+% \end{macro}
%
%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\IfFontSeriesContext}{Font series context}%
+%<latexrelease>
+%<latexrelease>\let\IfFontSeriesContextTF\@undefined
+%<latexrelease>\let\test@font@series@context\@undefined
+%<latexrelease>\let\if@font@series@context\@undefined
+%<latexrelease>\let\@font@series@contexttrue\@undefined
+%<latexrelease>\let\@font@series@contextfalse\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+
+
+
%
% \section{Supporting nested emphasis}
%
@@ -1565,6 +1829,26 @@
% \end{macrocode}
%
%
+%
+% \begin{macro}{\seriesdefault}
+% \begin{macro}{\seriesdefault@kernel}
+% After \cs{seriesdefault} got defined inside \texttt{fonttext.ltx}
+% or a \texttt{.cfg} file overwriting it, we alter its value by
+% appending \cs{@empty} to it. This will vanish if expanded but
+% allows us to check if the default gets altered (even to the same
+% value) in the document preamble. All we have to do is to save the
+% current value somewhere and later compare the two. For this we
+% use \cs{seriesdefault@kernel}.
+% \changes{v3.1n}{2020/04/13}{Handling \cs{seriesdefault} changes (gh/315)}
+% \begin{macrocode}
+\expandafter\def\expandafter\seriesdefault\expandafter{\seriesdefault\@empty}
+\let\seriesdefault@kernel\seriesdefault
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
% \begin{macro}{\@acci}
% \begin{macro}{\@accii}
% \begin{macro}{\@acciii}
diff --git a/macros/latex-dev/base/ltlists.dtx b/macros/latex-dev/base/ltlists.dtx
index e8c9ebc16b..653e4e2edd 100644
--- a/macros/latex-dev/base/ltlists.dtx
+++ b/macros/latex-dev/base/ltlists.dtx
@@ -31,7 +31,7 @@
%<*driver>
% \fi
\ProvidesFile{ltlists.dtx}
- [2015/05/10 v1.0t LaTeX Kernel (List Environments)]
+ [2020/04/24 v1.0t LaTeX Kernel (List Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltlists.dtx}
@@ -546,6 +546,7 @@
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}
%
+% \begin{environment}{list}
% \begin{macro}{\list}
% \begin{macrocode}
\def\list#1#2{%
@@ -572,6 +573,7 @@
\ignorespaces}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\par@deathcycles}
% \begin{macrocode}
@@ -626,8 +628,9 @@
% \end{macrocode}
% \end{macro}
%
-% \changes{0.0}{1992/03/18}{RmS: added \cs{@nmbrlistfalse}}
+% \begin{environment}{trivlist}
% \begin{macro}{\trivlist}
+% \changes{0.0}{1992/03/18}{RmS: added \cs{@nmbrlistfalse}}
% \begin{macrocode}
\def\trivlist{%
\parsep\parskip
@@ -647,6 +650,7 @@
\def\makelabel##1{##1}}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\endlist}
% \begin{macrocode}
diff --git a/macros/latex-dev/base/ltluatex.dtx b/macros/latex-dev/base/ltluatex.dtx
index 1f9ab8d133..d7ca7d05ec 100644
--- a/macros/latex-dev/base/ltluatex.dtx
+++ b/macros/latex-dev/base/ltluatex.dtx
@@ -28,7 +28,7 @@
\ProvidesFile{ltluatex.dtx}
%</driver>
%<*tex>
-[2020/02/02 v1.1l
+[2020/03/07 v1.1m
%</tex>
%<plain> LuaTeX support for plain TeX (core)
%<*tex>
@@ -1716,6 +1716,7 @@ luatexbase.add_to_callback = add_to_callback
% \changes{v1.0a}{2015/09/24}{Function added}
% \changes{v1.0k}{2015/12/02}{adjust initialisation of cb local (PHG)}
% \changes{v1.0k}{2015/12/02}{Give more specific error messages (PHG)}
+% \changes{v1.1m}{2020/03/07}{Do not call callback.register for user-defined callbacks}
% Remove a function from a callback. First check arguments.
% \begin{macrocode}
local function remove_from_callback(name, description)
@@ -1761,7 +1762,9 @@ local function remove_from_callback(name, description)
)
if #l == 0 then
callbacklist[name] = nil
- callback_register(name, nil)
+ if user_callbacks_defaults[name] == nil then
+ callback_register(name, nil)
+ end
end
return cb.func,cb.description
end
diff --git a/macros/latex-dev/base/ltluatex.pdf b/macros/latex-dev/base/ltluatex.pdf
index 86769bca60..eaada989fa 100644
--- a/macros/latex-dev/base/ltluatex.pdf
+++ b/macros/latex-dev/base/ltluatex.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltmath.dtx b/macros/latex-dev/base/ltmath.dtx
index 86e62e7bf5..c4963cf0c6 100644
--- a/macros/latex-dev/base/ltmath.dtx
+++ b/macros/latex-dev/base/ltmath.dtx
@@ -38,7 +38,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmath.dtx}
- [2020/02/18 v1.2d LaTeX Kernel (Math Setup)]
+ [2020/04/21 v1.2f LaTeX Kernel (Math Setup)]
% \iffalse
%</driver>
%
@@ -509,18 +509,103 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\>}
-% \begin{macro}{\;}
-% \begin{macro}{\!}
+
+
+%
+% \begin{macro}{\tmspace}
+% \begin{macro}{\,}
+% \begin{macro}{\thinspace}
+% \begin{macro}{\!}
+% \begin{macro}{\negthinspace}
+% \begin{macro}{\:}
+% \begin{macro}{\medspace}
+% \begin{macro}{\negmedspace}
+% \begin{macro}{\;}
+% \begin{macro}{\thickspace}
+% \begin{macro}{\negthickspace}
+%
+% Originally \LaTeX{} only provided a small set of spacing commands
+% for use in text and math, some of the commands like \cs{;} were
+% only supported in manth mode. \texttt{amsmath} normalized and
+% provided all of them in text and math. This code has now been
+% moved to the kernel so that it is generally available.
+%
+%
% \begin{macrocode}
-%\def\,{\mskip\thinmuskip} % already defined in ltspace
-\def\>{\mskip\medmuskip}
-\def\;{\mskip\thickmuskip}
-\def\!{\mskip-\thinmuskip}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\tmspace}{amsmath spacing commands}%
+% \end{macrocode}
+% \cs{tmspace} is really meant to be an internal command so it
+% doesn't necessarily has to be robust but it was robust in
+% \texttt{amsmath} so we leave it like that.
+% \changes{v1.2e}{2020/03/07}{Add \texttt{amsmath} math/text spacing
+% commands to the kernel (gh/303)}
+% \begin{macrocode}
+\DeclareRobustCommand\tmspace[3]{%
+ \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax}
+% \end{macrocode}
+% In \texttt{amsmath} the text kern is \texttt{.1667em}. For
+% compatibility reasons we keep the longer one.
+% \begin{macrocode}
+\DeclareRobustCommand\,{\tmspace+\thinmuskip{.16667em}}
+\let\thinspace\,
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\!{\tmspace-\thinmuskip{.16667em}}
+\let\negthinspace\!
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}}
+\let\medspace\:
+% \end{macrocode}
+% \LaTeX{} has a second name for this in its manual:
+% \begin{macrocode}
+\let\>=\:
+\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareRobustCommand\;{\tmspace+\thickmuskip{.2777em}}
+\let\thickspace\;
+\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\tmspace}{amsmath spacing commands}%
+%<latexrelease>
+%<latexrelease>\let\tmspace\@undefined
+%<latexrelease>\DeclareRobustCommand{\,}{%
+%<latexrelease> \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
+%<latexrelease>\DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em }
+%<latexrelease>\DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em }
+%<latexrelease>\def\>{\mskip\medmuskip}
+%<latexrelease>\let\:=\>
+%<latexrelease>\def\;{\mskip\thickmuskip}
+%<latexrelease>\def\!{\mskip-\thinmuskip}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
%
% \begin{macro}{\*}
% \begin{macrocode}
@@ -532,7 +617,7 @@
% Nickname for the medium space since |\>| is not available inside
% \texttt{tabbing}.
% \begin{macrocode}
-\let\:=\>
+%\let\:=\>
% \end{macrocode}
% \end{macro}
%
@@ -884,12 +969,32 @@
\def\@yeqncr{\@testopt\@xeqncr\z@skip}
% \end{macrocode}
%
+% \changes{v1.2f}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@xeqncr}{eqnarray support calc syntax}%
\def\@xeqncr[#1]{%
\ifnum0=`{\fi}%
\@@eqncr
- \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}%
+ \noalign{\penalty\@eqpen\vskip\jot\@vspace@calcify{#1}}%
}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@xeqncr}{eqnarray support calc syntax}%
+%<latexrelease>
+%<latexrelease>\def\@xeqncr[#1]{%
+%<latexrelease> \ifnum0=`{\fi}%
+%<latexrelease> \@@eqncr
+%<latexrelease> \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}%
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
%
% \end{macro}
diff --git a/macros/latex-dev/base/ltmiscen.dtx b/macros/latex-dev/base/ltmiscen.dtx
index 97b1f4a572..5fb4e77d90 100644
--- a/macros/latex-dev/base/ltmiscen.dtx
+++ b/macros/latex-dev/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2019/11/02 v1.1s LaTeX Kernel (Misc. Environments)]
+ [2020/04/24 v1.1t LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -182,6 +182,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{document}
% \begin{macro}{\enddocument}
% \changes{LaTeX2.09}{1993/08/03}
% {Changed redefinition of \cs{global} to redefinition
@@ -294,6 +295,7 @@
\deadcycles\z@\@@end}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\@testdef}
% \begin{macrocode}
@@ -738,10 +740,25 @@
% \end{macro}
%
% \begin{macro}{\@icentercr}
+% \changes{v1.1t}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@icentercr[#1]{\vskip #1\ignorespaces}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@icentercr}{centering, etc support calc}%
+\def\@icentercr[#1]{\@vspace@calcify{#1}\ignorespaces}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@icentercr}{centering, etc support calc}%
+%<latexrelease>
+%<latexrelease>\def\@icentercr[#1]{\vskip #1\ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
-%
% \end{macro}
%
%
@@ -983,6 +1000,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{verbatim}
% \begin{macro}{\verbatim}
% \begin{macro}{\endverbatim}
% (RmS 93/09/19) Protected against `missing item' error message
@@ -993,6 +1011,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\verbatim@font}
% \changes{v0.9a}{1993/11/21}{Macro added}
@@ -1010,7 +1029,7 @@
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2018/12/01}%
-%<latexrelease> {\verbvisiblespace}{Setup visible space for verb}%
+%<latexrelease> {\verbvisiblespace}{Setup visible space for \verb}%
% \end{macrocode}
%
%
@@ -1092,15 +1111,71 @@
% \end{macrocode}
% \end{macro}
%
+%^^A \@sverb was here
+%
+% \begin{environment}{verbatim*}
+% For \texttt{verbatim*} we also set up the correct visible space
+% character definition and then run |\@vobeyspaces|. As this code
+% is not called as part of the normal verbatim environment (the
+% method is done the other way around this time) we don't have to
+% check if space is already active---it shouldn't be.
+% \changes{v1.1o}{2018/10/11}
+% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
+% \begin{macrocode}
+\@namedef{verbatim*}{\@verbatim
+ \@setupverbvisiblespace
+ \frenchspacing\@vobeyspaces\@sxverbatim}
+\expandafter\let\csname endverbatim*\endcsname =\endverbatim
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\verbvisiblespace}{Setup visible space for \verb}%
+%<latexrelease>
+%<latexrelease>\@namedef{verbatim*}{\@verbatim\@sxverbatim}
+%<latexrelease>
+%<latexrelease>\let\asciispace \@undefined
+%<latexrelease>\let\verbvisiblespace \@undefined
+%<latexrelease>\let\@setupverbvisiblespace\@undefined
+%<latexrelease>\let\@verbvisiblespacebox \@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+%
%
% \begin{macro}{\@sverb}
+% \begin{macro}{\@@sverb}
% \changes{v1.0j}{1994/05/10}{Slight change in error message text.}
% Definitions of |\@sverb| and |\@verb| changed so |\verb+ foo+|
% does not lose leading blanks when it comes at the beginning of a line.
% Change made 24 May 89. Suggested by Frank Mittelbach and Rainer
% Sch\"opf.
% \begin{macrocode}
-\def\@sverb#1{%
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@sverb}{Drop spaces before \verb delimiter}%
+% \end{macrocode}
+%
+% If the users types \verb=\verb !~! foo= then surprisingly we would
+% get the space as the delimiter and thus
+% ``\verb=!~!foo='' in the output.
+% To avoid this scenario we check if \verb=#1= has the character
+% code of a space, if so we recurse otherwise we call \cs{@@sverb}
+% (which is the original definition of \cs{@sverb}.
+% \changes{v1.1u}{2020/04/22}{Drop spaces before \cs{verb} delimiter (gh/327)}
+% \begin{macrocode}
+\def\@sverb#1{\if\noexpand#1 \expandafter\@sverb\else\@@sverb{#1}\fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@@sverb#1{%
\catcode`#1\active
\lccode`\~`#1%
\gdef\verb@balance@group{\verb@egroup
@@ -1120,39 +1195,28 @@
\else \@setupverbvisiblespace \@vobeyspaces \fi
}
% \end{macrocode}
-% \end{macro}
-%
-% \begin{environment}{verbatim*}
-% For \texttt{verbatim*} we also set up the correct visible space
-% character definition and then run |\@vobeyspaces|. As this code
-% is not called as part of the normal verbatim environment (the
-% method is done the other way around this time) we don't have to
-% check if space is already active---it shouldn't be.
-% \changes{v1.1o}{2018/10/11}
-% {Provide visible space in \cs{verb*} also for XeTeX and LuaTeX (github/69)}
-% \begin{macrocode}
-\@namedef{verbatim*}{\@verbatim
- \@setupverbvisiblespace
- \frenchspacing\@vobeyspaces\@sxverbatim}
-\expandafter\let\csname endverbatim*\endcsname =\endverbatim
-% \end{macrocode}
-% \end{environment}
-%
-%
-%
+%
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
-%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\verbvisiblespace}{Setup visible space for verb}%
-%<latexrelease>
-%<latexrelease>\@namedef{verbatim*}{\@verbatim\@sxverbatim}
+%<latexrelease>\IncludeInRelease{2018/12/01}%
+%<latexrelease> {\@sverb}{Setup visible space for \verb}%
%<latexrelease>
-%<latexrelease>\let\asciispace \@undefined
-%<latexrelease>\let\verbvisiblespace \@undefined
-%<latexrelease>\let\@setupverbvisiblespace\@undefined
-%<latexrelease>\let\@verbvisiblespacebox \@undefined
+%<latexrelease>\def\@sverb#1{%
+%<latexrelease> \catcode`#1\active
+%<latexrelease> \lccode`\~`#1%
+%<latexrelease> \gdef\verb@balance@group{\verb@egroup
+%<latexrelease> \@latex@error{\noexpand\verb illegal in command argument}\@ehc}%
+%<latexrelease> \aftergroup\verb@balance@group
+%<latexrelease> \lowercase{\let~\verb@egroup}%
+%<latexrelease> \ifnum\catcode`\ =\active
+%<latexrelease> \else \@setupverbvisiblespace \@vobeyspaces \fi
+%<latexrelease>}
+%<latexrelease>\let\@@sverb\@undefined
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@sverb}{Setup visible space for \verb}%
%<latexrelease>\def\@sverb#1{%
%<latexrelease> \catcode`#1\active
%<latexrelease> \lccode`\~`#1%
@@ -1164,8 +1228,8 @@
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
-%
-%
+% \end{macro}
+% \end{macro}
%
%
% \begin{macro}{\@makeother}
diff --git a/macros/latex-dev/base/ltnews.pdf b/macros/latex-dev/base/ltnews.pdf
index ef7aa51e08..ced28ce0e1 100644
--- a/macros/latex-dev/base/ltnews.pdf
+++ b/macros/latex-dev/base/ltnews.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews.tex b/macros/latex-dev/base/ltnews.tex
index c69054aa82..ffc34da26c 100644
--- a/macros/latex-dev/base/ltnews.tex
+++ b/macros/latex-dev/base/ltnews.tex
@@ -30,11 +30,13 @@
% * Fix TOC issue
% 2020/01/30 v1.4b:
% * Fix TOC issue more generally and add page numbers
+% 2020/04/13 v1.4d:
+% * Use titletoc for partial toc'sa in the separate issues
% \fi
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltnews.tex}%
- [2020/01/30 v1.4c Master file for ltnews*.tex (LaTeX Project)]
+ [2020/04/13 v1.4d Master file for ltnews*.tex (LaTeX Project)]
\providecommand*{\lastissue}{32}
@@ -73,10 +75,11 @@
\RequirePackage{hologo}
\RequirePackage{graphicx}
-
\documentclass{ltnews}
\RequirePackage{url,csquotes}
+% 1.4d (JLB) also load the titletoc package
+\RequirePackage{titletoc}
% \small already robust so better not ...
%\expandafter
@@ -88,6 +91,9 @@
\RequirePackage{multicol}
\makeatletter
+% 1.4d (JLB) Titletoc thinks \contentsline has three arguments
+% but it has 4 in our case
+\def\ttl@gobblecontents#1#2#3#4{\ignorespaces}
\newcounter{issue}
\renewcommand*{\theissue}{%
@@ -178,6 +184,9 @@
\makefirsttitle
\pdfbookmark[0]{\contentsname}{toc}
+% 1.4d(JLB) Now that titletoc is used we can limit the depth
+% of the main toc
+\setcounter{tocdepth}{2}
\tableofcontents
\clearpage
@@ -219,14 +228,16 @@
\setcounter{footnote}{0}%
\gobbleopt
}%
+% 1.4d (JLB) Removed the extra lines that were written to the toc-files
\newcommand*{\gobbleopt}[1][]{}%
\let\org@twocolumn\twocolumn
\renewcommand\NeedsTeXFormat[1]{\NeedsTeXFormatdate}% ignore that inside
\newcommand\NeedsTeXFormatdate[1][]{}% % inidividual issues
\renewenvironment{document}{%
\clearpage
+% 1.4d (JLB) Normally |\ltn@tocend| shoud do nothing
+ \let\ltn@tocend\relax
\ifnum\@issue=20 %
- \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
\addtocontents{toc}{%
\protect\makeatletter
}%
@@ -243,19 +254,14 @@
}%
\def\toclevel@subsection{1}%
\def\toclevel@subsubsection{2}%
- \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
\renewcommand*{\tableofcontents}{%
\section*{\contentsname}%
- \@starttoc{toc\theissue}%
- }%
- \let\saved@addtocontents\addtocontents
- \renewcommand*{\addtocontents}[2]{%
- \saved@addtocontents{##1}{##2}%
- \def\temp@toc{toc}%
- \def\temp@param{##1}%
- \ifx\temp@toc\temp@param
- \saved@addtocontents{toc\theissue}{##2}%
- \fi
+% 1.4d (JLB) Start the partial contents
+ \startcontents[Issue\theissue]
+% 1.4d (JLB) Show it
+ \printcontents[Issue\theissue]{}{1}[3]{}
+% 1.4d (JLB)and make sure that |\end{document}| stops it again.
+ \gdef\ltn@tocend{\stopcontents[Issue\theissue]}
}%
\let\l@subsubsection\l@subsection
\let\l@subsection\l@section
@@ -278,6 +284,8 @@
\endgroup
}%
}{%
+% 1.4d (JLB) Adde |\ltn@tocend|
+ \ltn@tocend
\clearpage
}%
\makeatother
diff --git a/macros/latex-dev/base/ltnews01.pdf b/macros/latex-dev/base/ltnews01.pdf
index 44694047ca..fc3ed1119d 100644
--- a/macros/latex-dev/base/ltnews01.pdf
+++ b/macros/latex-dev/base/ltnews01.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews02.pdf b/macros/latex-dev/base/ltnews02.pdf
index b43d192424..34d40b49ec 100644
--- a/macros/latex-dev/base/ltnews02.pdf
+++ b/macros/latex-dev/base/ltnews02.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews03.pdf b/macros/latex-dev/base/ltnews03.pdf
index 4ccdc3613b..df30947cd9 100644
--- a/macros/latex-dev/base/ltnews03.pdf
+++ b/macros/latex-dev/base/ltnews03.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews04.pdf b/macros/latex-dev/base/ltnews04.pdf
index 7c8c60445d..8b18c27fda 100644
--- a/macros/latex-dev/base/ltnews04.pdf
+++ b/macros/latex-dev/base/ltnews04.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews05.pdf b/macros/latex-dev/base/ltnews05.pdf
index e4e3b4a417..7a079ebd73 100644
--- a/macros/latex-dev/base/ltnews05.pdf
+++ b/macros/latex-dev/base/ltnews05.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews06.pdf b/macros/latex-dev/base/ltnews06.pdf
index 33b0dd42c9..e6ca705920 100644
--- a/macros/latex-dev/base/ltnews06.pdf
+++ b/macros/latex-dev/base/ltnews06.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews07.pdf b/macros/latex-dev/base/ltnews07.pdf
index 45aab0c757..66a1457566 100644
--- a/macros/latex-dev/base/ltnews07.pdf
+++ b/macros/latex-dev/base/ltnews07.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews08.pdf b/macros/latex-dev/base/ltnews08.pdf
index 20e8980064..2732f77234 100644
--- a/macros/latex-dev/base/ltnews08.pdf
+++ b/macros/latex-dev/base/ltnews08.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews09.pdf b/macros/latex-dev/base/ltnews09.pdf
index 5c59f4537b..b81df70446 100644
--- a/macros/latex-dev/base/ltnews09.pdf
+++ b/macros/latex-dev/base/ltnews09.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews10.pdf b/macros/latex-dev/base/ltnews10.pdf
index 93cabf0b38..1fa4ff2997 100644
--- a/macros/latex-dev/base/ltnews10.pdf
+++ b/macros/latex-dev/base/ltnews10.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews11.pdf b/macros/latex-dev/base/ltnews11.pdf
index c569713011..33b9db87fc 100644
--- a/macros/latex-dev/base/ltnews11.pdf
+++ b/macros/latex-dev/base/ltnews11.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews12.pdf b/macros/latex-dev/base/ltnews12.pdf
index b0cebe5ef1..3df0f8da10 100644
--- a/macros/latex-dev/base/ltnews12.pdf
+++ b/macros/latex-dev/base/ltnews12.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews13.pdf b/macros/latex-dev/base/ltnews13.pdf
index 99a85c75db..9f250dda69 100644
--- a/macros/latex-dev/base/ltnews13.pdf
+++ b/macros/latex-dev/base/ltnews13.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews14.pdf b/macros/latex-dev/base/ltnews14.pdf
index e9c7b3c0e6..aeef5a6352 100644
--- a/macros/latex-dev/base/ltnews14.pdf
+++ b/macros/latex-dev/base/ltnews14.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews15.pdf b/macros/latex-dev/base/ltnews15.pdf
index 9cb9472821..e2df12335b 100644
--- a/macros/latex-dev/base/ltnews15.pdf
+++ b/macros/latex-dev/base/ltnews15.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews16.pdf b/macros/latex-dev/base/ltnews16.pdf
index 61ddf3036f..1eb4b41399 100644
--- a/macros/latex-dev/base/ltnews16.pdf
+++ b/macros/latex-dev/base/ltnews16.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews17.pdf b/macros/latex-dev/base/ltnews17.pdf
index 1136df63b6..d3c7bbda62 100644
--- a/macros/latex-dev/base/ltnews17.pdf
+++ b/macros/latex-dev/base/ltnews17.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews18.pdf b/macros/latex-dev/base/ltnews18.pdf
index 6b925fb64c..3f78dcfaeb 100644
--- a/macros/latex-dev/base/ltnews18.pdf
+++ b/macros/latex-dev/base/ltnews18.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews19.pdf b/macros/latex-dev/base/ltnews19.pdf
index e307c301b8..a5c96735c9 100644
--- a/macros/latex-dev/base/ltnews19.pdf
+++ b/macros/latex-dev/base/ltnews19.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews20.pdf b/macros/latex-dev/base/ltnews20.pdf
index 4115da16dd..fcf4ef9a2b 100644
--- a/macros/latex-dev/base/ltnews20.pdf
+++ b/macros/latex-dev/base/ltnews20.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews21.pdf b/macros/latex-dev/base/ltnews21.pdf
index 890e6ca687..948dec8917 100644
--- a/macros/latex-dev/base/ltnews21.pdf
+++ b/macros/latex-dev/base/ltnews21.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews22.pdf b/macros/latex-dev/base/ltnews22.pdf
index 9b46a67049..c7576c9e0e 100644
--- a/macros/latex-dev/base/ltnews22.pdf
+++ b/macros/latex-dev/base/ltnews22.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews23.pdf b/macros/latex-dev/base/ltnews23.pdf
index 6b95b99e63..513c215ff4 100644
--- a/macros/latex-dev/base/ltnews23.pdf
+++ b/macros/latex-dev/base/ltnews23.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews24.pdf b/macros/latex-dev/base/ltnews24.pdf
index 9100081fad..5d826a3aa1 100644
--- a/macros/latex-dev/base/ltnews24.pdf
+++ b/macros/latex-dev/base/ltnews24.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews25.pdf b/macros/latex-dev/base/ltnews25.pdf
index 24c36ca0b7..60f2c7f203 100644
--- a/macros/latex-dev/base/ltnews25.pdf
+++ b/macros/latex-dev/base/ltnews25.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews26.pdf b/macros/latex-dev/base/ltnews26.pdf
index bfda22ad97..4dce56adfa 100644
--- a/macros/latex-dev/base/ltnews26.pdf
+++ b/macros/latex-dev/base/ltnews26.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews27.pdf b/macros/latex-dev/base/ltnews27.pdf
index a4a4e355f6..483ff44824 100644
--- a/macros/latex-dev/base/ltnews27.pdf
+++ b/macros/latex-dev/base/ltnews27.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews28.pdf b/macros/latex-dev/base/ltnews28.pdf
index 3fd460e397..694668f4e7 100644
--- a/macros/latex-dev/base/ltnews28.pdf
+++ b/macros/latex-dev/base/ltnews28.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews28.tex b/macros/latex-dev/base/ltnews28.tex
index 71bdfc4711..6a683c83af 100644
--- a/macros/latex-dev/base/ltnews28.tex
+++ b/macros/latex-dev/base/ltnews28.tex
@@ -227,7 +227,7 @@ earlier than this release.
\subsection{BOM: byte order mark handling}
When using Unicode the first bytes of a file may be a, so called, BOM
-character (byte order mark) to indicate the byte oder used in the
+character (byte order mark) to indicate the byte order used in the
file. While this is not required with UTF-8 encoded files (where the
byte order is known) it is nevertheless allowed by the standard and
some editors add that byte sequence to the beginning of a file. In the
@@ -285,7 +285,7 @@ for this. For the programming level we also added
is defined. Unfortunately this had the side effect of \emph{defining}
the command to \verb|\relax| in the case that it had no definition.
The new release uses a modified definition
-(using extra testing possibilities available in \hologo{eTeX}. The new definition
+(using extra testing possibilities available in \hologo{eTeX}). The new definition
is more natural, however code that was relying on the side effect of the
command being tested being defined if it was previously undefined may have to add
\verb|\let\|\meta{command}\verb|\relax|.
diff --git a/macros/latex-dev/base/ltnews29.pdf b/macros/latex-dev/base/ltnews29.pdf
index 63b0467137..db198ebdd8 100644
--- a/macros/latex-dev/base/ltnews29.pdf
+++ b/macros/latex-dev/base/ltnews29.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews30.pdf b/macros/latex-dev/base/ltnews30.pdf
index bef0c7e194..5d045c4cf1 100644
--- a/macros/latex-dev/base/ltnews30.pdf
+++ b/macros/latex-dev/base/ltnews30.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews31.pdf b/macros/latex-dev/base/ltnews31.pdf
index 62024ac7f8..d4eea094cc 100644
--- a/macros/latex-dev/base/ltnews31.pdf
+++ b/macros/latex-dev/base/ltnews31.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews32.pdf b/macros/latex-dev/base/ltnews32.pdf
index c820928b65..7c8dc3fac7 100644
--- a/macros/latex-dev/base/ltnews32.pdf
+++ b/macros/latex-dev/base/ltnews32.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews32.tex b/macros/latex-dev/base/ltnews32.tex
index bd1ebffb10..fdf8211ef0 100644
--- a/macros/latex-dev/base/ltnews32.tex
+++ b/macros/latex-dev/base/ltnews32.tex
@@ -43,6 +43,7 @@
\providecommand\meta[1]{$\langle$\textit{#1}$\rangle$}
\providecommand\option[1]{\texttt{#1}}
\providecommand\env[1]{\texttt{#1}}
+\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
\providecommand\XeTeX{\hologo{XeTeX}}
@@ -141,6 +142,51 @@ This document is under construction \ldots
+\section{Providing \pkg{xparse} in the format}
+
+The official interface in the \LaTeXe{} kernel for creating
+document-level commands has always been \cs{newcommand}. This was a
+big step forward from \LaTeX~2.09. However, it was still very limited
+in the types of command it can create: those taking at most one
+optional argument in square brackets, then zero or more mandatory
+arguments. Richer syntaxes required use of the \TeX{} \cs{def}
+primitive along with appropriate low-level macro programming.
+
+The \LaTeX{} team started work on a comprehensive document-command
+parser, \pkg{xparse}, in the late 1990s. In the past decade, the
+experimental ideas it provides have been carefully worked through and
+moved to a stable footing. As such, \pkg{xparse} is now used to define
+a very large number of document and package commands. It does this by
+providing a rich and self-consistent syntax to describe a wide range
+interfaces seen in \LaTeX{} packages.
+
+The ideas developed in \pkg{xparse} are now sufficiently well-tested
+that the majority can be transferred into the \LaTeX{} kernel. Thus
+the following commands have been added
+\begin{itemize}
+ \item \cs{NewDocumentCommand}, \cs{RenewDocumentCommand},
+ \cs{ProvideDocumentCommand}, \cs{DeclareDocumentCommand}
+ \item \cs{NewExpandableDocumentCommand}, \cs{RenewExpandableDocumentCommand},
+ \cs{ProvideExpandableDocumentCommand}, \cs{DeclareExpandableDocumentCommand}
+ \item \cs{NewDocumentEnvironment}, \cs{RenewDocumentEnvironment},
+ \cs{ProvideDocumentEnvironment}, \cs{DeclareDocumentEnvironment}
+ \item \cs{BooleanTrue} \cs{BooleanFalse}
+ \item \cs{IfBooleanTF}, \cs{IfBooleanT}, \cs{IfBooleanF}
+ \item \cs{IfNoValueTF}, \cs{IfNoValueT}, \cs{IfNoValueF}
+ \item \cs{IfValueTF}, \cs{IfValueT}, \cs{IfValueF}
+ \item \cs{SplitArgument}, \cs{SplitList}, \cs{TrimSpaces},
+ \cs{ProcessList}, \cs{ReverseBoolean}
+ \item \cs{GetDocumentCommandArgSpec}
+ \cs{GetDocumentEnvironmentArgSpec}
+\end{itemize}
+
+Most, but not all, of the argument types defined by \pkg{xparse} are
+now supported at the kernel level. In particular, the types
+\texttt{g}/\texttt{G}, \texttt{l} and \texttt{u} are \emph{not} provided by
+the kernel code; these are deprecated but still available by
+explicitly loading \pkg{xparse}. All other argument types \emph{are}
+now available directly within the \LaTeXe{} kernel.
+
\section{Other changes to the \LaTeX{} kernel}
@@ -149,7 +195,7 @@ This document is under construction \ldots
The \LaTeXe{} kernel defines the command \cs{symbol}, which allows
characters to be typeset by entering their `slot number'. With the
\LuaTeX{} and \XeTeX{} engines, these slot numbers can extend to very
-large values to accomodate Unicode characters in the upper Unicode
+large values to accommodate Unicode characters in the upper Unicode
planes (e.g., bold mathematical capital A is slot number
\texttt{"1D400} in hex or \texttt{119808} in decimal). The \XeTeX{}
engine did not allow \cs{symbol} in math mode for values above
@@ -158,23 +204,108 @@ $2^{16}$, and this limitation has now been lifted.
\githubissue{124}
+\subsection{Correct Unicode value of \cs{=y} (\=y)}
+
+The Unicode slot for \=y was incorrectly pointing to the slot for
+\=Y. This has been corrected.
+%
+\githubissue{326}
+
+\subsection{Add support for Unicode soft hyphens}
+
+For a long time, the UTF-8 option for \pkg{inputenc} made the Unicode
+soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
+\cs{-}. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
+different though: They either ignored U+00AD or interpreted it as an
+unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
+always treats \texttt{U+00AD} as \cs{-}.
+%
+\githubissue{323}
+
+
+
+\subsection{Fix capital accents in Unicode engines}
+
+In Unicode engines the capital accents such as \cs{capitalcedilla},
+etc.\ have been implemented as trival short hands for the normal
+accents (because other than Computer Modern virtually no fonts support
+them), but that failed when \pkg{hyperref} got loaded. This has been
+corrected.
+%
+\githubissue{332}
+
+
+
+\subsection{Support \pkg{calc} in various kernel commands}
+
+The \cs{hspace}, \cs{vspace}, \cs{addvspace}, \cs{\textbackslash} and
+other commands simply passed their argument to a \TeX{} primitive to
+produce the necessary space. As a result it was impossible to specify
+anything other than a simple dimension value in such arguments. This
+has been changed, so that now \pkg{calc} syntax is also supported with
+these commands.
+%
+\githubissue{152}
+
+\subsection{Spaces in filenames of included files}
+
+File names containing spaces lead to unexpected results when used in
+the commands \cs{include} and \cs{includeonly}. This has now been
+fixed and the argument to \cs{include} can contain file name
+containing spaces. Leading or trailing spaces will be stripped off
+but spaces within the file name are kept. The argument to
+\cs{includeonly}, which is a comma-separated list of files to process,
+can also contain spaces with any leading and trailing spaces stripped
+from the individual filenames while the spaces \emph{in} the file
+names will remain intact.
+%
+\githubissue{217}
+
+
+
+\subsection{Set a non-zero \cs{baselineskip} in text scripts}
+
+As \cs{textsuperscript} and \cs{textsubscript} usually contain only a
+few characters on a single line the \cs{baselineskip} was set to
+zero. However, \pkg{hyperref} uses that value to determine the height
+of a link box which consequently came out far too small. This has
+been adjusted.
+%
+\githubissue{249}
+
+
\subsection{Spacing issues when using \cs{linethickness}}
In some circumstances the use of \cs{linethickness} introduced a
spurious space that shifted objects in a \texttt{picture} environments
to the right. This has been corrected.
%
-\githubissue{270}
+\githubissue{274}
+
+
+
+\subsection{Better support for the legacy series default interface}
+
+In the initial implementation of \LaTeX's font selection scheme (NFSS)
+changes to any default where always carried out by redefining some
+commands, e.g., \cs{seriesdefault}. In 2019 we introduced various
+extensions and with it new methods of customising certain parts of
+NFSS, e.g., the recommended way for changing the series default(s) is
+now through \cs{DeclareFontSeriesDefault}~\cite{32:ltnews31}. In this
+release we improved the support for legacy documents using the old
+method was improved to cover additional edge cases.
+%
+\githubissue[s]{306,315}
-\subsection{Better support for uncommon font series defaults}
+\subsection{Support for uncommon font series defaults}
If a font family was set up with fairly unusual font series defaults,
e.g.,
\begin{verbatim}
-\renewcommand\ttdefault{lmvtt}
-\DeclareFontSeriesDefault[tt]{md}{lm}
-\DeclareFontSeriesDefault[tt]{bf}{bm}
+ \renewcommand\ttdefault{lmvtt}
+ \DeclareFontSeriesDefault[tt]{md}{lm}
+ \DeclareFontSeriesDefault[tt]{bf}{bm}
\end{verbatim}
then a switch between the main document families, e.g.,
\verb=\ttfamily...\rmfamily= did not always correctly continued
@@ -185,6 +316,49 @@ been corrected.
\githubissue{291}
+\subsection{Checking the current font series context}
+
+Sometimes it is necessary to define commands that act differently when
+used in bold context (e.g., inside \cs{textbf}. Now that it is
+possible in \LaTeX{} to specify different \enquote{\texttt{bf}}
+defaults based for each of the three meta families (\texttt{rm},
+\texttt{sf} and \texttt{tt}) via \cs{DeclareFontSeriesDefault}, it is
+not any longer easy to answer the question \enquote{am I typsetting in
+ a bold context?}. To help with this problem a new command was provided:
+\begin{quote}
+ \cs{IfFontSeriesContextTF}\Arg{context}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code}
+\end{quote}
+The \meta{context} can be either \texttt{bf} (bold) or \texttt{md}
+(medium) and depending on whether or not the current font is
+recognized as being selected through \cs{bfseries} or \cs{mdseries}
+the \meta{true code} or \meta{false code} is executed.
+As an example
+\begin{verbatim}
+\usepackage{bm} % (bold math)
+\newcommand\vbeta{\IfFontSeriesContextTF{bf}%
+ {\ensuremath{\bm{\beta}}}%
+ {\ensuremath{\beta}}}
+\end{verbatim}
+This way you can write \cs{vbeta}\texttt{-isotopes} and if used in a
+heading it comes out in a bolder version.
+%
+\githubissue{336}
+
+
+\subsection{Avoid spurious package option warning}
+
+When a package is loaded with a number of options, say \texttt{X},
+\texttt{Y} and \texttt{Z}, and then later another loading attempt was
+made with a subset of the options or no options, it was possible that
+you got an error message that option \texttt{X} is not known to the
+package. This obviously incorrect error was due to some timing issue
+where the list of available options got lost prematurely. This has now
+been fixed.
+%
+\githubissue{22}
+
+
\subsection{Adjusting \texttt{fleqn}}
In \pkg{amsmath} the \cs{mathindent} parameter used with the
@@ -193,7 +367,7 @@ it to a value such as \texttt{1em minus 1em}, i.e., so the the normal
indentation can be reduced in case of very wide math displays.
This is now also supported by the \LaTeX{} standard classes.
-In addition a compressable space between formula and equation number
+In addition a compressible space between formula and equation number
in the \texttt{equation} environment got added when the \texttt{fleqn}
option is used so that a very wide formula doesn't bump into the
equation number.
@@ -201,6 +375,121 @@ equation number.
\githubissue{252}
+\subsection{Provide \cs{clap}}
+
+\LaTeX{} has inherited \cs{llap} and \cs{rlap} from plain \TeX{}
+(zero-sized boxes whose content sticks out to the left or right,
+respectively) but there isn't a corresponding \cs{clap} command that
+centers the material. This missing command was added by several
+addon packages, e.g., \pkg{mathtools}, and has now been added to the
+kernel.
+
+
+\subsection{Fix to legacy math alphabet interface}
+
+When using the \LaTeX{}~2.09 legacy math alphabet interface, e.g.,
+\verb=$\sf -1$= instead of \verb=$\mathsf{-1}$=, an extra math Ord atom
+was added to the formula in case the math alphabet was used for the first
+time. In some cases this math atom would change the spacing, e.g.,
+change the unary minus sign into a binary minus in the above example. This
+has finally be fixed.
+%
+\gnatsissue{latex}{3357}
+
+
+
+\subsection{Added tests for format, package and class dates}
+
+To implement compatibility code or to ensure that certain features are
+available it is helpful and often necessary to check the date of the
+format or that of a package or class and execute different code based
+on the result. For that \LaTeX\ only had some internal commands
+(\cs{@ifpackagelater} and \cs{@ifclasslater}) for testting package or
+class names but nothing really for testing the format date. For the
+latter one had to resort to some obscure command \cs{@ifl@t@r} that,
+given its cryptic name, was clearly never intended for use even in
+package or class code. Furthermore, even the existing interface
+commands where defective as they are testing for \enquote{equal or
+ later} and not for \enquote{later} as their names indicate.
+
+We have therefore introduced three new CamelCase commands as the
+official interface for such tests
+\begin{quote}
+ \cs{IfFormatAtLeastTF}\Arg{date}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code}
+\end{quote}
+and for package and class tests
+\begin{quote}
+ \cs{IfClassAtLeastTF}\Arg{class name}\Arg{date}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code} \\
+ \cs{IfPackageAtLeastTF}\Arg{package name}\Arg{date}\\
+ \hspace*{4em} \Arg{true code}\Arg{false code}
+\end{quote}
+For compatibility reasons the legacy commands remain available, but we
+suggest to replace them over time and use the new interfaces in new
+code.
+%
+\githubissue{186}
+
+
+\subsection{Avoid a problem with \cs{verb}}
+
+If a user typed \verb*=\verb !~! foo= instead of
+\verb*=\verb!~! foo= by mistake, then surprisingly the result was
+``\verb=!~!=foo'' without any warning or error.
+%
+What happened was that the
+\verb*= = became the argument delimiter due to the rather complex
+processing done by \cs{verb} to render verbatim. This now got
+fixed and spaces directly following the command \cs{verb} or \cs{verb*}
+are ignored as elsewhere.
+%
+\githubissue{327}
+
+
+\subsection{Record the counter name stepped by \cs{refstepcounter}}
+
+\cs{refstepcounter} now stores the name of counter in \cs{\@currentcounter}.
+This allows packages like \pkg{zref} and \pkg{hyperref} to store the name without
+having to patch \cs{refstepcounter}.
+%
+\githubissue{300}
+
+
+\subsection{Add support for Unicode soft hyphens}
+
+For a long time, the UTF-8 option for \pkg{inputenc} made the Unicode
+soft hyphen character (U+00AD) an alias for the \LaTeX\ soft hyphen
+\cs{-}. The Unicode engines \XeTeX{} and \LuaTeX{} behaved
+different though: They either ignored U+00AD or interpreted it as an
+unconditional hyphen. This inconsistency is fixed now and \LaTeX{}
+always treats \texttt{U+00AD} as \cs{-}.
+%
+\githubissue{323}
+
+
+
+\subsection{Native Lua\TeX\ behaviour for \cs{-}}
+
+\LaTeX\ changes \cs{-} to add a discretionary hyphen even if \cs{hyphenchar}
+is set to $-1$. This change is not necessary under Lua\TeX\ because in there
+\cs{-} is not affected by \cs{hyphenchar} in the first place. Therefore this
+behaviour has been changed to ensure that Lua\TeX's (language specific)
+hyphenation characters are respected by \cs{-}.
+
+
+
+\subsection{Allow \cs{par} commands inside \cs{typeout}}
+
+\cs{typeout} used to choke when seeing an empty line or a \cs{par}
+command in its argument. However, sometimes it is used to display
+arbitrary user input or code (wrapped, for example, in
+\cs{unexpanded}) which may contain explicit \cs{par} commands. This is
+now allowed.
+%
+\githubissue{335}
+
+
\section{Changes to packages in the \pkg{graphics} category}
@@ -215,7 +504,7 @@ to the log file, because of a typo in the check. This has been corrected.
\section{Changes to packages in the \pkg{tools} category}
-\subsection{Support stretchable glue in \texttt{w}-columns}
+\subsection{\pkg{array}: Support stretchable glue in \texttt{w}-columns}
If stretchable glue, e.g., \cs{dotfill}, is used in \env{tabular}
columns made with the \pkg{array} package, it stretches as it would in
@@ -227,19 +516,118 @@ types in this respect.
%
\githubissue{270}
+\subsection{\pkg{array}: Use math mode for \texttt{w} and
+ \texttt{W}-cells in \env{array}}
+
+The \texttt{w} and \texttt{W}-columns are LR-columns very similar to
+\texttt{l}, \texttt{c} and \texttt{r}. It is therefore natural to
+expect their cell content to be typeset in math mode instead of text
+mode if they are used in an \env{array} environment. This has now
+been adjusted. Note that this is a breaking change in version v2.5!
+If you have used \texttt{w} or \texttt{W}-columns in older documents
+either add \texttt{\detokenize{>{$}...<{$}}} for such columns or
+remove the \texttt{\$} signs in the cells. Alternatively, you can roll
+back to the old version by loading \pkg{array} with
+\begin{verbatim}
+ \usepackage{array}[=v2.4]
+\end{verbatim}
+in such documents.
+%
+\githubissue{297}
+
+\subsection{\pkg{xr}: Support for spaces in filenames}
+The commannd \cs{externaldocument}, provided by \pkg{xr}, now also
+supports filenames with spaces, just like \cs{include} and
+\cs{includeonly}.
+%
+\githubissue{223}
\section{Changes to packages in the \pkg{amsmath} category}
\subsection{Placement corrections for two accent commands}
The accent commands \cs{dddot} and \cs{ddddot} (producing triple and
-quatruple dot accents) moved the base character vertically in certain
+quadruple dot accents) moved the base character vertically in certain
situations if it was a single glyph,
e.g., \verb=$Q \dddot{Q}$=
were not at the same baseline. This has been corrected.
%
\githubissue{126}
+\subsection{Fixes to \texttt{aligned} and \texttt{gathered}}
+
+The environments \texttt{aligned} and \texttt{gathered} have a
+trailing optional argument to specify the vertical position of the
+environment with respect to the rest of the line. Allowed values are
+\texttt{t}, \texttt{b} and \texttt{c} but the code only tested for
+\texttt{b} and \texttt{t} and assumed anything else is must be
+\texttt{c}. As a result, a formula starting with a bracket group would
+get mangled without warning---the group being dropped and interpreted
+as a request for centering. After more than 25 years this has now been
+corrected. If such a group is found a warning is given and the data is
+processed as part of the formula.
+%
+\githubissue{5}
+
+
+\section{Changes to the \pkg{babel} package}
+
+Multilingual typesetting has much evolved in the past years, and
+\pkg{babel}, like \LaTeX{} itself, has followed the footsteps of
+Unicode and the W3C consortiums to produce proper output in many
+languages.
+
+Furthermore, the traditional model to define and select languages
+(which can be called \enquote{vertical}), based on closed files, which
+is still the preferred one in monolingual documents, is being extended
+with a new model (which can be called \enquote{horizontal}) based on
+\emph{services} provided by \pkg{babel}, which allows to define and
+redefine locales with the help of simple |ini| files based on
+key/value pairs. Babel provides about of 250 of these files, which
+have been generated with the help of the Unicode Common Language Data
+Repository.
+
+Thanks to the recent advances in \texttt{lualatex} and
+\pkg{luaotfload}, babel currently provides \emph{services} for bidi
+typesetting, line breaking for South East Asian and CJK scripts,
+non-standard hyphenation (like ff to ff-f), alphabetic and additive
+counters, automatic selection of fonts and languages based on the
+script, etc. This means babel can be used to typeset such a variety of
+languages as Russian, Arabic, Hindi, Thai, Japanese, Bangla, Amharic,
+Greek, and many others.
+
+And since these \texttt{ini} files they are easily parsable, they can
+serve as a source for other packages.
+
+For further details take a look at the \pkg{babel}
+documentation~\cite{32:babel}.
+
+
+\begin{thebibliography}{9}
+
+\fontsize{9.3}{11.3}\selectfont
+
+\bibitem{32:ltnews31} \LaTeX{} Project Team:
+ \emph{\LaTeXe{} news 31}.\\
+ \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
+
+\bibitem{32:site-doc}
+ \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
+ \url{https://latex-project.org/help/documentation/}
+
+\bibitem{32:issue-tracker}
+ \emph{\LaTeX{} issue tracker}.
+ \url{https://github.com/latex3/latex2e/issues/}
+
+\bibitem{32:babel}
+ Javier Bezos and Johannes Braams.
+ \emph{Babel --- Localization and internationalization}.\\
+ \url{https://www.ctan.org/pkg/babel}
+
+\end{thebibliography}
+
+
+
\end{document}
diff --git a/macros/latex-dev/base/ltoutenc.dtx b/macros/latex-dev/base/ltoutenc.dtx
index f3c19000ed..8831b5655f 100644
--- a/macros/latex-dev/base/ltoutenc.dtx
+++ b/macros/latex-dev/base/ltoutenc.dtx
@@ -37,14 +37,14 @@
%<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
%<TU>\ProvidesFile{tuenc.def}
%<package>\ProvidesPackage{fontenc}
-%<OT1|T1|OMS|OML|OT4|TU|package> [2020/02/11 v2.0o
+%<OT1|T1|OMS|OML|OT4|TU|package> [2020/04/22 v2.0p
%<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file]
%<package> Standard LaTeX package]
%
%<*driver>
% \fi
\ProvidesFile{ltoutenc.dtx}
- [2020/02/11 v2.0o LaTeX Kernel (font encodings)]
+ [2020/04/22 v2.0p LaTeX Kernel (font encodings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutenc.dtx}
@@ -188,6 +188,8 @@
% like.}
% \changes{v1.99m}{2015/02/21}
% {Removed autoload code}
+% \changes{v2.0p}{2020/04/22}
+% {corrected \=y unicode value in tuenc.def}
%
%
% \section{Font encodings}
@@ -3370,7 +3372,7 @@
\DeclareUnicodeComposite{\textcommabelow}{T}{"021A}
\DeclareUnicodeComposite{\textcommabelow}{t}{"021B}
\DeclareUnicodeComposite{\=} {Y}{"0232}
-\DeclareUnicodeComposite{\=} {y}{"0232}
+\DeclareUnicodeComposite{\=} {y}{"0233}
\DeclareUnicodeComposite{\.} {B}{"1E02}
\DeclareUnicodeComposite{\.} {b}{"1E03}
\DeclareUnicodeComposite{\d} {B}{"1E04}
@@ -3601,7 +3603,7 @@
\xdef\@fontenc@load@list{\@fontenc@load@list
\@elt{\csname opt@fontenc.sty\endcsname}}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\global\expandafter\let\csname ver@fontenc.sty\endcsname\relax
\global\expandafter\let\csname opt@fontenc.sty\endcsname\relax
diff --git a/macros/latex-dev/base/ltpictur.dtx b/macros/latex-dev/base/ltpictur.dtx
index 4018adba59..bdac744e83 100644
--- a/macros/latex-dev/base/ltpictur.dtx
+++ b/macros/latex-dev/base/ltpictur.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpictur.dtx}
- [2020/02/14 v1.1n LaTeX Kernel (Picture Mode)]
+ [2020/05/12 v1.1o LaTeX Kernel (Picture Mode)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpictur.dtx}
@@ -191,6 +191,7 @@
% \end{macro}
% \end{macro}
%
+% \begin{environment}{picture}
% \begin{macro}{\picture}
% \changes{v0.1c}{1994/04/28}{(DPC) Ignore spaces before (}
% |#1| should be white space.
@@ -229,6 +230,7 @@
\mbox{\box\@picbox}}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% In the definitions of |\put| and |\multiput|, |\hskip| was replaced by
% |\kern| just in case arg |#3| = ``plus''. (Bug detected by Don Knuth.
@@ -275,9 +277,11 @@
% \begin{macro}{\thinlines}
% \begin{macro}{\thicklines}
% \begin{macrocode}
-\DeclareRobustCommand\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
+\DeclareRobustCommand\thinlines{\let\@linefnt\tenln
+ \let\@circlefnt\tencirc
\@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
-\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
+\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw
+ \let\@circlefnt\tencircw
\@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
% \end{macrocode}
% \end{macro}
@@ -333,8 +337,24 @@
% \end{macro}
%
% \begin{macro}{\@istackcr}
+% \changes{v1.1o}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@istackcr}{\shortstack calc support}%
+\def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@istackcr}{\shortstack calc support}%
+%<latexrelease>
+%<latexrelease>\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -1341,7 +1361,7 @@
% \end{macro}
%
% \begin{macro}{\@xdim}
-% \begin{macro}{\yxdim}
+% \begin{macro}{\@ydim}
% Length registers.
% \begin{macrocode}
\newdimen\@xdim
diff --git a/macros/latex-dev/base/ltspace.dtx b/macros/latex-dev/base/ltspace.dtx
index 16d7dcb43a..1a672c6455 100644
--- a/macros/latex-dev/base/ltspace.dtx
+++ b/macros/latex-dev/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2019/11/02 v1.3k LaTeX Kernel (spacing)]
+ [2020/05/06 v1.3n LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -63,6 +63,8 @@
% \changes{v1.2r}{1996/07/27}{Correct documentation of problems}
% \changes{v1.2w}{1998/08/17}{Documentation fixes.}
% \changes{v1.3j}{2019/08/27}{Make various commands robust}
+% \changes{v1.3l}{2020/03/07}{Moved \cs{thinspace}, \cs{negthinspace}
+% and \cs{,} to ltmath.dtx (gh/303)}
%
%
% \section{Spacing}
@@ -428,6 +430,37 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+%
+%
+% \begin{macro}{\@vspace@calcify}
+% Helper command to produce a \cs{vskip} that is first run through
+% \cs{setlength}. This way the \texttt{calc} package can operate on
+% the argument value.
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@vspace@calcify}{Add calc support}%
+\def\@vspace@calcify#1{\begingroup\setlength\skip@{#1}\vskip\skip@\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@vspace@calcify}{Add calc support}%
+%<latexrelease>
+%<latexrelease>\let\@vspace@calcify\@undefined
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+%
+
+
% \begin{macro}{\newline}
% A simple form of the `normal' definition of |\\|.
% \changes{v1.2v}{1997/05/07}{Made completely robust.}
@@ -445,12 +478,31 @@
% \end{macro}
%
% \begin{macro}{\@newline}
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@newline}{\newline calc support}%
\def\@newline[#1]{\let \reserved@e \vadjust
- \@gnewline {\vskip #1}}
+ \@gnewline {\@vspace@calcify{#1}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@newline}{\newline calc support}%
+%<latexrelease>
+%<latexrelease>\def\@newline[#1]{\let \reserved@e \vadjust
+%<latexrelease> \@gnewline {\vskip #1}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
+%
+%
% \begin{macro}{\@gnewline}
% \changes{v1.2u}{1996/10/29}{Added macro}
% The |\nobreak| added to prevent null lines when |\\|
@@ -518,7 +570,7 @@
% |\begin{@float}| \ldots |\end{@float}|
% that want to be invisible --- i.e.,
% not leave any extra space when used in the middle of text. Such
-% a macro should begin with |\@bsphack| and end with |\@esphack|
+% a macro should begin with |\@bsphack| and end with |\@esphack|.
% The macro in question should not create any text, nor change the
% mode.
%
@@ -823,20 +875,48 @@
% \changes{v1.2c}{1994/11/13}{Recorrected error message}
% Add vertical space taking into account space already added, as
% described above.
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\addvspace}{\addvspace calc support}%
\def\addvspace#1{%
\ifvmode
\if@minipage\else
\ifdim \lastskip =\z@
- \vskip #1\relax
+ \@vspace@calcify{#1}%
\else
- \@tempskipb#1\relax
+ \setlength\@tempskipb{#1}%
\@xaddvskip
\fi
\fi
\else
\@noitemerr
\fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\addvspace}{\addvspace calc support}%
+%<latexrelease>
+%<latexrelease>\def\addvspace#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \if@minipage\else
+%<latexrelease> \ifdim \lastskip =\z@
+%<latexrelease> \vskip #1\relax
+%<latexrelease> \else
+%<latexrelease> \@tempskipb#1\relax
+%<latexrelease> \@xaddvskip
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@noitemerr
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -938,6 +1018,8 @@
% \end{macrocode}
% \end{macro}
%
+%
+%
% \begin{macro}{\vspace}
% \changes{v1.2m}{1996/01/20}{Made robust}
% \begin{macro}{\@vspace}
@@ -957,14 +1039,25 @@
% \end{itemize}
% \begin{macrocode}
\DeclareRobustCommand\vspace{\@ifstar\@vspacer\@vspace}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@vspace}{Support calc in \vspace}%
+% \end{macrocode}
+% We support calc syntax in the argument and therefore use \cs{setlength}.
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \begin{macrocode}
\def\@vspace #1{%
\ifvmode
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip
\else
\@bsphack
\vadjust{\@restorepar
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip
}%
\@esphack
@@ -977,7 +1070,7 @@
\dimen@\prevdepth
\hrule \@height\z@
\nobreak
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip
\prevdepth\dimen@
\else
@@ -985,10 +1078,46 @@
\vadjust{\@restorepar
\hrule \@height\z@
\nobreak
- \vskip #1
+ \@vspace@calcify{#1}%
\vskip\z@skip}%
\@esphack
\fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@vspace}{Support calc in \vspace}%
+%<latexrelease>
+%<latexrelease>\def\@vspace #1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip
+%<latexrelease> \else
+%<latexrelease> \@bsphack
+%<latexrelease> \vadjust{\@restorepar
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip
+%<latexrelease> }%
+%<latexrelease> \@esphack
+%<latexrelease> \fi}
+%<latexrelease>\def\@vspacer#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \dimen@\prevdepth
+%<latexrelease> \hrule \@height\z@
+%<latexrelease> \nobreak
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip
+%<latexrelease> \prevdepth\dimen@
+%<latexrelease> \else
+%<latexrelease> \@bsphack
+%<latexrelease> \vadjust{\@restorepar
+%<latexrelease> \hrule \@height\z@
+%<latexrelease> \nobreak
+%<latexrelease> \vskip #1
+%<latexrelease> \vskip\z@skip}%
+%<latexrelease> \@esphack
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1094,17 +1223,6 @@
% \end{macrocode}
%
%
-% \begin{macro}{\,}
-% Used in paragraph mode produces a |\thinspace|. It has the
-% ordinary definition in math mode. Useful for quotes inside quotes,
-% as in |``\,`Foo', he said.''|
-% \changes{v1.0o}{1994/05/11}{Use \cs{DeclareRobustCommand}. ASAJ.}
-% \begin{macrocode}
-\DeclareRobustCommand{\,}{%
- \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi
-}
-% \end{macrocode}
-% \end{macro}
%
% \begin{macro}{\@}
% Placed before a '.', makes it a sentence-ending period. Does the
@@ -1142,20 +1260,37 @@
% \changes{LaTeX2e}{1993/08/05}
% {(RmS) Removed superfluous \cs{leavevmode} in \cs{@hspace} and
% \cs{@hspacer}, as suggested by CAR.}
+% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@hspace}{Support calc with \hspace}%
+\def\@hspace#1{\begingroup\setlength\skip@{#1}\hskip\skip@\endgroup}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
% \begin{macrocode}
-\def\@hspace#1{\hskip #1\relax}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@hspace}{Support calc with \hspace}%
+
+%<latexrelease>
+%<latexrelease>\def\@hspace#1{\hskip #1\relax}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\@hspacer}
-% extra |\hskip 0pt| added 1985/17/12 to guard
+% Extra |\hskip 0pt| added 1985/17/12 to guard
% against a following |\unskip|
% |\relax| added 13 Oct 88 for usual \TeX\ lossage
% replaced both changes by |\hskip\z@skip| 27 Nov 91
% \begin{macrocode}
\def\@hspacer#1{\vrule \@width\z@\nobreak
- \hskip #1\hskip \z@skip}
+ \@hspace{#1}\hskip \z@skip}
% \end{macrocode}
% \end{macro}
%
@@ -1184,19 +1319,12 @@
%<latexrelease> {\thinspace}{Start LR-mode}%
% \end{macrocode}
%
-%
-% \begin{macro}{\thinspace}
-% \begin{macro}{\negthinspace}
% \begin{macro}{\enspace}
% \changes{v1.3h}{2018/09/24}{Start LR-mode if necessary (git/49)}
% \begin{macrocode}
-\DeclareRobustCommand\thinspace{\leavevmode@ifvmode\kern .16667em }
-\DeclareRobustCommand\negthinspace{\leavevmode@ifvmode\kern-.16667em }
\DeclareRobustCommand\enspace{\leavevmode@ifvmode\kern.5em }
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\leavevmode@ifvmode}
% Leave vmode but only if we are really in vmode, otherwise the
@@ -1234,6 +1362,18 @@
% \end{macro}
% \end{macro}
%
+% \changes{v1.3n}{2020/05/06}{Made softhyphen active in TU engines}
+%
+% For Unicode engines, make the Unicode soft hyphen an active
+% character defined as \cs{-}.
+%
+% \begin{macrocode}
+\ifx\Umathcode\@undefined\else
+ \catcode "AD=13
+ \def^^ad{\-}
+\fi
+% \end{macrocode}
+%
% \begin{macro}{\obeycr}
% \begin{macro}{\restorecr}
% The following definitions will probably get deleted or moved to
diff --git a/macros/latex-dev/base/lttab.dtx b/macros/latex-dev/base/lttab.dtx
index 47cf4a6618..dedd9e5d37 100644
--- a/macros/latex-dev/base/lttab.dtx
+++ b/macros/latex-dev/base/lttab.dtx
@@ -31,7 +31,7 @@
%%% From File: lttab.dtx
%<*driver>
% \fi
-\ProvidesFile{lttab.dtx}[2019/10/07 v1.1q LaTeX Kernel (Columns)]
+\ProvidesFile{lttab.dtx}[2020/04/24 v1.1r LaTeX Kernel (Columns)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{lttab.dtx}
@@ -475,11 +475,28 @@
% \end{macro}
%
% \begin{macro}{\@itabcr}
+% \changes{v1.1r}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@itabcr}{Tabbing calc syntax}%
+\def\@itabcr[#1]{\@vspace@calcify{#1}\@startline\ignorespaces}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@itabcr}{Tabbing calc syntax}%
+%<latexrelease>
+%<latexrelease>\def\@itabcr[#1]{\vskip #1\@startline\ignorespaces}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
%
%
+% \begin{environment}{tabbing}
% \begin{macro}{\tabbing}
% \changes{v1.1f}{1995/10/23}{(CAR)Make \cs{@hightab} consistently a
% local variable}
@@ -513,6 +530,8 @@
\@stopline\ifnum\@tabpush >\z@ \@badpoptabs \fi\endtrivlist}
% \end{macrocode}
% \end{macro}
+% \end{environment}
+%
%
% \begin{macro}{\@rtab}
% Omitted |\global| added to |\@rtab| 17 Jun 86
@@ -815,6 +834,7 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{environment}{array}
% \begin{macro}{\array}
% \begin{macrocode}
\def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
@@ -822,6 +842,7 @@
\let\\\@arraycr\let\@halignto\@empty\@tabarray}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\endarray}
% \begin{macro}{\endtabular}
@@ -835,11 +856,13 @@
% \end{macro}
% \end{macro}
%
+% \begin{environment}{tabular}
% \begin{macro}{\tabular}
% \begin{macrocode}
\def\tabular{\let\@halignto\@empty\@tabular}
% \end{macrocode}
% \end{macro}
+% \end{environment}
%
% \begin{macro}{\tabular*}
% \changes{v1.1j}{1998/05/18}{Use \cs{setlength}, so that
@@ -1003,8 +1026,24 @@
% \end{macro}
%
% \begin{macro}{\@yargarraycr}
+% \changes{v1.1r}{2020/04/21}{Support calc syntax (gh/152)}
% \begin{macrocode}
-\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@yargarraycr}{tabular support calc syntax}%
+\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@yargarraycr}{tabular support calc syntax}%
+%<latexrelease>
+%<latexrelease>\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/base/lttextcomp.dtx b/macros/latex-dev/base/lttextcomp.dtx
index dc2c2c49c7..3b6231dafd 100644
--- a/macros/latex-dev/base/lttextcomp.dtx
+++ b/macros/latex-dev/base/lttextcomp.dtx
@@ -33,7 +33,7 @@
%
%
\ProvidesFile{lttextcomp.dtx}
- [2020/02/20 v1.0c LaTeX Kernel (text companion symbols)]
+ [2020/04/29 v1.0d LaTeX Kernel (text companion symbols)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -565,24 +565,25 @@
%
% In Unicode engines we just execute the simple accents:
% \changes{v1.0c}{2020/02/10}{Use \cs{@tabacckludge} for tabbing where necessary (gh/271)}
+% \changes{v1.0d}{2020/04/29}{Make all captial accents text commands for hyperref (gh/332)}
% \begin{macrocode}
\else
- \def\capitalacute{\@tabacckludge'}
- \def\capitalbreve{\u}
- \def\capitalcaron{\v}
- \def\capitalcedilla{\c}
- \def\capitalcircumflex{\^}
- \def\capitaldieresis{\"}
- \def\capitaldotaccent{\.}
- \def\capitalgrave{\@tabacckludge`}
- \def\capitalhungarumlaut{\H}
- \def\capitalmacron{\@tabacckludge=}
- \def\capitalnewtie{\t}
- \def\capitalogonek{\k}
- \def\capitalring{\r}
- \def\capitaltie{\t}
- \def\capitaltilde{\~}
- \def\newtie{\t}
+ \DeclareTextCommandDefault\capitalacute{\@tabacckludge'}
+ \DeclareTextCommandDefault\capitalbreve{\u}
+ \DeclareTextCommandDefault\capitalcaron{\v}
+ \DeclareTextCommandDefault\capitalcedilla{\c}
+ \DeclareTextCommandDefault\capitalcircumflex{\^}
+ \DeclareTextCommandDefault\capitaldieresis{\"}
+ \DeclareTextCommandDefault\capitaldotaccent{\.}
+ \DeclareTextCommandDefault\capitalgrave{\@tabacckludge`}
+ \DeclareTextCommandDefault\capitalhungarumlaut{\H}
+ \DeclareTextCommandDefault\capitalmacron{\@tabacckludge=}
+ \DeclareTextCommandDefault\capitalnewtie{\t}
+ \DeclareTextCommandDefault\capitalogonek{\k}
+ \DeclareTextCommandDefault\capitalring{\r}
+ \DeclareTextCommandDefault\capitaltie{\t}
+ \DeclareTextCommandDefault\capitaltilde{\~}
+ \DeclareTextCommandDefault\newtie{\t}
\fi
% \end{macrocode}
%
diff --git a/macros/latex-dev/base/ltvers.dtx b/macros/latex-dev/base/ltvers.dtx
index ed2abe1088..dd39a67896 100644
--- a/macros/latex-dev/base/ltvers.dtx
+++ b/macros/latex-dev/base/ltvers.dtx
@@ -115,7 +115,7 @@
{2020-10-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{-5}
+\def\patch@level{-6}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
diff --git a/macros/latex-dev/base/ltx3info.pdf b/macros/latex-dev/base/ltx3info.pdf
index b0b6c36690..cee525e113 100644
--- a/macros/latex-dev/base/ltx3info.pdf
+++ b/macros/latex-dev/base/ltx3info.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltxdoc.pdf b/macros/latex-dev/base/ltxdoc.pdf
index f7d0cc4d62..ed04747867 100644
--- a/macros/latex-dev/base/ltxdoc.pdf
+++ b/macros/latex-dev/base/ltxdoc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltxref.dtx b/macros/latex-dev/base/ltxref.dtx
index c20a324558..9818757149 100644
--- a/macros/latex-dev/base/ltxref.dtx
+++ b/macros/latex-dev/base/ltxref.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltxref.dtx}
- [2019/09/16 v1.1m LaTeX Kernel (Cross Referencing)]
+ [2020/05/07 v1.1n LaTeX Kernel (Cross Referencing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltxref.dtx}
@@ -311,14 +311,16 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\refstepcounter}{Add \@currentcounter}%
% \end{macrocode}
%
% \begin{macro}{\refstepcounter}
% Step the counter and allow for labels to point to its current value.
+% \changes{v1.1n}{2020/05/05}{record the counter name in \cs{@currentcounter}}
% \begin{macrocode}
\def\refstepcounter#1{\stepcounter{#1}%
+ \edef\@currentcounter{#1}%
\protected@edef\@currentlabel
% \end{macrocode}
% By generating the second csname first the |\p@...| command can
@@ -381,6 +383,16 @@
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
+%<latexrelease>\def\refstepcounter#1{\stepcounter{#1}%
+%<latexrelease> \protected@edef\@currentlabel
+%<latexrelease> {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+%<latexrelease>}
+%<latexrelease>\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
+%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected@edef\@tempa{\ref{#1}}%
+%<latexrelease> \expandafter\MakeUppercase\@tempa}
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\refstepcounter}{Add \labelformat and \Ref}%
%<latexrelease>
diff --git a/macros/latex-dev/base/makeindx.pdf b/macros/latex-dev/base/makeindx.pdf
index d6c2172b6e..fc3f0bb507 100644
--- a/macros/latex-dev/base/makeindx.pdf
+++ b/macros/latex-dev/base/makeindx.pdf
Binary files differ
diff --git a/macros/latex-dev/base/manifest.txt b/macros/latex-dev/base/manifest.txt
index 6d5462aeb9..20866ec2d9 100644
--- a/macros/latex-dev/base/manifest.txt
+++ b/macros/latex-dev/base/manifest.txt
@@ -1,5 +1,5 @@
%
-% The following files form the LaTeX2e distribution of 2017-04-15
+% The following files form the LaTeX2e distribution of 2020-10-01
%
%
% CONTENTS OF THE LaTeX DISTRIBUTION
@@ -8,13 +8,12 @@
% Documentation:
% --------------
%
-% README.txt -- The distribution guide. START BY READING THIS FILE
+% README.md -- The distribution guide. START BY READING THIS FILE
% manifest.txt -- This file.
%
% tex2.txt -- Extras for installing LaTeX on TeX2.
%
% texpert.txt -- Documentation for TeX experts.
-% patches.txt -- Explains the patch mechanism.
%
% legal.txt -- Copyright notice; warranty; copying conditions.
% lppl.txt -- The LaTeX Project Public License (current version).
@@ -27,6 +26,7 @@
%
% source2e.tex -- File to produce kernel documentation.
% changes.txt -- List of changes in reverse chronological order.
+% latexchanges.tex -- Describes the changes to the LaTeX format since 2014-05-01
%
% sample2e.tex -- Sample LaTeX input file.
% small2e.tex -- Small sample LaTeX input file.
@@ -65,6 +65,12 @@
% ltnews24.tex -- What was new in the release dated 2016/02.
% ltnews25.tex -- What was new in the release dated 2016/03.
% ltnews26.tex -- What was new in the release dated 2017/01.
+% ltnews27.tex -- What was new in the release dated 2017/04.
+% ltnews28.tex -- What was new in the release dated 2018/04.
+% ltnews29.tex -- What was new in the release dated 2018/12.
+% ltnews30.tex -- What was new in the release dated 2019/10.
+% ltnews31.tex -- What was new in the release dated 2020/02.
+% ltnews32.tex -- What was new in the release dated 2020/10.
%
% ltx3info.tex -- Information about the LaTeX3 project.
@@ -116,6 +122,7 @@
% ltpage.dtx -- Page styles and related commands.
% ltplain.dtx -- Things borrowed from the plain format.
% lttab.dtx -- The tabbing, tabular and array environments.
+% lttextcomp -- The text companion symbols
% ltthm.dtx -- The theorem-like environments.
% ltsect.dtx -- Sectioning and title commands.
% ltvers.dtx -- Version identification code.
@@ -183,15 +190,17 @@
% alltt.ins -- Installation script for the alltt package.
% classes.ins -- Installation script for standard classes.
% cmfonts.ins -- Installation script for OT* Computer Modern fonts.
+% ec.ins -- Installation script for T1 and TS1 EC fonts.
% newdc.ins -- Installation script for T* Computer Modern fonts.
% docstrip.ins -- Installation script for docstrip.
% exscale.ins -- Installation script for scaling the cmex font.
-% fixltx2e.ins -- Installation script for the fixltx2e package.
+% fix-cm.ins -- Installation script for modified cm font choices
% format.ins -- Installation script for latex.ltx.
% graphpap.ins -- Installation script for graphpap.dtx.
% inputenc.ins -- Installation script for inputenc.dtx.
% ifthen.ins -- Installation script for ifthen.dtx.
% latex209.ins -- Installation script for compatibility mode.
+% latexrelease.ins-- Installation script for release stability
% latexsym.ins -- Installation script for latexsym.dtx.
% letter.ins -- Installation script for document class letter.
% ltoutenc.ins -- Installation script for output encoding files.
@@ -206,7 +215,6 @@
% ----------------------------------------------
%
% cmextra.ins -- Installation script for additional CM fonts.
-% ec.ins -- Installation script for T1 and TS1 EC fonts.
% olddc.ins -- Installation script for obsolete dc fonts (v1.1).
%
%
diff --git a/macros/latex-dev/base/manual.pdf b/macros/latex-dev/base/manual.pdf
index 787714470f..19aca62958 100644
--- a/macros/latex-dev/base/manual.pdf
+++ b/macros/latex-dev/base/manual.pdf
Binary files differ
diff --git a/macros/latex-dev/base/modguide.pdf b/macros/latex-dev/base/modguide.pdf
index 9bcc7f9956..8b9cf82d07 100644
--- a/macros/latex-dev/base/modguide.pdf
+++ b/macros/latex-dev/base/modguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/nfssfont.pdf b/macros/latex-dev/base/nfssfont.pdf
index f64d059903..bd5c9aef0f 100644
--- a/macros/latex-dev/base/nfssfont.pdf
+++ b/macros/latex-dev/base/nfssfont.pdf
Binary files differ
diff --git a/macros/latex-dev/base/proc.pdf b/macros/latex-dev/base/proc.pdf
index 9c1d27f4e1..4a2bf11846 100644
--- a/macros/latex-dev/base/proc.pdf
+++ b/macros/latex-dev/base/proc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/slides.pdf b/macros/latex-dev/base/slides.pdf
index 30e0437bec..5922db016b 100644
--- a/macros/latex-dev/base/slides.pdf
+++ b/macros/latex-dev/base/slides.pdf
Binary files differ
diff --git a/macros/latex-dev/base/slifonts.pdf b/macros/latex-dev/base/slifonts.pdf
index 24093386ef..638b84873b 100644
--- a/macros/latex-dev/base/slifonts.pdf
+++ b/macros/latex-dev/base/slifonts.pdf
Binary files differ
diff --git a/macros/latex-dev/base/source2e.pdf b/macros/latex-dev/base/source2e.pdf
index 2ff5360a99..882d7b2cc6 100644
--- a/macros/latex-dev/base/source2e.pdf
+++ b/macros/latex-dev/base/source2e.pdf
Binary files differ
diff --git a/macros/latex-dev/base/syntonly.pdf b/macros/latex-dev/base/syntonly.pdf
index f653c51bba..e2387a21b2 100644
--- a/macros/latex-dev/base/syntonly.pdf
+++ b/macros/latex-dev/base/syntonly.pdf
Binary files differ
diff --git a/macros/latex-dev/base/tlc2.pdf b/macros/latex-dev/base/tlc2.pdf
index 230d37b431..90de5dd226 100644
--- a/macros/latex-dev/base/tlc2.pdf
+++ b/macros/latex-dev/base/tlc2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/tulm.pdf b/macros/latex-dev/base/tulm.pdf
index b0f9e7b62d..483f155a56 100644
--- a/macros/latex-dev/base/tulm.pdf
+++ b/macros/latex-dev/base/tulm.pdf
Binary files differ
diff --git a/macros/latex-dev/base/usrguide.pdf b/macros/latex-dev/base/usrguide.pdf
index 93bf90b2ac..a2dcf1b785 100644
--- a/macros/latex-dev/base/usrguide.pdf
+++ b/macros/latex-dev/base/usrguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/usrguide.tex b/macros/latex-dev/base/usrguide.tex
index c76b27c0f0..4c2ddf24af 100644
--- a/macros/latex-dev/base/usrguide.tex
+++ b/macros/latex-dev/base/usrguide.tex
@@ -34,10 +34,10 @@
\title{\LaTeXe~for authors}
-\author{\copyright~Copyright 1995--2019, \LaTeX3 Project Team.\\
+\author{\copyright~Copyright 1995--2020, \LaTeX3 Project Team.\\
All rights reserved.}
-\date{27 January 2019}
+\date{25 May 2020}
\begin{document}
@@ -505,44 +505,6 @@ This section describes the new commands available in \LaTeXe.
They are covered in more detail in \emph{\LaTeXbook} and in
\emph{\LaTeXcomp}.
-\subsection{Initial commands}
-
-Initial commands can appear only before the |\documentclass|
-line.
-
-\begin{decl}
-|\begin{filecontents}| \arg{file-name} \\
- \m{file-contents} \\
-|\end{filecontents}|
-\end{decl}
-
-The |filecontents| environment is intended for bundling within a
-single document file the contents of packages, options, or other
-files. When the document file is run through \LaTeXe{} the body of
-this environment is written verbatim (preceded by a comment line) to a
-file whose name is given as the environment's only argument. However,
-if that file already exists then nothing happens except for an
-information message.
-
-Only normal ASCII text characters (7-bit visible text) should be
-included in a |filecontents| environment. Anything else, such as tab
-characters, form-feeds or 8-bit characters, should not be included in a
-|filecontents| environment.
-
-Tabs and form feeds produce a warning, explaining that they are turned
-into spaces or blank lines, respectively.
-What happens to 8-bit characters depends on the \TeX{} installation and
-is in general unpredictable.
-
-The |filecontents| environment is used for including \LaTeX{} files.
-For other plain text files (such as Encapsulated PostScript files),
-you should use the |filecontents*| environment which does not add a
-comment line.
-
-These environments are allowed only before |\documentclass|. This
-ensures that any packages that have been bundled in the document are
-present when needed.
-
\subsection{Preamble commands}
\label{Sec:pre}
@@ -559,8 +521,10 @@ This command replaces the
\LaTeX~2.09 command |\documentstyle|.
There must be exactly one |\documentclass| command in a document; and
-it must come after the |filecontents| environments, if any, but before
-any other commands.
+it should normally come before any other command. (There are some
+exceptions, e.g., you can have |filecontents| environments before it
+or |\RequirePackage| but these should be only used in special
+scenarios as discussed elsewhere.)
The \m{option-list} is a list of options, each of which may modify the
formatting of elements which are defined in the \m{class-name} file,
@@ -657,6 +621,52 @@ through the standard |\setcounter| command. As most \LaTeX\ users do
not want to see the internal definitions of \LaTeX\ commands each time
they make an error, \LaTeXe{} sets this to $-1$ by default.
+
+\subsection{Environments to write out support files}
+
+\NEWfeature{2019}
+%
+Until the \LaTeX\ release in 2019 the |filecontents| environment was
+restricted to a place before the |\documentclass| command. These days
+it can be used anywhere, though we still think that in most cases it is
+best to only use it a the top of your document or in the preamble.
+
+\begin{decl}
+|\begin{filecontents}| \oarg{option-list} \arg{file-name} \\
+ \m{file-contents} \\
+|\end{filecontents}|
+\end{decl}
+
+The |filecontents| environment is intended for bundling within a
+single document file the contents of packages, options, or other
+files. When the document file is run through \LaTeXe{} the body of
+this environment is written verbatim (preceded by a comment line) to a
+file whose name is given as the environment's only argument. However,
+if that file already exists then nothing happens except for an
+information message.
+
+These days most UTF-8 text characters can be used in a
+|filecontents| envi\-ronment---they will be written unchanged to the
+output file. However, tabs and form feeds produce a warning,
+explaining that they are turned into spaces or blank lines,
+respectively.
+
+By default the environment does not overwrite an existing file and it
+even refuses to write out the data if there exists a file that is
+anywhere in the path that \TeX\ searches when inputting files. With
+the option |nosearch| you can ask it to look only into the current
+directory and with the option |overwrite| (or |force|) you can request
+it to write the file regardless. It will, however, never write to
+|\jobname.tex| to avoid overwriting itself.
+
+The |filecontents| environment is used for including \LaTeX{} files.
+For other plain text files (such as Encapsulated PostScript files),
+you should use the |filecontents*| environment which does not add a
+comment line.
+
+
+
+
\subsection{Document structure}
The |book| document class introduces new commands to indicate
diff --git a/macros/latex-dev/base/utf8ienc.pdf b/macros/latex-dev/base/utf8ienc.pdf
index a4794e4ba3..c27ce9669b 100644
--- a/macros/latex-dev/base/utf8ienc.pdf
+++ b/macros/latex-dev/base/utf8ienc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/webcomp.pdf b/macros/latex-dev/base/webcomp.pdf
index e576a8cda0..32a69c71c9 100644
--- a/macros/latex-dev/base/webcomp.pdf
+++ b/macros/latex-dev/base/webcomp.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/README.md b/macros/latex-dev/required/amsmath/README.md
index e10fadce5d..60947e6717 100644
--- a/macros/latex-dev/required/amsmath/README.md
+++ b/macros/latex-dev/required/amsmath/README.md
@@ -1,7 +1,7 @@
The amsmath bundle for LaTeX
============================
-Release 2020-02-01 pre-release 1
+Release 2020-10-01 pre-release 1
Overview
--------
@@ -77,5 +77,5 @@ version 1.3c or later.
-----
<p>Copyright (C) 2001-2004, 2007, 2008, 2010, 2011, 2013 American Mathematical Society. <br />
-<p>Copyright (C) 2016-2019 The LaTeX Project and American Mathematical Society. <br />
+<p>Copyright (C) 2016-2020 The LaTeX Project and American Mathematical Society. <br />
diff --git a/macros/latex-dev/required/amsmath/amsbsy.dtx b/macros/latex-dev/required/amsmath/amsbsy.dtx
index 890fbd0d82..1174784278 100644
--- a/macros/latex-dev/required/amsmath/amsbsy.dtx
+++ b/macros/latex-dev/required/amsmath/amsbsy.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
diff --git a/macros/latex-dev/required/amsmath/amsbsy.ins b/macros/latex-dev/required/amsmath/amsbsy.ins
index fe1cd5413d..07707907e9 100644
--- a/macros/latex-dev/required/amsmath/amsbsy.ins
+++ b/macros/latex-dev/required/amsmath/amsbsy.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
diff --git a/macros/latex-dev/required/amsmath/amsbsy.pdf b/macros/latex-dev/required/amsmath/amsbsy.pdf
index 385669d431..7c3449cd04 100644
--- a/macros/latex-dev/required/amsmath/amsbsy.pdf
+++ b/macros/latex-dev/required/amsmath/amsbsy.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amscd.dtx b/macros/latex-dev/required/amsmath/amscd.dtx
index 2d0a35d685..12e94a11dc 100644
--- a/macros/latex-dev/required/amsmath/amscd.dtx
+++ b/macros/latex-dev/required/amsmath/amscd.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
diff --git a/macros/latex-dev/required/amsmath/amscd.ins b/macros/latex-dev/required/amsmath/amscd.ins
index 148c4cb32e..5890ca06c1 100644
--- a/macros/latex-dev/required/amsmath/amscd.ins
+++ b/macros/latex-dev/required/amsmath/amscd.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
diff --git a/macros/latex-dev/required/amsmath/amscd.pdf b/macros/latex-dev/required/amsmath/amscd.pdf
index 3ef1ed5ed1..2fba393436 100644
--- a/macros/latex-dev/required/amsmath/amscd.pdf
+++ b/macros/latex-dev/required/amsmath/amscd.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsgen.dtx b/macros/latex-dev/required/amsmath/amsgen.dtx
index 5edc26b9cc..92df548f12 100644
--- a/macros/latex-dev/required/amsmath/amsgen.dtx
+++ b/macros/latex-dev/required/amsmath/amsgen.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
diff --git a/macros/latex-dev/required/amsmath/amsgen.ins b/macros/latex-dev/required/amsmath/amsgen.ins
index 8c5683cb5a..be7720bc89 100644
--- a/macros/latex-dev/required/amsmath/amsgen.ins
+++ b/macros/latex-dev/required/amsmath/amsgen.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
diff --git a/macros/latex-dev/required/amsmath/amsgen.pdf b/macros/latex-dev/required/amsmath/amsgen.pdf
index 9867352fe7..5a66176289 100644
--- a/macros/latex-dev/required/amsmath/amsgen.pdf
+++ b/macros/latex-dev/required/amsmath/amsgen.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsldoc.pdf b/macros/latex-dev/required/amsmath/amsldoc.pdf
index 59248ae49f..53ff255a9d 100644
--- a/macros/latex-dev/required/amsmath/amsldoc.pdf
+++ b/macros/latex-dev/required/amsmath/amsldoc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsldoc.tex b/macros/latex-dev/required/amsmath/amsldoc.tex
index 8573682a66..b29a8b8468 100644
--- a/macros/latex-dev/required/amsmath/amsldoc.tex
+++ b/macros/latex-dev/required/amsmath/amsldoc.tex
@@ -1,6 +1,6 @@
%
% Copyright (C) 1995, 2000, 2013 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -9,9 +9,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
\documentclass[leqno,titlepage,openany]{amsldoc}[1999/12/13]
@@ -64,7 +64,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
\title{User's Guide for the \nipkg{amsmath} Package (Version~2.1)}
\author{American Mathematical Society, \LaTeX3 Project}
-\date{1999-12-13\\(revised 2002-02-25, 2016-11-14, 2018-04-05, 2019-10-14)}
+\date{1999-12-13\\(revised 2002-02-25, 2016-11-14, 2018-04-05, 2019-10-14, 2020-02-18)}
\makeatletter
\def\@thanks{\bigskip\MaintainedByLaTeXTeam{amslatex}}
\makeatother
@@ -928,7 +928,11 @@ in accurately calculating the profile of an equation can occasionally
result in number movement that doesn't look right.
A \cn{raisetag} command is provided to adjust the vertical position of the
current equation number, if it has been shifted away from its normal
-position. To move a particular number up by six points, write
+position. If it is in its normal position the command has no effect whatsoever.
+In particular, this means that one can't use it to shift the tag of an \env{equation}
+environment.
+
+To move a particular number up by six points, write
|\raisetag{6pt}|. (At the end of a display, this also shifts up the
text following the display.)
This kind of adjustment is fine tuning like line
@@ -1032,7 +1036,7 @@ C.8.4]{lamport}:
This works pretty well, except that the equation counter won't be reset
to zero at the beginning of a new section or chapter, unless you do it
yourself using \cn{setcounter}. To make this a little more convenient,
-the \nipkg{amsmath} package provides a
+the \nipkg{amsmath} package provides a
command\index{equationn@equation numbers!hierarchy} \cn{numberwithin}.
To have equation numbering tied to section numbering, with automatic
reset of the equation counter, write
diff --git a/macros/latex-dev/required/amsmath/amsmath-2018-12-01.sty b/macros/latex-dev/required/amsmath/amsmath-2018-12-01.sty
index f684834649..6bcb03e217 100644
--- a/macros/latex-dev/required/amsmath/amsmath-2018-12-01.sty
+++ b/macros/latex-dev/required/amsmath/amsmath-2018-12-01.sty
@@ -4,11 +4,11 @@
%%
%% The original source files were:
%%
-%% amsmath.dtx
-%%
+%% amsmath.dtx
+%%
%% Copyright 1995, 1999, 2000, 2013 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -16,11 +16,11 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 project.
-%%
+%%
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must be December 1994 or later
\ProvidesPackage{amsmath}[2018/12/01 v2.17b AMS math features]
diff --git a/macros/latex-dev/required/amsmath/amsmath.dtx b/macros/latex-dev/required/amsmath/amsmath.dtx
index 11b7545c26..e3ad7c6042 100644
--- a/macros/latex-dev/required/amsmath/amsmath.dtx
+++ b/macros/latex-dev/required/amsmath/amsmath.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 2000, 2013 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2019/11/16 v2.17d AMS math features]
+\ProvidesPackage{amsmath}[2020/03/17 v2.17g AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -302,10 +302,13 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
% \end{macrocode}
%
% Processing to handle the \opt{cmex10} option is a little tricky
-% because of different possible loading orders for \pkg{amsmath} and
-% \pkg{amsfonts}. The package \pkg{amsmath} sets the \cs{cmex@opt}
-% flag to 7 or 10, and the package \pkg{amsfonts} sets the flag to 1
-% or 0.
+% because of different possible loading orders for \pkg{amsmath}
+% and \pkg{amsfonts}. The package \pkg{amsmath} sets the
+% \cs{cmex@opt} flag to 0, 7 or 10, and in the past the package
+% \pkg{amsfonts} did set the flag to 1 or 0. These days it always
+% sets it to 10. The situation is a bit unsettled but we don't own
+% \pkg{amsfonts}.
+% \changes{v2.17d}{2019/12/01}{docu update, no code change (gh/200)}
% \begin{macrocode}
\ifnum\cmex@opt=7 \relax
\DeclareFontShape{OMX}{cmex}{m}{n}{%
@@ -463,24 +466,41 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
% \cs{DeclareRobustCommand}.
% \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{thinspace} and
% friends if necessary (github/49)}
+%
+% We start by undefining a number of commands (which in a current
+% \LaTeX{} kernel will be defined, so that the
+% \cs{DeclareRobustCommand} declarations below do not add a
+% ``Command redefined'' info into the log.
+% \begin{macrocode}
+\let\tmspace\@undefined
+\let\,\@undefined
+\let\!\@undefined
+\let\:\@undefined
+\let\negmedspace\@undefined
+\let\negthickspace\@undefined
+% \end{macrocode}
+%
+%
+% \changes{v2.17g}{2020/03/07}{Math/text spacing commands are now in
+% the \LaTeX{} kernel and are made robust (gh/303)}
% \begin{macrocode}
\ifx\leavevmode@ifvmode\@undefined
-\DeclareRobustCommand{\tmspace}[3]{%
+\DeclareRobustCommand\tmspace[3]{%
\ifmmode\mskip#1#2\else\kern#1#3\fi\relax}
\else
-\DeclareRobustCommand{\tmspace}[3]{%
+\DeclareRobustCommand\tmspace[3]{%
\ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax}
\fi
-\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
+\DeclareRobustCommand\,{\tmspace+\thinmuskip{.1667em}}
\let\thinspace\,
-\renewcommand{\!}{\tmspace-\thinmuskip{.1667em}}
+\DeclareRobustCommand\!{\tmspace-\thinmuskip{.1667em}}
\let\negthinspace\!
-\renewcommand{\:}{\tmspace+\medmuskip{.2222em}}
+\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}}
\let\medspace\:
-\newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}}
-\renewcommand{\;}{\tmspace+\thickmuskip{.2777em}}
+\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}}
+\renewcommand\;{\tmspace+\thickmuskip{.2777em}}
\let\thickspace\;
-\newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}}
+\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -517,9 +537,13 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
\@xp\@tempa\vert\@empty\@nil
\ifnum\@tempcnta>\z@
\advance\@tempcnta "4000000
- \xdef\lvert{\delimiter\number\@tempcnta\space }
+% \end{macrocode}
+% Use \cs{protected} on the new delimiters.
+% \changes{v2.17e}{2020/01/20}{Make delimiters robust (gh/251))}
+% \begin{macrocode}
+ \protected\xdef\lvert{\delimiter\number\@tempcnta\space }
\advance\@tempcnta "1000000
- \xdef\rvert{\delimiter\number\@tempcnta\space }
+ \protected\xdef\rvert{\delimiter\number\@tempcnta\space }
\else
\ifx\@@undefined\lvert
% Fall back to cmex encoding since we don't know what else to do.
@@ -532,9 +556,9 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
\@xp\@tempa\Vert\@empty\@nil
\ifnum\@tempcnta>\z@
\advance\@tempcnta "4000000
- \xdef\lVert{\delimiter\number\@tempcnta\space }
+ \protected\xdef\lVert{\delimiter\number\@tempcnta\space }
\advance\@tempcnta "1000000
- \xdef\rVert{\delimiter\number\@tempcnta\space }
+ \protected\xdef\rVert{\delimiter\number\@tempcnta\space }
\else
\ifx\@@undefined\lVert
\DeclareMathDelimiter{\lVert}
@@ -645,13 +669,13 @@ Foreign command \@backslashchar#1;\MessageBreak
% \end{macrocode}
%
% \begin{macrocode}
-\else
+\else
% \end{macrocode}
% XeTeX version
% \begin{macrocode}
\def\genfrac@rule#1#2#3#4{%
\hbox{$\left#1\vcenter{\hrule \@width\z@
- \@height
+ \@height
\ifdim\fontdimen#2#3\tw@=\z@
#4\fontdimen6#3\tw@
\else
@@ -697,7 +721,7 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macrocode}
\def\genfrac@rule#1#2#3{%
\hbox{$\left#1\vcenter{\hrule \@width\z@
- \@height
+ \@height
\ifdim\Umathfractiondelsize#2=\z@
#3\fontdimen6#3\tw@
\else
@@ -1093,7 +1117,7 @@ Foreign command \@backslashchar#1;\MessageBreak
% \changes{v2.15}{2016/02/20}{Indent \cs{mdots@@} for readability and add additional tests}
% \begin{macrocode}
\def\mdots@@{\gdef\thedots@{\dotso@}%
- \ifx\@let@token\boldsymbol
+ \ifx\@let@token\boldsymbol
\gdef\thedots@\boldsymbol{\boldsymboldots@}%
\else
\ifx,\@let@token \gdef\thedots@{\dotsc}%
@@ -1167,7 +1191,7 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macrocode}
\fi % end macro \ifgtest@ test (no else)
\fi % end if \Umathchar test
- \fi % end \math@ \ifgtest@
+ \fi % end \math@ \ifgtest@
\fi % end \keybin@ \ifgtest@ test (no else)
\fi % end if \not (no else)
\fi % end if comma (no else)
@@ -1626,13 +1650,15 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macro}{\dddot}
% \begin{macro}{\ddddot}
% Triple and quadruple dot accents.
+% \changes{v2.17f}{2020/02/20}{Add a kern so that a single char is not
+% vertically shifted and move the dots slightly to the right (gh/126)}
% \begin{macrocode}
\ams@newcommand{\dddot}[1]{%
- {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
- \hbox{\normalfont ...}\vss}}}}
+ {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
+ \hbox{\,\normalfont...}\vss}}}}
\ams@newcommand{\ddddot}[1]{%
- {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
- \hbox{\normalfont....}\vss}}}}
+ {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
+ \hbox{\,\normalfont....}\vss}}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3190,9 +3216,10 @@ ill-advised in LaTeX.%
% \end{macro}
%
% \begin{macro}{\ifst@rred}
-% The switch |st@rred| is set to true by all starred
-% environments
-% and set to false by the unstarred versions.
+% The switch |st@rred| is set to true by all starred environments
+% and set to false by the unstarred versions.
+% One exception is the \env{xxalignat} environment where this is set
+% to true.
% \begin{macrocode}
\newif\ifst@rred
% \end{macrocode}
@@ -3430,7 +3457,8 @@ and fix things up.}
% \end{macro}
%
% \begin{macro}{\black@}
-% \changes{v2.17a}{2017/09/02}{add fixed width box so overfull warning generated in centred environments in lists}
+% \changes{v2.17a}{2017/09/02}{Add fixed width box so overfull warning
+% generated in centred environments in lists}
% This macro is made to produce an overfull box message and
% possibly (depending on the value of \cs{overfullrule})
% a rule in the margin if the total width of an alignment
@@ -3443,7 +3471,8 @@ and fix things up.}
\nointerlineskip
\vskip-\ht\strutbox@
\vskip-\dp\strutbox@
- \vbox{\noindent\hbox to\displaywidth{\hbox to#1{\strut@\hfill}}}%
+ \vbox{\noindent\hbox to\displaywidth{%
+ \hbox to#1{\strut@\hfill}}}%
\prevdepth\dimen@
\fi
}%
@@ -3645,6 +3674,77 @@ and fix things up.}
% \end{macrocode}
% \end{macro}
%
+%
+%
+% \begin{macro}{\ams@start@box}
+% This macro tests the optional positioning argument (in
+% \texttt{gathered} or \texttt{aligned}. It explicitly tests for the
+% value \texttt{b}, \texttt{c} and \texttt{t} and if the value is
+% different, then we assume that it is a bracket group that belongs
+% to the formula instead of being an misspelled optional argument.
+% (In earlier versions of the code anything other than \texttt{b}
+% or \texttt{t} was interpreted as \texttt{c} and the data was
+% otherwise dropped.)
+% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% optional argument is different (gh/5)}
+% \begin{macrocode}
+\def\ams@start@box#1{%
+% \end{macrocode}
+% As we may pick up an arbitrary part of the formula by mistake, we
+% need to be very careful with the testing to avoid low-level
+% errors. This is why we use \cs{detokenize}. But we also need to
+% expand the argument (if possible) in case the position value is
+% hidden inside a macro. We therefore apply the \cs{romannumeral}
+% trick (known as f-expansion in \texttt{expl3}) in its old form.
+% The code assumes that
+% the default is correctly set up (which in this case is \texttt{c}).
+% \begin{macrocode}
+ \edef\reserved@a{\csname ams@pos@\expandafter\detokenize
+ \expandafter{\romannumeral-`\0#1}\endcsname}%
+ \expandafter\ifx\reserved@a\relax
+% \end{macrocode}
+% If the argument is neither \texttt{b}, \texttt{c} or \texttt{t}
+% we save it in \cs{ams@return@opt@arg}, so it can later be
+% returned as part of the environment body. We could at this point
+% also issue a warning that bracket group was found at the start of
+% the formula and that it is safer to add a \cs{relax} before it.
+% \begin{macrocode}
+ \PackageWarning{amsmath}{%
+ Bracket group \detokenize{[#1]} at formula start!\MessageBreak
+ It could be a misspelled positional argument.\MessageBreak
+ If it belongs to the formula add a \relax in\MessageBreak
+ front to hide it}%
+ \def\ams@return@opt@arg{[#1]}\vcenter
+% \end{macrocode}
+% If the argument was identified then we clear
+% \cs{ams@return@opt@arg} (just in case somebod ever nests these
+% environment.
+% \begin{macrocode}
+ \else
+ \let\ams@return@opt@arg\@empty\reserved@a
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macro}{\ams@pos@t}
+% \begin{macro}{\ams@pos@b}
+% \begin{macro}{\ams@pos@c}
+%
+% \begin{macrocode}
+\def\ams@pos@t{\vtop}
+\def\ams@pos@b{\vbox}
+\def\ams@pos@c{\vcenter}
+% \end{macrocode}
+% And we accept an empty argument as a way to get the default (as
+% that was the case before as well, albeit by mistake in some sense).
+% \begin{macrocode}
+\let\ams@pos@\ams@pos@c
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\start@aligned}
% The \env{aligned} and \env{alignedat} environments are identical
% except that the latter takes a mandatory argument to specify the
@@ -3669,7 +3769,10 @@ and fix things up.}
% to the margin.
% \begin{macrocode}
\alignedspace@left
- \if #1t\vtop \else \if#1b \vbox \else \vcenter \fi \fi \bgroup
+% \end{macrocode}
+% Select the right kind of box based on the optional argument \verb=#1=.
+% \begin{macrocode}
+ \ams@start@box{#1}\bgroup
\maxfields@#2\relax
\ifnum\maxfields@>\m@ne
\multiply\maxfields@\tw@
@@ -3712,6 +3815,13 @@ and fix things up.}
\hfil
\tabskip\alignsep@
\crcr
+% \end{macrocode}
+% If we picked up a bracket group by mistake here is the place to
+% return it for processing.
+% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% optional argument is different (gh/5)}
+% \begin{macrocode}
+ \ams@return@opt@arg
}
% \end{macrocode}
% \end{macro}
@@ -3796,12 +3906,21 @@ and fix things up.}
\nonmatherr@{\begin{gathered}}%
\fi
\alignedspace@left
- \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi \bgroup
+% \end{macrocode}
+% Select the right kind of box based on the optional argument \verb=#1=.
+% \begin{macrocode}
+ \ams@start@box{#1}\bgroup
\Let@ \chardef\dspbrk@context\@ne \restore@math@cr
\spread@equation
\ialign\bgroup
\hfil\strut@$\m@th\displaystyle##$\hfil
\crcr
+% \end{macrocode}
+% And put a mistaking picked up bracket group back:
+% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% optional argument is different (gh/5)}
+% \begin{macrocode}
+ \ams@return@opt@arg
}{%
\endaligned
}
diff --git a/macros/latex-dev/required/amsmath/amsmath.ins b/macros/latex-dev/required/amsmath/amsmath.ins
index 7a6a087359..55e4089804 100644
--- a/macros/latex-dev/required/amsmath/amsmath.ins
+++ b/macros/latex-dev/required/amsmath/amsmath.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
diff --git a/macros/latex-dev/required/amsmath/amsmath.pdf b/macros/latex-dev/required/amsmath/amsmath.pdf
index ec130fb9d7..8a5dbcd335 100644
--- a/macros/latex-dev/required/amsmath/amsmath.pdf
+++ b/macros/latex-dev/required/amsmath/amsmath.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsopn.dtx b/macros/latex-dev/required/amsmath/amsopn.dtx
index b7047377f3..35c3b1605b 100644
--- a/macros/latex-dev/required/amsmath/amsopn.dtx
+++ b/macros/latex-dev/required/amsmath/amsopn.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
diff --git a/macros/latex-dev/required/amsmath/amsopn.ins b/macros/latex-dev/required/amsmath/amsopn.ins
index 8c977446cc..84aff6243b 100644
--- a/macros/latex-dev/required/amsmath/amsopn.ins
+++ b/macros/latex-dev/required/amsmath/amsopn.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
diff --git a/macros/latex-dev/required/amsmath/amsopn.pdf b/macros/latex-dev/required/amsmath/amsopn.pdf
index b518ffd88e..8da892be6d 100644
--- a/macros/latex-dev/required/amsmath/amsopn.pdf
+++ b/macros/latex-dev/required/amsmath/amsopn.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amstex.sty b/macros/latex-dev/required/amsmath/amstex.sty
index edb57c1214..6ce36f52c9 100644
--- a/macros/latex-dev/required/amsmath/amstex.sty
+++ b/macros/latex-dev/required/amsmath/amstex.sty
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
diff --git a/macros/latex-dev/required/amsmath/amstext.dtx b/macros/latex-dev/required/amsmath/amstext.dtx
index a4c9aeb5d9..5e7e6ca672 100644
--- a/macros/latex-dev/required/amsmath/amstext.dtx
+++ b/macros/latex-dev/required/amsmath/amstext.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
@@ -139,7 +139,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% The macros \cs{f@size}, \cs{sf@size} and \cs{ssf@size} hold the
% sizes which should be used when we are loading a new font for use
% in \cs{textfont}, \cs{scriptfont} and \cs{scriptscriptfont}. There
-% is some question whether we should use use \cs{tf@size} or
+% is some question whether we should use \cs{tf@size} or
% \cs{f@size} for the main size, but since the primary purpose of the
% \cn{text} macro is to switch back to text within a display, it
% seems that \cs{f@size} is the better choice. (Indeed it could be
diff --git a/macros/latex-dev/required/amsmath/amstext.ins b/macros/latex-dev/required/amsmath/amstext.ins
index 84fcb0cb95..5f9a5c4076 100644
--- a/macros/latex-dev/required/amsmath/amstext.ins
+++ b/macros/latex-dev/required/amsmath/amstext.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
@@ -48,4 +48,3 @@ The Current Maintainer of this work is the LaTeX3 project.
}
\endbatchfile
-
diff --git a/macros/latex-dev/required/amsmath/amstext.pdf b/macros/latex-dev/required/amsmath/amstext.pdf
index 2df324d60a..c0e854f4c7 100644
--- a/macros/latex-dev/required/amsmath/amstext.pdf
+++ b/macros/latex-dev/required/amsmath/amstext.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsxtra.dtx b/macros/latex-dev/required/amsmath/amsxtra.dtx
index 2165dde41a..9cc0b71027 100644
--- a/macros/latex-dev/required/amsmath/amsxtra.dtx
+++ b/macros/latex-dev/required/amsmath/amsxtra.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2019 LaTeX3 Project and American Mathematical Society.
+% Copyright (C) 2016-2020 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -11,9 +11,9 @@
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
-%
+%
% This work has the LPPL maintenance status `maintained'.
-%
+%
% The Current Maintainer of this work is the LaTeX3 Project.
%
% \fi
diff --git a/macros/latex-dev/required/amsmath/amsxtra.ins b/macros/latex-dev/required/amsmath/amsxtra.ins
index 9e739c3d4b..bbcd08e3f7 100644
--- a/macros/latex-dev/required/amsmath/amsxtra.ins
+++ b/macros/latex-dev/required/amsmath/amsxtra.ins
@@ -1,7 +1,7 @@
-%%
+%%
%% Copyright 2010 American Mathematical Society.
%% Copyright 2016 LaTeX3 Project and American Mathematical Society.
-%%
+%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
@@ -9,9 +9,9 @@
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-%%
+%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is the LaTeX3 Project.
%%
%% ====================================================================
@@ -48,4 +48,3 @@ The Current Maintainer of this work is the LaTeX3 project.
}
\endbatchfile
-
diff --git a/macros/latex-dev/required/amsmath/amsxtra.pdf b/macros/latex-dev/required/amsmath/amsxtra.pdf
index 1130ed79aa..1fb0b379fa 100644
--- a/macros/latex-dev/required/amsmath/amsxtra.pdf
+++ b/macros/latex-dev/required/amsmath/amsxtra.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/changes.txt b/macros/latex-dev/required/amsmath/changes.txt
index e5e234cea2..bf5bbfe397 100644
--- a/macros/latex-dev/required/amsmath/changes.txt
+++ b/macros/latex-dev/required/amsmath/changes.txt
@@ -1,3 +1,31 @@
+2020-03-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{Simple aligning environments}):
+ Explicity test for b,t,c and return optional argument is
+ different (gh/5)
+
+2020-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{Math spacing commands}):
+ Math/text spacing commands are now in the \LaTeX{} kernel and are
+ made robust. We still define them here so that the package
+ continues to work with older formats (gh/303)
+
+
+#########################
+# 2020-02-02 Release
+#########################
+
+2020-01-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{Vertical bar symbols}):
+ Make \lvert, \rvert, \lVert and \rVert robust to match kernel
+ correction (gh/251)
+
+2019-12-01 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx: docu update for gh/200 no code change.
+
#########################
# 2019-11-17 Release
#########################
@@ -14,7 +42,8 @@
2019-10-11 David Carlisle <David.Carlisle@latex-project.org>
- * build.lua: package amsmath-2018-12-01.sty (only ctan build script no source changes)
+ * build.lua: package amsmath-2018-12-01.sty (only ctan build script
+ no source changes)
#########################
# 2019-10-01 Release
diff --git a/macros/latex-dev/required/amsmath/subeqn.pdf b/macros/latex-dev/required/amsmath/subeqn.pdf
index 0b5cdd1ff6..2653db5fc6 100644
--- a/macros/latex-dev/required/amsmath/subeqn.pdf
+++ b/macros/latex-dev/required/amsmath/subeqn.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/subeqn.tex b/macros/latex-dev/required/amsmath/subeqn.tex
index c34b3f6952..7e07f61d01 100644
--- a/macros/latex-dev/required/amsmath/subeqn.tex
+++ b/macros/latex-dev/required/amsmath/subeqn.tex
@@ -90,7 +90,7 @@ C=D
And that was equation \eqref{e:prevprime}.
Notice, by the way, that when a \verb"\ref" occurs inside a \verb"\tag",
-and that \verb"\tag" is then \verb"\label"'d, a \verb"\ref" for the the
+and that \verb"\tag" is then \verb"\label"'d, a \verb"\ref" for the
second \verb"\label" requires \emph{three} runs of \LaTeX{} in order to
get the proper value. (If you run through the logic of \LaTeX{}'s
cross-referencing mechanisms as they apply in this case, you will see
diff --git a/macros/latex-dev/required/amsmath/technote.pdf b/macros/latex-dev/required/amsmath/technote.pdf
index c517a1cdf8..ed9eb2ff83 100644
--- a/macros/latex-dev/required/amsmath/technote.pdf
+++ b/macros/latex-dev/required/amsmath/technote.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/testmath.pdf b/macros/latex-dev/required/amsmath/testmath.pdf
index e8e64c8fce..c764b160b8 100644
--- a/macros/latex-dev/required/amsmath/testmath.pdf
+++ b/macros/latex-dev/required/amsmath/testmath.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/README.md b/macros/latex-dev/required/graphics/README.md
index b75bb681cc..9195e612d1 100644
--- a/macros/latex-dev/required/graphics/README.md
+++ b/macros/latex-dev/required/graphics/README.md
@@ -1,7 +1,7 @@
The LaTeX `graphics` bundle
===========================
-Release 2020-10-01 pre-release 0
+Release 2020-10-01 pre-release 1
Overview
--------
diff --git a/macros/latex-dev/required/graphics/changes.txt b/macros/latex-dev/required/graphics/changes.txt
index 108723ddb4..42ce0dea02 100644
--- a/macros/latex-dev/required/graphics/changes.txt
+++ b/macros/latex-dev/required/graphics/changes.txt
@@ -4,6 +4,9 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2020-02-24 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * color.dtx: corrected a tests, graphics/3635
+
#########################
# 2020-02-02 Release
#########################
diff --git a/macros/latex-dev/required/graphics/color.dtx b/macros/latex-dev/required/graphics/color.dtx
index ad5df89a7e..cdc2dbe5fe 100644
--- a/macros/latex-dev/required/graphics/color.dtx
+++ b/macros/latex-dev/required/graphics/color.dtx
@@ -19,7 +19,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
- [2019/11/23 v1.2a Standard LaTeX Color (DPC)]
+ [2020/02/24 v1.2b Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
@@ -558,6 +558,8 @@
% {usenames option added}
% \changes{v0.3f}{1994/10/04}
% {Give info about redefinitions}
+% \changes{v1.2b}{2020/02/24}
+% {corrected test, see https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=graphics/3635}
%
% Driver files may opt to define a `named' colour model.
% Placing colour names rather than numeric specifications into the dvi
@@ -603,7 +605,7 @@
{\c@lor@error{model `#1'}}%
{\@ifundefined{color@#3}%
{\c@lor@error{model `#3'}}%
- {\@ifundefined{c@lor@#1@#2}{}%
+ {\@ifundefined{col@#2}{}%
{\PackageInfo{color}{Redefining color #2 in named color model}}%
\csname color@#3\endcsname\@tempa{#4}%
\csname define@color@#1\endcsname{#2}\@tempa
diff --git a/macros/latex-dev/required/graphics/color.pdf b/macros/latex-dev/required/graphics/color.pdf
index 0ecd33fafb..4749ea345f 100644
--- a/macros/latex-dev/required/graphics/color.pdf
+++ b/macros/latex-dev/required/graphics/color.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/drivers.pdf b/macros/latex-dev/required/graphics/drivers.pdf
index 1076d75a3d..418d8f8f47 100644
--- a/macros/latex-dev/required/graphics/drivers.pdf
+++ b/macros/latex-dev/required/graphics/drivers.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/epsfig.pdf b/macros/latex-dev/required/graphics/epsfig.pdf
index 74d0f4559e..3949a190c2 100644
--- a/macros/latex-dev/required/graphics/epsfig.pdf
+++ b/macros/latex-dev/required/graphics/epsfig.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/graphics.pdf b/macros/latex-dev/required/graphics/graphics.pdf
index 33fa244236..f7fb560c23 100644
--- a/macros/latex-dev/required/graphics/graphics.pdf
+++ b/macros/latex-dev/required/graphics/graphics.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/graphicx.pdf b/macros/latex-dev/required/graphics/graphicx.pdf
index 10f8c48f30..75b1f1e532 100644
--- a/macros/latex-dev/required/graphics/graphicx.pdf
+++ b/macros/latex-dev/required/graphics/graphicx.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/grfguide.pdf b/macros/latex-dev/required/graphics/grfguide.pdf
index 62e4f81a6a..caf1b70912 100644
--- a/macros/latex-dev/required/graphics/grfguide.pdf
+++ b/macros/latex-dev/required/graphics/grfguide.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/keyval.pdf b/macros/latex-dev/required/graphics/keyval.pdf
index e8a34f7567..8536c2c716 100644
--- a/macros/latex-dev/required/graphics/keyval.pdf
+++ b/macros/latex-dev/required/graphics/keyval.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/lscape.pdf b/macros/latex-dev/required/graphics/lscape.pdf
index fbd59d224f..02d9c42d63 100644
--- a/macros/latex-dev/required/graphics/lscape.pdf
+++ b/macros/latex-dev/required/graphics/lscape.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/rotating.pdf b/macros/latex-dev/required/graphics/rotating.pdf
index 88d1d1b909..5abe51370c 100644
--- a/macros/latex-dev/required/graphics/rotating.pdf
+++ b/macros/latex-dev/required/graphics/rotating.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/rotex.pdf b/macros/latex-dev/required/graphics/rotex.pdf
index da6de15300..98919825a3 100644
--- a/macros/latex-dev/required/graphics/rotex.pdf
+++ b/macros/latex-dev/required/graphics/rotex.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/trig.pdf b/macros/latex-dev/required/graphics/trig.pdf
index 9474549f6f..9863ea585e 100644
--- a/macros/latex-dev/required/graphics/trig.pdf
+++ b/macros/latex-dev/required/graphics/trig.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/README.md b/macros/latex-dev/required/tools/README.md
index 4b71d9f6eb..9167c2292c 100644
--- a/macros/latex-dev/required/tools/README.md
+++ b/macros/latex-dev/required/tools/README.md
@@ -1,7 +1,7 @@
The LaTeX `tools` bundle
========================
-Release 2020-10-01 pre-release 2
+Release 2020-10-01 pre-release 3
Overview
--------
diff --git a/macros/latex-dev/required/tools/afterpage.pdf b/macros/latex-dev/required/tools/afterpage.pdf
index b06001b416..8b7c701c7a 100644
--- a/macros/latex-dev/required/tools/afterpage.pdf
+++ b/macros/latex-dev/required/tools/afterpage.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/array-2020-02-10.sty b/macros/latex-dev/required/tools/array-2020-02-10.sty
new file mode 100644
index 0000000000..9fddc0d490
--- /dev/null
+++ b/macros/latex-dev/required/tools/array-2020-02-10.sty
@@ -0,0 +1,374 @@
+%%
+%% This is file `array.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% array.dtx (with options: `package,ncols')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs/
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
+%% --------------------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%%
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%% Package `array' to use with LaTeX 2e
+%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
+\DeclareCurrentRelease{}{2019-10-01}
+
+\ProvidesPackage{array}
+ [2020/02/10 v2.4m Tabular extension package (FMi)]
+%%
+
+\def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
+\def\@testpach{\@chclass
+ \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
+ \ifnum \@lastchclass=7 5 \else
+ \ifnum \@lastchclass=8 \tw@ \else
+ \ifnum \@lastchclass=9 \thr@@
+ \else \z@
+ \ifnum \@lastchclass = 10 \else
+ \edef\@nextchar{\expandafter\string\@nextchar}%
+ \@chnum
+ \if \@nextchar c\z@ \else
+ \if \@nextchar l\@ne \else
+ \if \@nextchar r\tw@ \else
+ \z@ \@chclass
+ \if\@nextchar |\@ne \else
+ \if \@nextchar !6 \else
+ \if \@nextchar @7 \else
+ \if \@nextchar <8 \else
+ \if \@nextchar >9 \else
+ 10
+ \@chnum
+ \if \@nextchar m\thr@@\else
+ \if \@nextchar p4 \else
+ \if \@nextchar b5 \else
+ \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
+ \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}
+\def\@xexpast#1*#2#3#4\@@{%
+ \@tempcnta #2
+ \toks@={#1}\@temptokena={#3}%
+ \let\the@toksz\relax \let\the@toks\relax
+ \def\@tempa{\the@toksz}%
+ \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
+ {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
+ \let \@tempb \@xexpast \else
+ \let \@tempb \@xexnoop \fi
+ \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
+ \edef\@tempa{\@tempa}%
+ \expandafter \@tempb \@tempa #4\@@}
+\def\prepnext@tok{\advance \count@ \@ne
+ \toks\count@{}}
+\def\save@decl{\toks\count@ \expandafter{\@nextchar}}
+\def\insert@column{%
+ \the@toks \the \@tempcnta
+ \ignorespaces \@sharp \unskip
+ \the@toks \the \count@ \relax}
+\newdimen\col@sep
+\def\@acol{\@addtopreamble{\hskip\col@sep}}
+\def\@classx{%
+ \ifcase \@lastchclass
+ \@acolampacol \or
+ \@addamp \@acol \or
+ \@acolampacol \or
+ \or
+ \@acol \@firstampfalse \or
+ \@addamp
+ \fi}
+\def\@classz{\@classx
+ \@tempcnta \count@
+ \prepnext@tok
+ \@addtopreamble{\ifcase \@chnum
+ \hfil
+ \hskip1sp%
+ \d@llarbegin
+ \insert@column
+ \d@llarend \do@row@strut \hfil \or
+ \hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \hfil \or
+ \hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \do@row@strut \or
+ \setbox\ar@mcellbox\vbox
+ \@startpbox{\@nextchar}\insert@column \@endpbox
+ \ar@align@mcell
+ \do@row@strut \or
+ \vtop \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut \or
+ \vbox \@startpbox{\@nextchar}\insert@column \@endpbox\do@row@strut
+ \fi}\prepnext@tok}
+
+\newbox\ar@mcellbox
+\def\ar@align@mcell{%
+ \ifdim \ht\ar@mcellbox > \ht\@arstrutbox
+ \begingroup
+ \dimen@\ht\ar@mcellbox
+ \advance\dimen@-\ht\@arstrutbox
+ \advance\dimen@\baselineskip
+ \lower.5\dimen@\box\ar@mcellbox
+ \endgroup
+ \else % assume one line and align at baseline
+ \box\ar@mcellbox
+ \fi}
+
+\def\@arrayrule{\@addtopreamble \vline}
+\def\@classvii{\ifnum \@lastchclass = \thr@@
+ \@preamerr \thr@@ \fi}
+\def\@classvi{\ifcase \@lastchclass
+ \@acol \or
+ \@addtopreamble{\hskip \doublerulesep}\or
+ \@acol \or
+ \@classvii
+ \fi}
+\def\@classii{\advance \count@ \m@ne
+ \save@decl\prepnext@tok}
+\def\@classi{\@classvi
+ \ifcase \@chnum \@arrayrule \or
+ \@classv \fi}
+\def\@startpbox#1{\bgroup
+ \color@begingroup
+ \setlength\hsize{#1}\@arrayparboxrestore
+ \everypar{%
+ \vrule \@height \ht\@arstrutbox \@width \z@
+ \everypar{}}%
+ }
+\def\@endpbox{\@finalstrut\@arstrutbox \color@endgroup \egroup\hfil}
+\def\@array[#1]#2{%
+ \@tempdima \ht \strutbox
+ \advance \@tempdima by\extrarowheight
+ \setbox \@arstrutbox \hbox{\vrule
+ \@height \arraystretch \@tempdima
+ \@depth \arraystretch \dp \strutbox
+ \@width \z@}%
+ \begingroup
+ \@mkpream{#2}%
+ \xdef\@preamble{\noexpand \ialign \@halignto
+ \bgroup \@arstrut \@preamble
+ \tabskip \z@ \cr}%
+ \endgroup
+ \@arrayleft
+ \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
+ \bgroup
+ \let \@sharp ##\let \protect \relax
+ \lineskip \z@
+ \baselineskip \z@
+ \m@th
+ \let\\\@arraycr \let\tabularnewline\\\let\par\@empty \@preamble}
+\def\arraybackslash{\let\\\tabularnewline}
+\newdimen \extrarowheight
+\extrarowheight=0pt
+\def\@arstrut{\unhcopy\@arstrutbox}
+\def\@arraycr{\relax\iffalse{\fi\ifnum 0=`}\fi
+ \@ifstar \@xarraycr \@xarraycr}
+\def\@xarraycr{\@ifnextchar [%
+ \@argarraycr {\ifnum 0=`{}\fi\cr}}
+\def\@argarraycr[#1]{\ifnum0=`{}\fi\ifdim #1>\z@
+ \expandafter\@xargarraycr\else
+ \expandafter\@yargarraycr\fi{#1}}
+\def\@xargarraycr#1{\unskip\gdef\do@row@strut
+ {\@tempdima #1\advance\@tempdima \dp\@arstrutbox
+ \vrule \@depth\@tempdima \@width\z@\global\let\do@row@strut\relax}%
+ % \begin{macrocode}
+ \ifnum\@multicnt >\z@ \do@row@strut \fi
+ \cr}
+\let\do@row@strut\relax
+\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+\long\def\multicolumn#1#2#3{%
+ \multispan{#1}\begingroup
+ \def\@addamp{\if@firstamp \@firstampfalse \else
+ \@preamerr 5\fi}%
+ \@mkpream{#2}\@addtopreamble\@empty
+ \endgroup
+ \def\@sharp{#3}%
+ \@arstrut \@preamble
+ \null
+ \ignorespaces}
+\let\d@llarbegin\begingroup
+\let\d@llarend\endgroup
+\def\array{\col@sep\arraycolsep
+ \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\def\@halignto{}%
+ \@tabarray}
+\def\tabular{\def\@halignto{}\@tabular}
+\expandafter\def\csname tabular*\endcsname#1{%
+ \setlength\dimen@{#1}%
+ \edef\@halignto{to\the\dimen@}\@tabular}
+\def\@tabular{%
+ \leavevmode
+ \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup
+ \let\d@llarend\endgroup
+ \@tabarray}
+\def\endtabular{\endarray $\egroup}
+\expandafter\let\csname endtabular*\endcsname=\endtabular
+\let\@ampacol=\relax \let\@expast=\relax
+\let\@arrayclassiv=\relax \let\@arrayclassz=\relax
+\let\@tabclassiv=\relax \let\@tabclassz=\relax
+\let\@arrayacol=\relax \let\@tabacol=\relax
+\let\@tabularcr=\relax \let\@@endpbox=\relax
+\let\@argtabularcr=\relax \let\@xtabularcr=\relax
+\def\@preamerr#1{\def\@tempd{{..} at wrong position: }%
+ \PackageError{array}{%
+ \ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0
+ Missing arg: token ignored\or %1
+ Empty preamble: `l' used\or %2
+ >\@tempd token ignored\or %3
+ <\@tempd changed to !{..}\or %4
+ Only one column-spec. allowed.\fi}\@ehc} %5
+\def\newcolumntype#1{%
+ \edef\NC@char{\string#1}%
+ \@ifundefined{NC@find@\NC@char}%
+ {\@tfor\next:=<>clrmbp@!|\do
+ {%
+ \if\expandafter\noexpand\next\NC@char
+ \PackageWarning{array}%
+ {Redefining primitive column \NC@char}\fi}%
+ \NC@list\expandafter{\the\NC@list\NC@do#1}}%
+ {\PackageWarning{array}{Column \NC@char\space is already defined}}%
+ \@namedef{NC@find@\NC@char}##1#1{\NC@{##1}}%
+ \@ifnextchar[{\newcol@{\NC@char}}{\newcol@{\NC@char}[0]}}
+\def\newcol@#1[#2]#3{\expandafter\@reargdef
+ \csname NC@rewrite@#1\endcsname[#2]{\NC@find#3}}
+\def\NC@#1{%
+ \@temptokena\expandafter{\the\@temptokena#1}\futurelet\next\NC@ifend}
+\def\NC@ifend{%
+ \ifx\next\relax
+ \else\@tempswatrue\expandafter\NC@rewrite\fi}
+\def\NC@do#1{%
+ \expandafter\let\expandafter\NC@rewrite
+ \csname NC@rewrite@\string#1\endcsname
+ \expandafter\let\expandafter\NC@find
+ \csname NC@find@\string#1\endcsname
+ \expandafter\@temptokena\expandafter{\expandafter}%
+ \expandafter\NC@find\the\@temptokena#1\relax}
+\def\showcols{{\def\NC@do##1{\let\NC@do\NC@show}\the\NC@list}}
+\def\NC@show#1{%
+ \typeout{Column #1\expandafter\expandafter\expandafter\NC@strip
+ \expandafter\meaning\csname NC@rewrite@#1\endcsname\@@}}
+\def\NC@strip#1:#2->#3 #4\@@{#2 -> #4}
+\newtoks\NC@list
+\newcolumntype{*}[2]{}
+\long\@namedef{NC@rewrite@*}#1#2{%
+ \count@#1\relax
+ \loop
+ \ifnum\count@>\z@
+ \advance\count@\m@ne
+ \@temptokena\expandafter{\the\@temptokena#2}%
+ \repeat
+ \NC@find}
+\let\@xexpast\relax
+\let\@xexnoop\relax
+\def\save@decl{\toks \count@ = \expandafter\expandafter\expandafter
+ {\expandafter\@nextchar\the\toks\count@}}
+\def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
+ \let\@sharp\relax
+ \def\@startpbox##1{\unexpanded\expandafter{\expandafter
+ \@startpbox\expandafter{##1}}}\let\@endpbox\relax
+ \let\do@row@strut\relax
+ \let\ar@align@mcell\relax
+ \@temptokena{#1}\@tempswatrue
+ \@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
+ \count@\m@ne
+ \let\the@toks\relax
+ \prepnext@tok
+ \expandafter \@tfor \expandafter \@nextchar
+ \expandafter :\expandafter =\the\@temptokena \do
+ {\@testpach
+ \ifcase \@chclass \@classz \or \@classi \or \@classii
+ \or \save@decl \or \or \@classv \or \@classvi
+ \or \@classvii \or \@classviii
+ \or \@classx
+ \or \@classx \fi
+ \@lastchclass\@chclass}%
+ \ifcase\@lastchclass
+ \@acol \or
+ \or
+ \@acol \or
+ \@preamerr \thr@@ \or
+ \@preamerr \tw@ \@addtopreamble\@sharp \or
+ \or
+ \else \@preamerr \@ne \fi
+ \def\the@toks{\the\toks}}
+\let\@classix\relax
+\def\@classviii{\ifnum \@lastchclass >\z@\ifnum\@lastchclass=\tw@\else
+ \@preamerr 4\@chclass 6 \@classvi \fi\fi}
+\def\@classv{\save@decl
+ \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@
+ \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
+ \prepnext@tok}
+\def\NC@ecs#1\extracolsep#2#3\extracolsep#4\@@@{\def\@tempa{#2}%
+ \ifx\@tempa\@empty\else\toks\count@={#1\tabskip#2\relax#3}\fi}
+\def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}}
+\let\@@array\@array
+\def\endarray{\crcr \egroup \egroup \@arrayright \gdef\@preamble{}}
+\let\@arrayleft\@empty
+\let\@arrayright\@empty
+\newlength{\extratabsurround}
+\setlength{\extratabsurround}{2pt}
+\newlength{\backup@length}
+\newcommand{\firsthline}{%
+ \multicolumn1c{%
+ \global\backup@length\ht\@arstrutbox
+ \global\advance\backup@length\dp\@arstrutbox
+ \global\advance\backup@length\arrayrulewidth
+ \raise\extratabsurround\copy\@arstrutbox
+ }\\[-\backup@length]\hline
+}
+\newcommand{\lasthline}{\hline\multicolumn1c{%
+ \global\backup@length2\ht\@arstrutbox
+ \global\advance\backup@length2\dp\@arstrutbox
+ \global\advance\backup@length\arrayrulewidth
+ }\\[-\backup@length]%
+ \multicolumn1c{%
+ \lower\extratabsurround\copy\@arstrutbox
+ }%
+}
+\CheckCommand*\@xhline{\ifx\reserved@a\hline
+ \vskip\doublerulesep
+ \vskip-\arrayrulewidth
+ \fi
+ \ifnum0=`{\fi}}
+\renewcommand*\@xhline{\ifx\reserved@a\hline
+ \vskip\doublerulesep
+ \fi
+ \ifnum0=`{\fi}}
+
+\newsavebox\ar@cellbox
+\newcolumntype{w}[2]{%
+ >{\begin{lrbox}\ar@cellbox}%
+ c%
+ <{\end{lrbox}%
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
+
+\newcolumntype{W}[2]
+ {>{\begin{lrbox}\ar@cellbox}%
+ c%
+ <{\end{lrbox}%
+ \let\hss\hfil
+ \makebox[#2][#1]{\unhbox\ar@cellbox}}}
+\endinput
+%%
+%% End of file `array.sty'.
diff --git a/macros/latex-dev/required/tools/array.dtx b/macros/latex-dev/required/tools/array.dtx
index aca43a53c6..a84d4faf51 100644
--- a/macros/latex-dev/required/tools/array.dtx
+++ b/macros/latex-dev/required/tools/array.dtx
@@ -29,10 +29,11 @@
%<+package>\providecommand\DeclareCurrentRelease[2]{}
%<+package>
%<+package>\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
-%<+package>\DeclareCurrentRelease{}{2019-10-01}
+%<+package>\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
+%<+package>\DeclareCurrentRelease{}{2020-10-01}
%<+package>
%<+package>\ProvidesPackage{array}
-%<+package> [2020/02/10 v2.4m Tabular extension package (FMi)]
+%<+package> [2020/10/01 v2.5b Tabular extension package (FMi)]
%
% \fi
%
@@ -2206,8 +2207,13 @@
\let\do@row@strut\relax
% \end{macrocode}
%
+% \cs{@yargarraycr} is the same as in the \LaTeX{} kernel
+% (depending on the date of the kernel with one of the two
+% definitions below). We therefore do not define it again.
+% \changes{v2.5b}{200/04/22}{Don't define \cs{@yargarraycr} unnecessarily}
% \begin{macrocode}
-\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
+%\def\@yargarraycr#1{\cr\noalign{\@vspace@calcify{#1}}} % 2020-10-01
+%\def\@yargarraycr#1{\cr\noalign{\vskip #1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3034,14 +3040,18 @@
% alignment which is either "l", "c", or "r" and the second is the
% nominal width of the column.
% \changes{v2.4f}{2017/11/07}{Column type added}
+% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
+% that cell is typeset in math mode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{w}[2]{%
% \end{macrocode}
% Before the cell content we start an "lrbox"-environment to
% collect the cell material into the previously allocated box
-% "\ar@cellbox".
+% "\ar@cellbox". We add \cs{d@llarbegin} (and later \cs{d@llarend})
+% so that the content is typeset in math mode if we are in an
+% \texttt{array} environment.
% \begin{macrocode}
- >{\begin{lrbox}\ar@cellbox}%
+ >{\begin{lrbox}\ar@cellbox\d@llarbegin}%
% \end{macrocode}
% Then comes a specifier for the cell content. We use "c", but
% that doesn't matter as in the end we will always put a box of a
@@ -3059,9 +3069,9 @@
% alignment within that width. We unbox the collected material so
% that any stretchable glue inside can interact with the alignment.
% \changes{v2.4m}{2020/02/10}{Unbox collected material so that
-% % stretchable glue inside can act (gh/270)}
+% stretchable glue inside can act (gh/270)}
% \begin{macrocode}
- <{\end{lrbox}%
+ <{\d@llarend \end{lrbox}%
\makebox[#2][#1]{\unhbox\ar@cellbox}}}
% \end{macrocode}
% \end{macro}
@@ -3072,11 +3082,13 @@
% The \texttt{W} is similar but in this case we want a warning if
% the cell content is too wide.
% \changes{v2.4f}{2017/11/07}{Column type added}
+% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
+% that cell is typeset in mathmode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{W}[2]
- {>{\begin{lrbox}\ar@cellbox}%
+ {>{\begin{lrbox}\ar@cellbox\d@llarbegin}%
c%
- <{\end{lrbox}%
+ <{\d@llarend\end{lrbox}%
\let\hss\hfil
\makebox[#2][#1]{\unhbox\ar@cellbox}}}
% \end{macrocode}
diff --git a/macros/latex-dev/required/tools/array.pdf b/macros/latex-dev/required/tools/array.pdf
index 2e55ae8a30..508b57f29b 100644
--- a/macros/latex-dev/required/tools/array.pdf
+++ b/macros/latex-dev/required/tools/array.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/bm.pdf b/macros/latex-dev/required/tools/bm.pdf
index 96dcc4270e..b780310b89 100644
--- a/macros/latex-dev/required/tools/bm.pdf
+++ b/macros/latex-dev/required/tools/bm.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/calc.pdf b/macros/latex-dev/required/tools/calc.pdf
index 9dc588dfb5..bb3cbeacf0 100644
--- a/macros/latex-dev/required/tools/calc.pdf
+++ b/macros/latex-dev/required/tools/calc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/changes.txt b/macros/latex-dev/required/tools/changes.txt
index ca9ea3d9f9..fc18afe98a 100644
--- a/macros/latex-dev/required/tools/changes.txt
+++ b/macros/latex-dev/required/tools/changes.txt
@@ -5,11 +5,31 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2020-05-10 Johannes Braams <Johannes.Braams@latex-project.org>
+
+ * xr.dtx: Remove leading and trailing spaces from the argument to
+ \externaldocument, making sure that spaces *in* filenames are
+ supprted (gh/217).
+
+2020-04-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (section{The line separator \\):
+ Don't define \@yargarraycr unnecessarily (gh/152)
+
+2020-04-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (subsection{Implementing column types w and W}):
+ Use \d@llarbegin and \d@llarendde so that cell is typeset by
+ default in math mode inside array; the use of >{$} ... <{$}
+ to make such a column text mode remains possible
+ (gh/297) --- this is a breaking change!
+
+
2020-02-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* array.dtx (subsection{Implementing column types w and W}):
Unbox collected material so that stretchable glue
- inside can act (gh/270#)
+ inside can act (gh/270)
#########################
# 2020-02-02 Release
diff --git a/macros/latex-dev/required/tools/dcolumn.pdf b/macros/latex-dev/required/tools/dcolumn.pdf
index 3231278e2e..d6cf6917e8 100644
--- a/macros/latex-dev/required/tools/dcolumn.pdf
+++ b/macros/latex-dev/required/tools/dcolumn.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/delarray.pdf b/macros/latex-dev/required/tools/delarray.pdf
index d81b97c183..c171247f78 100644
--- a/macros/latex-dev/required/tools/delarray.pdf
+++ b/macros/latex-dev/required/tools/delarray.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/enumerate.pdf b/macros/latex-dev/required/tools/enumerate.pdf
index 706a026c3d..753327a1ab 100644
--- a/macros/latex-dev/required/tools/enumerate.pdf
+++ b/macros/latex-dev/required/tools/enumerate.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/fileerr.pdf b/macros/latex-dev/required/tools/fileerr.pdf
index 62480497da..6e98faa540 100644
--- a/macros/latex-dev/required/tools/fileerr.pdf
+++ b/macros/latex-dev/required/tools/fileerr.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/fontsmpl.pdf b/macros/latex-dev/required/tools/fontsmpl.pdf
index c10065911c..a8cfedb50a 100644
--- a/macros/latex-dev/required/tools/fontsmpl.pdf
+++ b/macros/latex-dev/required/tools/fontsmpl.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/ftnright.pdf b/macros/latex-dev/required/tools/ftnright.pdf
index ba324029b1..adea07ca13 100644
--- a/macros/latex-dev/required/tools/ftnright.pdf
+++ b/macros/latex-dev/required/tools/ftnright.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/hhline.pdf b/macros/latex-dev/required/tools/hhline.pdf
index c2b938bec4..934fe19a13 100644
--- a/macros/latex-dev/required/tools/hhline.pdf
+++ b/macros/latex-dev/required/tools/hhline.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/indentfirst.pdf b/macros/latex-dev/required/tools/indentfirst.pdf
index 70bd67980c..b03eec1024 100644
--- a/macros/latex-dev/required/tools/indentfirst.pdf
+++ b/macros/latex-dev/required/tools/indentfirst.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/layout.pdf b/macros/latex-dev/required/tools/layout.pdf
index 70ed8643bc..65c765dbc0 100644
--- a/macros/latex-dev/required/tools/layout.pdf
+++ b/macros/latex-dev/required/tools/layout.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/longtable.pdf b/macros/latex-dev/required/tools/longtable.pdf
index 93de1f8a67..e2efb5af88 100644
--- a/macros/latex-dev/required/tools/longtable.pdf
+++ b/macros/latex-dev/required/tools/longtable.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/multicol.pdf b/macros/latex-dev/required/tools/multicol.pdf
index 6fbeab8c4b..5749c44295 100644
--- a/macros/latex-dev/required/tools/multicol.pdf
+++ b/macros/latex-dev/required/tools/multicol.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/rawfonts.pdf b/macros/latex-dev/required/tools/rawfonts.pdf
index 1cd03f2c50..ac87123c56 100644
--- a/macros/latex-dev/required/tools/rawfonts.pdf
+++ b/macros/latex-dev/required/tools/rawfonts.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/shellesc.pdf b/macros/latex-dev/required/tools/shellesc.pdf
index 19760108ca..45dcd372a2 100644
--- a/macros/latex-dev/required/tools/shellesc.pdf
+++ b/macros/latex-dev/required/tools/shellesc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/showkeys.pdf b/macros/latex-dev/required/tools/showkeys.pdf
index b3cd0b6330..853da80f2b 100644
--- a/macros/latex-dev/required/tools/showkeys.pdf
+++ b/macros/latex-dev/required/tools/showkeys.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/somedefs.pdf b/macros/latex-dev/required/tools/somedefs.pdf
index 24e37c6314..a0b4cab54d 100644
--- a/macros/latex-dev/required/tools/somedefs.pdf
+++ b/macros/latex-dev/required/tools/somedefs.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/tabularx.pdf b/macros/latex-dev/required/tools/tabularx.pdf
index 8157bb9860..ac1b6bf40e 100644
--- a/macros/latex-dev/required/tools/tabularx.pdf
+++ b/macros/latex-dev/required/tools/tabularx.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/theorem.pdf b/macros/latex-dev/required/tools/theorem.pdf
index c5a7e7a40f..a3695260c7 100644
--- a/macros/latex-dev/required/tools/theorem.pdf
+++ b/macros/latex-dev/required/tools/theorem.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/tools-overview.pdf b/macros/latex-dev/required/tools/tools-overview.pdf
index d5b9e0c0eb..599af2d14f 100644
--- a/macros/latex-dev/required/tools/tools-overview.pdf
+++ b/macros/latex-dev/required/tools/tools-overview.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/trace.pdf b/macros/latex-dev/required/tools/trace.pdf
index 3db16986f9..07e50dc222 100644
--- a/macros/latex-dev/required/tools/trace.pdf
+++ b/macros/latex-dev/required/tools/trace.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/varioref.pdf b/macros/latex-dev/required/tools/varioref.pdf
index d4607e7a49..2ecf15a73a 100644
--- a/macros/latex-dev/required/tools/varioref.pdf
+++ b/macros/latex-dev/required/tools/varioref.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/verbatim.pdf b/macros/latex-dev/required/tools/verbatim.pdf
index 4c73b9c758..b0452349ba 100644
--- a/macros/latex-dev/required/tools/verbatim.pdf
+++ b/macros/latex-dev/required/tools/verbatim.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/xr.dtx b/macros/latex-dev/required/tools/xr.dtx
index a6b2ffd819..a2dbea7c1e 100644
--- a/macros/latex-dev/required/tools/xr.dtx
+++ b/macros/latex-dev/required/tools/xr.dtx
@@ -25,7 +25,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr}
-%<package> [2019/07/22 v5.05 eXternal References (DPC)]
+%<package> [2020-05-10 v5.06 eXternal References (DPC)]
%
%<*driver>
\documentclass{ltxdoc}
@@ -103,12 +103,15 @@
\let\externalcitedocument\externaldocument
% \end{macrocode}
%
-% Save the optional prefix. Start processing the first |aux| file.
+% Save the optional prefix. Start processing the first |aux| file.
+% \changes{v5.06}{2020-05-10}{Remove leading and trailing sapces from
+% the filename (gh/2223)}
% \begin{macrocode}
\def\XR@[#1]#2{{%
\makeatletter
\def\XR@prefix{#1}%
- \XR@next#2.aux\relax\\}}
+ \set@curr@file@trim@spaces{#2}%
+ \expandafter\XR@next\@curr@file.aux\relax\\}}
% \end{macrocode}
%
% Process the next |aux| file in the list and remove it from the head of
@@ -135,8 +138,10 @@
% If the |aux| file exists, loop through line by line, looking for
% |\newlabel| and |\@input|. Otherwise process the next file in the
% list.
+% \changes{v5.06}{2020-05-10}{Add braces around the filename to
+% support filenames with spaces (gh/223)}
% \begin{macrocode}
-\def\XR@loop#1{\openin\@inputcheck#1\relax
+\def\XR@loop#1{\openin\@inputcheck{#1}\relax
\ifeof\@inputcheck
\PackageWarning{xr}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}%
\expandafter\XR@aux
diff --git a/macros/latex-dev/required/tools/xr.pdf b/macros/latex-dev/required/tools/xr.pdf
index 6bd98591d7..8e3c988fc2 100644
--- a/macros/latex-dev/required/tools/xr.pdf
+++ b/macros/latex-dev/required/tools/xr.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/xspace.pdf b/macros/latex-dev/required/tools/xspace.pdf
index c57dddbbf9..7eeda19972 100644
--- a/macros/latex-dev/required/tools/xspace.pdf
+++ b/macros/latex-dev/required/tools/xspace.pdf
Binary files differ
diff --git a/macros/latex/contrib/achemso/CHANGELOG.md b/macros/latex/contrib/achemso/CHANGELOG.md
index 2dd0780d95..c2b7a3dac8 100644
--- a/macros/latex/contrib/achemso/CHANGELOG.md
+++ b/macros/latex/contrib/achemso/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/).
+## [v3.13a]
+## Fixed
+- Swap TOC height and width to give landscape output
+
## [v3.13]
### Added
- Style for _ACT ES&T Eng._ (`aeecco`)
diff --git a/macros/latex/contrib/achemso/achemso-demo.pdf b/macros/latex/contrib/achemso/achemso-demo.pdf
index 441d7fa772..ff7bde7bbb 100644
--- a/macros/latex/contrib/achemso/achemso-demo.pdf
+++ b/macros/latex/contrib/achemso/achemso-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/achemso/achemso.dtx b/macros/latex/contrib/achemso/achemso.dtx
index ae31de48be..7fcc65541e 100644
--- a/macros/latex/contrib/achemso/achemso.dtx
+++ b/macros/latex/contrib/achemso/achemso.dtx
@@ -762,7 +762,7 @@
% \begin{macrocode}
%<*class>
\ProvidesClass{achemso}
- [2020-05-06 v3.13 Submission to ACS journals]
+ [2020-05-27 v3.13a Submission to ACS journals]
\LoadClass[12pt,letter]{article}
% \end{macrocode}
%
@@ -782,7 +782,7 @@
% \begin{macrocode}
%<*package>
\ProvidesPackage{achemso}
- [2020-05-06 v3.13 Support for ACS journals]
+ [2020-05-27 v3.13a Support for ACS journals]
\@ifclassloaded{achemso}{%
\PackageInfo{achemso}{%
You have already loaded the `achemso' class:\MessageBreak
@@ -2786,8 +2786,8 @@
\newcommand*\acs@tocentry@text{TOC ENTRY REQUIRED}
\newlength{\acs@tocentry@height}
\newlength{\acs@tocentry@width}
-\setlength{\acs@tocentry@height}{3.25in}
-\setlength{\acs@tocentry@width}{1.75in}
+\setlength{\acs@tocentry@height}{1.75in}
+\setlength{\acs@tocentry@width}{3.25in}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3309,64 +3309,64 @@
% \begin{macrocode}
%<*achre4>
\ProvidesFile{achemso-achre4.cfg}
- [2020-05-06 v3.13 achemso configuration: Acc. Chem. Res.]
+ [2020-05-27 v3.13a achemso configuration: Acc. Chem. Res.]
\setkeys{acs}{biblabel = plain}
\def\acs@type@list{article,suppinfo}
\def\abstractname{Conspectus}
%</achre4>
%<*aaembp>
\ProvidesFile{achemso-aaembp.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Appl. Electron. Mater.]
+ [2020-05-27 v3.13a achemso configuration: ACS Appl. Electron. Mater.]
\def\acs@type@list{article,letter,suppinfo}
\setkeys{acs}{keywords = true}
%</aaembp>
%<*aaemcq>
\ProvidesFile{achemso-aaemcq.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Appl. Energy Mater.]
+ [2020-05-27 v3.13a achemso configuration: ACS Appl. Energy Mater.]
\def\acs@type@list{article,letter,suppinfo}
\setkeys{acs}{keywords = true}
%</aaemcq>
%<*aamick>
\ProvidesFile{achemso-aamick.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Appl. Mater. Interfaces]
+ [2020-05-27 v3.13a achemso configuration: ACS Appl. Mater. Interfaces]
\def\acs@type@list{article,letter,suppinfo}
\setkeys{acs}{keywords = true}
%</aamick>
%<*aanmf6>
\ProvidesFile{achemso-aanmf6.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Appl. Nano Mater.]
+ [2020-05-27 v3.13a achemso configuration: ACS Appl. Nano Mater.]
\def\acs@type@list{article,letter,suppinfo}
\setkeys{acs}{keywords = true}
%</aanmf6>
%<*aapmcd>
\ProvidesFile{achemso-aapmcd.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Appl. Polym. Mater.]
+ [2020-05-27 v3.13a achemso configuration: ACS Appl. Polym. Mater.]
\def\acs@type@list{article,letter,suppinfo}
\setkeys{acs}{keywords = true}
%</aapmcd>
%<*abseba>
\ProvidesFile{achemso-abseba.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Biomater. Sci. Eng.]
+ [2020-05-27 v3.13a achemso configuration: ACS Biomater. Sci. Eng.]
\setkeys{acs}{keywords = true}
\def\acs@type@list{article,review,suppinfo}
%</abseba>
%<*accacs>
\ProvidesFile{achemso-accacs.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Catal.]
+ [2020-05-27 v3.13a achemso configuration: ACS Catal.]
\setkeys{acs}{keywords = true}
\def\acs@type@list{article,letter,perspective,review,viewpoints,suppinfo}
\SectionNumbersOff
%</accacs>
%<*acscii>
\ProvidesFile{achemso-acscii.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Central Sci.]
+ [2020-05-27 v3.13a achemso configuration: ACS Central Sci.]
\def\acs@type@list{article,review,suppinfo}
\setkeys{acs}{doi = true}
\SectionNumbersOff
%</acscii>
%<*acbcct>
\ProvidesFile{achemso-acbcct.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Chem. Biol.]
+ [2020-05-27 v3.13a achemso configuration: ACS Chem. Biol.]
\setkeys{acs}{
biblabel = fullstop,
biochem = true,
@@ -3377,7 +3377,7 @@
%</acbcct>
%<*acncdm>
\ProvidesFile{achemso-acncdm.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Chem. Neurosci.]
+ [2020-05-27 v3.13a achemso configuration: ACS Chem. Neurosci.]
\def\acs@type@list{article,review,letter,suppinfo,viewpoint}
\setkeys{acs}{
biblabel = fullstop,
@@ -3388,43 +3388,43 @@
%</acncdm>
%<*acsccc>
\ProvidesFile{achemso-acsccc.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Combinatorial Sci.]
+ [2020-05-27 v3.13a achemso configuration: ACS Combinatorial Sci.]
\def\acs@type@list{article,letter,review,perspective,account,note,suppinfo}
\setkeys{acs}{keywords = true}
\SectionNumbersOff
%</acsccc>
%<*aesccq>
\ProvidesFile{achemso-aesccq.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Earth Space Chem.]
+ [2020-05-27 v3.13a achemso configuration: ACS Earth Space Chem.]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{keywords = true}
%</aesccq>
%<*aelccp>
\ProvidesFile{achemso-aelccp.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Energy Lett.]
+ [2020-05-27 v3.13a achemso configuration: ACS Energy Lett.]
\def\acs@type@list{letter,perspective,review,viewpoint,focus}
\SectionsOff
%</aelccp>
%<*aeecco>
\ProvidesFile{achemso-aeecco.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS ES&T Eng.]
+ [2020-05-27 v3.13a achemso configuration: ACS ES&T Eng.]
\def\acs@type@list{article,feature,perspective,review,viewpoint}
%</aeecco>
%<*aewcaa>
\ProvidesFile{achemso-aewcaa.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS ES&T Water]
+ [2020-05-27 v3.13a achemso configuration: ACS ES&T Water]
\def\acs@type@list{article,feature,perspective,review,viewpoint}
%</aewcaa>
%<*ascefj>
\ProvidesFile{achemso-ascefj.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Infect. Dis.]
+ [2020-05-27 v3.13a achemso configuration: ACS Infect. Dis.]
\def\acs@type@list{article,letter,perspective,review,viewpoint,suppinfo}
\setkeys{acs}{keywords = true}
\SectionsOff
%</ascefj>
%<*amlccd>
\ProvidesFile{achemso-amlccd.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Macro Lett.]
+ [2020-05-27 v3.13a achemso configuration: ACS Macro Lett.]
\def\acs@type@list{letter,suppinfo}
\SectionsOff
\setlength{\acs@tocentry@height}{8 cm}
@@ -3432,19 +3432,19 @@
%</amlccd>
%<*amlcef>
\ProvidesFile{achemso-amlcef.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Mater. Lett.]
+ [2020-05-27 v3.13a achemso configuration: ACS Mater. Lett.]
\def\acs@type@list{letter,perspective,review,viewpoint,focus}
\SectionsOff
%</amlcef>
%<*amclct>
\ProvidesFile{achemso-amclct.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Med. Chem. Lett.]
+ [2020-05-27 v3.13a achemso configuration: ACS Med. Chem. Lett.]
\def\acs@type@list{article,letter,perspective,suppinfo}
\SectionNumbersOff
%</amclct>
%<*ancac3>
\ProvidesFile{achemso-ancac3.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Nano]
+ [2020-05-27 v3.13a achemso configuration: ACS Nano]
\setkeys{acs}{
abbreviations = true,
biblabel = fullstop,
@@ -3458,12 +3458,12 @@
%</ancac3>
%<*acsodf>
\ProvidesFile{achemso-acsodf.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Omega.]
+ [2020-05-27 v3.13a achemso configuration: ACS Omega.]
\def\acs@type@list{article}
%</acsodf>
%<*apchd5>
\ProvidesFile{achemso-apchd5.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Photon.]
+ [2020-05-27 v3.13a achemso configuration: ACS Photon.]
\def\acs@type@list{article,letter,perspective,review,suppinfo}
\setkeys{acs}{keywords = true}
\ifx\acs@manuscript\acs@manuscript@letter
@@ -3472,14 +3472,14 @@
%</apchd5>
%<*aidcbc>
\ProvidesFile{achemso-aidcbc.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Sensors]
+ [2020-05-27 v3.13a achemso configuration: ACS Sensors]
\def\acs@type@list{article,letter,perspective,review,suppinfo}
\setkeys{acs}{keywords = true}
\SectionNumbersOff
%</aidcbc>
%<*ascecg>
\ProvidesFile{achemso-ascecg.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Sustainable Chem Eng.]
+ [2020-05-27 v3.13a achemso configuration: ACS Sustainable Chem Eng.]
\setkeys{acs}{
biblabel = fullstop,
keywords = true
@@ -3489,7 +3489,7 @@
%</ascecg>
%<*asbcd6>
\ProvidesFile{achemso-asbcd6.cfg}
- [2020-05-06 v3.13 achemso configuration: ACS Synth. Biol.]
+ [2020-05-27 v3.13a achemso configuration: ACS Synth. Biol.]
\setkeys{acs}{
abbreviations = true,
biblabel = fullstop,
@@ -3501,13 +3501,13 @@
%</asbcd6>
%<*ancham>
\ProvidesFile{achemso-ancham.cfg}
- [2020-05-06 v3.13 achemso configuration: Anal. Chem.]
+ [2020-05-27 v3.13a achemso configuration: Anal. Chem.]
\def\acs@type@list{article,note,suppinfo}
\SectionNumbersOff
%</ancham>
%<*bichaw>
\ProvidesFile{achemso-bichaw.cfg}
- [2020-05-06 v3.13 achemso configuration: Biochemistry]
+ [2020-05-27 v3.13a achemso configuration: Biochemistry]
\setkeys{acs}{
abbreviations = true,
biblabel = brackets,
@@ -3555,7 +3555,7 @@
%</bichaw>
%<*bcches>
\ProvidesFile{achemso-bcches.cfg}
- [2020-05-06 v3.13 achemso configuration: Bioconjugate Chem.]
+ [2020-05-27 v3.13a achemso configuration: Bioconjugate Chem.]
\setkeys{acs}{
biochem = true,
super = false
@@ -3564,14 +3564,14 @@
%</bcches>
%<*bomaf6>
\ProvidesFile{achemso-bomaf6.cfg}
- [2020-05-06 v3.13 achemso configuration: Biomacromolecules]
+ [2020-05-27 v3.13a achemso configuration: Biomacromolecules]
\def\acs@type@list{article,comment,communication,note,review,suppinfo}
\SectionNumbersOff
\AtEndOfClass{\SectionsOn}
%</bomaf6>
%<*crtoec>
\ProvidesFile{achemso-crtoec.cfg}
- [2020-05-06 v3.13 achemso configuration: Chem. Res. Toxicol.]
+ [2020-05-27 v3.13a achemso configuration: Chem. Res. Toxicol.]
\setkeys{acs}{
abbreviations = true,
biochem = true,
@@ -3588,7 +3588,7 @@
%</crtoec>
%<*chreay>
\ProvidesFile{achemso-chreay.cfg}
- [2020-05-06 v3.13 achemso configuration: Chem. Rev.]
+ [2020-05-27 v3.13a achemso configuration: Chem. Rev.]
\def\acs@type@default{review}
\def\acs@type@list{review}
% \end{macrocode}
@@ -3599,7 +3599,7 @@
%<*cmatex>
% \begin{macrocode}
\ProvidesFile{achemso-cmatex.cfg}
- [2020-05-06 v3.13 achemso configuration: Chem. Mater.]
+ [2020-05-27 v3.13a achemso configuration: Chem. Mater.]
\setkeys{acs}{keywords = true}
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication
@@ -3609,7 +3609,7 @@
%</cmatex>
%<*cgdefu>
\ProvidesFile{achemso-cgdefu.cfg}
- [2020-05-06 v3.13 achemso configuration: Cryst. Growth Des.]
+ [2020-05-27 v3.13a achemso configuration: Cryst. Growth Des.]
\def\acs@type@list{%
article,communication,perspective,suppinfo%
}
@@ -3622,31 +3622,31 @@
%</cgdefu>
%<*enfuem>
\ProvidesFile{achemso-enfuem.cfg}
- [2020-05-06 v3.13 achemso configuration: Energy Fuels]
+ [2020-05-27 v3.13a achemso configuration: Energy Fuels]
\def\acs@type@list{article,review,suppinfo}
\SectionNumbersOff
%</enfuem>
%<*esthag>
\ProvidesFile{achemso-esthag.cfg}
- [2020-05-06 v3.13 achemso configuration: Environ. Sci. Technol.]
+ [2020-05-27 v3.13a achemso configuration: Environ. Sci. Technol.]
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</esthag>
%<*estlcu>
\ProvidesFile{achemso-estlcu.cfg}
- [2020-05-06 v3.13 achemso configuration: Environ. Sci. Technol. Lett.]
+ [2020-05-27 v3.13a achemso configuration: Environ. Sci. Technol. Lett.]
\def\acs@type@list{letter,suppinfo}
\SectionNumbersOff
%</estlcu>
%<*iecred>
\ProvidesFile{achemso-iecred.cfg}
- [2020-05-06 v3.13 achemso configuration: Ind. Eng. Chem. Res.]
+ [2020-05-27 v3.13a achemso configuration: Ind. Eng. Chem. Res.]
\setkeys{acs}{biblabel = brackets}
\SectionNumbersOff
%</iecred>
%<*inoraj>
\ProvidesFile{achemso-inoraj.cfg}
- [2020-05-06 v3.13 achemso configuration: Inorg. Chem.]
+ [2020-05-27 v3.13a achemso configuration: Inorg. Chem.]
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication
\AbstractOff
@@ -3656,14 +3656,14 @@
%</inoraj>
%<*jafcau>
\ProvidesFile{achemso-jafcau.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Agric. Food Chem.]
+ [2020-05-27 v3.13a achemso configuration: J. Agric. Food Chem.]
\setkeys{acs}{keywords = true}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</jafcau>
%<*jceda8>
\ProvidesFile{achemso-jceda8.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Chem. Ed.]
+ [2020-05-27 v3.13a achemso configuration: J. Chem. Ed.]
\setkeys{acs}{keywords = true}
\SectionNumbersOff
\def\acs@type@list{article,suppinfo}
@@ -3671,26 +3671,26 @@
%</jceda8>
%<*jceaax>
\ProvidesFile{achemso-jceaax.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Chem. Eng. Data]
+ [2020-05-27 v3.13a achemso configuration: J. Chem. Eng. Data]
\def\acs@type@list{article,suppinfo}
\def\refname{Literature Cited}
\SectionNumbersOff
%</jceaax>
%<*jcisd8>
\ProvidesFile{achemso-jcisd8.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Chem. Inf. Model.]
+ [2020-05-27 v3.13a achemso configuration: J. Chem. Inf. Model.]
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</jcisd8>
%<*jctcce>
\ProvidesFile{achemso-jctcce.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Chem. Theory Comput.]
+ [2020-05-27 v3.13a achemso configuration: J. Chem. Theory Comput.]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{maxauthors = 0}
%</jctcce>
%<*jmcmar>
\ProvidesFile{achemso-jmcmar.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Med. Chem.]
+ [2020-05-27 v3.13a achemso configuration: J. Med. Chem.]
\def\acs@type@list{article,letter,perspective,suppinfo}
\SectionNumbersOff
\setlength{\acs@tocentry@height}{5.5cm}
@@ -3698,7 +3698,7 @@
%</jmcmar>
%<*jnprdf>
\ProvidesFile{achemso-jnprdf.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Nat. Prod.]
+ [2020-05-27 v3.13a achemso configuration: J. Nat. Prod.]
\renewcommand*{\abstractname}{ABSTRACT}
\renewcommand*{\acknowledgementname}{ACKNOWLEDGEMENT}
\renewcommand*{\suppinfoname}{ASSOCIATED CONTENT}
@@ -3720,7 +3720,7 @@
%</jnprdf>
%<*joceah>
\ProvidesFile{achemso-joceah.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Org. Chem.]
+ [2020-05-27 v3.13a achemso configuration: J. Org. Chem.]
\ifx\acs@manuscript\acs@manuscript@communication
\AbstractOff
\SectionsOff
@@ -3734,7 +3734,7 @@
% \begin{macrocode}
%<*jpcafh>
\ProvidesFile{achemso-jpcafh.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Phys. Chem. A]
+ [2020-05-27 v3.13a achemso configuration: J. Phys. Chem. A]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{
etalmode = truncate,
@@ -3749,7 +3749,7 @@
%</jpcafh>
%<*jpcbfk>
\ProvidesFile{achemso-jpcbfk.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Phys. Chem. B]
+ [2020-05-27 v3.13a achemso configuration: J. Phys. Chem. B]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{
etalmode = truncate,
@@ -3761,7 +3761,7 @@
%</jpcbfk>
%<*jpccck>
\ProvidesFile{achemso-jpccck.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Phys. Chem. C]
+ [2020-05-27 v3.13a achemso configuration: J. Phys. Chem. C]
\def\acs@type@list{article,suppinfo}
\setkeys{acs}{
etalmode = truncate,
@@ -3775,7 +3775,7 @@
% \begin{macrocode}
%<*jpclcd>
\ProvidesFile{achemso-jpclcd.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Phys. Chem. Lett.]
+ [2020-05-27 v3.13a achemso configuration: J. Phys. Chem. Lett.]
\setkeys{acs}{
etalmode = truncate,
maxauthors = 10
@@ -3800,7 +3800,7 @@
%</jpclcd>
%<*jprobs>
\ProvidesFile{achemso-jprobs.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Proteome Res.]
+ [2020-05-27 v3.13a achemso configuration: J. Proteome Res.]
\setkeys{acs}{keywords = true}
\def\acs@type@list{article,review,suppinfo}
\SectionNumbersOff
@@ -3812,7 +3812,7 @@
% \begin{macrocode}
%<*jacsat>
\ProvidesFile{achemso-jacsat.cfg}
- [2020-05-06 v3.13 achemso configuration: J. Am. Chem. Soc.]
+ [2020-05-27 v3.13a achemso configuration: J. Am. Chem. Soc.]
\SectionNumbersOff
\ifx\acs@manuscript\acs@manuscript@communication\else
\expandafter\endinput
@@ -4016,26 +4016,26 @@
%</jacsat>
%<*langd5>
\ProvidesFile{achemso-langd5.cfg}
- [2020-05-06 v3.13 achemso configuration: Langmuir]
+ [2020-05-27 v3.13a achemso configuration: Langmuir]
\def\acs@type@list{article,letter,suppinfo}
\SectionNumbersOff
%</langd5>
%<*mamobx>
\ProvidesFile{achemso-mamobx.cfg}
- [2020-05-06 v3.13 achemso configuration: Macromolecules]
+ [2020-05-27 v3.13a achemso configuration: Macromolecules]
\SectionNumbersOff
\setkeys{acs}{doi = true}
%</mamobx>
%<*mpohbp>
\ProvidesFile{achemso-mpohbp.cfg}
- [2020-05-06 v3.13 achemso configuration: Mol. Pharm.]
+ [2020-05-27 v3.13a achemso configuration: Mol. Pharm.]
\setkeys{acs}{keywords = true}
\def\acs@type@list{article,suppinfo}
\SectionNumbersOff
%</mpohbp>
%<*nalefd>
\ProvidesFile{achemso-nalefd.cfg}
- [2020-05-06 v3.13 achemso configuration: Nano Lett.]
+ [2020-05-27 v3.13a achemso configuration: Nano Lett.]
\setkeys{acs}{keywords = true}
\def\acs@type@default{letter}
\def\acs@type@list{letter}
@@ -4043,7 +4043,7 @@
%</nalefd>
%<*orlef7>
\ProvidesFile{achemso-orlef7.cfg}
- [2020-05-06 v3.13 achemso configuration: Org. Lett.]
+ [2020-05-27 v3.13a achemso configuration: Org. Lett.]
\def\acs@type@default{communication}
\def\acs@type@list{communication}
\SectionNumbersOff
@@ -4053,13 +4053,13 @@
%</orlef7>
%<*oprdfk>
\ProvidesFile{achemso-oprdfk.cfg}
- [2020-05-06 v3.13 achemso configuration: Org. Proc. Res. Dev.]
+ [2020-05-27 v3.13a achemso configuration: Org. Proc. Res. Dev.]
\def\acs@type@list{article,highlight,review,suppinfo}
\SectionNumbersOff
%</oprdfk>
%<*orgnd7>
\ProvidesFile{achemso-orgnd7.cfg}
- [2020-05-06 v3.13 achemso configuration: Organometallics]
+ [2020-05-27 v3.13a achemso configuration: Organometallics]
\SectionNumbersOff
%</orgnd7>
% \end{macrocode}
@@ -4724,7 +4724,7 @@ FUNCTION { count.entries } {
% Start and end of bibliography functions
FUNCTION { begin.bib } {
- "achemso 2020-05-06 v3.13" top$
+ "achemso 2020-05-27 v3.13a" top$
preamble$ empty$
{ }
{
diff --git a/macros/latex/contrib/achemso/achemso.pdf b/macros/latex/contrib/achemso/achemso.pdf
index c4d7a79346..5fa9b9e2b1 100644
--- a/macros/latex/contrib/achemso/achemso.pdf
+++ b/macros/latex/contrib/achemso/achemso.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/biblio.bib b/macros/latex/contrib/biblatex-contrib/biblatex-software/biblio.bib
index 53b227a4b6..72f0793ada 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/biblio.bib
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/biblio.bib
@@ -92,7 +92,8 @@
@codefragment {simplemapper,
subtitle = {Core mapping routine},
- swhid = {swh:1:cnt:43a6b232768017b03da934ba22d9cc3f2726a6c5;lines=192-228;
+ swhid = {swh:1:cnt:43a6b232768017b03da934ba22d9cc3f2726a6c5;
+ lines=192-228;
origin=https://github.com/rdicosmo/parmap},
crossref = {parmap}
}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/history.tex b/macros/latex/contrib/biblatex-contrib/biblatex-software/history.tex
index 28e960569e..d0ead656fd 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/history.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/history.tex
@@ -9,3 +9,4 @@
\begin{release}{bltx-v0.3}{2020-04-05} \item Biblatex style with first complete example \end{release}
\begin{release}{bltx-v0.2}{2020-04-02} \item Biblatex style sent for review \end{release}
\begin{release}{bltx-v0.1}{2020-04-02} \item First version of the biblatex style \end{release}
+\begin{release}{bltx-1.2}{2020-05-27} \item Add swhid stylemap to support multiline SWHIDs \end{release}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/sample-use-sty.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-software/sample-use-sty.pdf
index 2be521992e..c8d65110ec 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/sample-use-sty.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/sample-use-sty.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.pdf
index e6a6a61245..63503343ba 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.tex b/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.tex
index 5e04310ba8..72de0c520e 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.tex
@@ -14,7 +14,7 @@
url={http://mirror.ctan.org/macros/latex/exptl/biblatex-contrib/biblatex-software/},
author={Roberto Di Cosmo},
email={roberto@dicosmo.org},
- revision={1.1},
+ revision={1.2},
date={\today}}
\hypersetup{%
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
index 007d6e8325..2358ec1032 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
@@ -53,7 +53,18 @@
{}%
{\setunit*{\addspace}%
\usebibmacro{urldate}}}
-
+
+%
+% Support multiline SWHIDs
+%
+\DeclareStyleSourcemap{
+ \maps[datatype=bibtex,overwrite=true]{
+ \map{
+ \step[fieldsource=swhid, match=\regexp{\s}, replace={}]
+ }
+ }
+}
+
%
% Formatting fields for the software entries
%
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/swentries.tex b/macros/latex/contrib/biblatex-contrib/biblatex-software/swentries.tex
index 03aaee2c9a..7cc89052fb 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/swentries.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/swentries.tex
@@ -241,7 +241,8 @@ we can do this as follows:
@codefragment {simplemapper,
subtitle = {Core mapping routine},
- swhid = {swh:1:cnt:43a6b232768017b03da934ba22d9cc3f2726a6c5;lines=192-228;
+ swhid = {swh:1:cnt:43a6b232768017b03da934ba22d9cc3f2726a6c5;
+ lines=192-228;
origin=https://github.com/rdicosmo/parmap},
crossref = {parmap}
}
diff --git a/macros/latex/contrib/nicematrix/README.md b/macros/latex/contrib/nicematrix/README.md
index 62c2d06089..f3183a5cfc 100644
--- a/macros/latex/contrib/nicematrix/README.md
+++ b/macros/latex/contrib/nicematrix/README.md
@@ -26,4 +26,5 @@ For a manual installation:
The file `nicematrix.sty` will be generated.
-The file `nicematrix.sty` is the only file necessary to use the extension `nicematrix`.
+The file `nicematrix.sty` is the only file necessary to use the extension `nicematrix`.
+You have to put it in the same directory as your document or (best) in a `texmf` tree.
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index 5e5910a1ed..6acb7b9f28 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index 7adcadf738..d79a0f3727 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -7,22 +7,14 @@
\usepackage{geometry}
\geometry{left=2.8cm,right=2.8cm,top=2.5cm,bottom=2.5cm,papersize={21cm,29.7cm}}
-\usepackage{amsmath}
-
-\usepackage{array}
\usepackage{nicematrix}
-% \usepackage{colortbl}
\usepackage{tikz}
\usetikzlibrary{fit}
\usepackage{enumitem}
-
\usepackage{siunitx}
-
-
-% \usepackage{arydshln}
\usepackage{verbatim}
% We use \MakeShortVerb of shortvrb and not \DefineShortVerb of fancyvrb
@@ -45,9 +37,7 @@
\def\emphase{\bgroup\color{RoyalPurple}\let\next=}
\usepackage{footnote}
-
\usepackage{booktabs}
-
\usepackage{varwidth}
\usepackage[hyperfootnotes = false]{hyperref}
@@ -83,38 +73,16 @@
\maketitle
+
\begin{abstract}
L'extension LaTeX \pkg{nicematrix} fournit de nouveaux environnements similaires aux environnements classiques
-|{tabular}|, |{array}| et |{matrix}| mais avec des fonctionnalités supplémentaires. Parmi ces fonctionnalités
-figurent la possibilité de fixer la largeur des colonnes et de tracer des traits en pointillés continus entre les
-cases du tableau.
+|{tabular}|, |{array}| et |{matrix}| de \pkg{array} et \pkg{amsmath} mais avec des fonctionnalités plus étendues.
\end{abstract}
-\vspace{1cm}
-\section{Présentation}
-
-Cette extension peut être utilisée avec |xelatex|, |lualatex| et |pdflatex| mais aussi avec le cheminement
-classique |latex|-|dvips|-|ps2pdf| (ou Adobe Distiller). Deux ou trois compilations successives peuvent être
-nécessaires. Cette extension nécessite et charge les extensions \pkg{expl3}, \pkg{l3keys2e}, \pkg{xparse},
-\pkg{array}, \pkg{amsmath} et \pkg{pgfcore} ainsi que le module \pkg{shapes} de \textsc{pgf} (l'extension
-\pkg{tikz} n'est \emph{pas} chargée). L'utilisateur final n'a qu'à charger l'extension \pkg{nicematrix} avec
-l'instruction habituelle : |\usepackage{nicematrix}|.
-
+\vspace{1cm}
-\medskip
-\begin{savenotes}
-\begin{minipage}{0.6\linewidth}
-Cette extension fournit quelques outils supplémentaires pour dessiner des matrices (au sens mathématique). Les
-principales caractéristiques sont les suivantes :
-\begin{itemize}\setlength{\itemsep}{0pt}
-\item des lignes en pointillés continues ;
-\item des rangées et colonnes extérieures pour les labels ;
-\item un contrôle sur la largeur des colonnes.
-\end{itemize}
-\end{minipage}
-\end{savenotes}
-\hspace{1.4cm}
+\hspace{1cm}
$\begin{bNiceArray}{CCCC}[first-row,first-col,
code-for-first-col=\color{blue}\scriptstyle,
code-for-first-row=\color{blue}\scriptstyle,
@@ -125,98 +93,1106 @@ L_2 & a_{21} & a_{22} & \Cdots & a_{2n} \\
\Vdots & \Vdots & \Vdots & \Ddots & \Vdots \\
L_n & a_{n1} & a_{n2} & \Cdots & a_{nn}
\end{bNiceArray}$
+\hspace{2cm}
+\begin{NiceTabular}[c]{LSSSS}%
+[code-before = \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{}]
+\toprule
+\Block{2-1}{Produit} & \multicolumn{3}{C}{dimensions (cm)} & \Block{2-1}{\rotate Prix} \\
+\cmidrule(rl){2-4}
+ & L & l & h \\
+\midrule
+petit & 3 & 5.5 & 1 & 30 \\
+standard & 5.5 & 8 & 1.5 & 50.5 \\
+premium & 8.5 & 10.5 & 2 & 80 \\
+extra & 8.5 & 10 & 1.5 & 85.5 \\
+spécial & 12 & 12 & 0.5 & 70 \\
+\bottomrule
+\end{NiceTabular}
+\vspace{1cm}
-\medskip
+L'extension \pkg{nicematrix} est entièrement contenue dans le fichier |nicematrix.sty|. Ce fichier peut être placé
+dans le répertoire courant ou dans une arborescence |texmf|. Le mieux reste néanmoins d'installer \pkg{nicematrix}
+avec une distribution TeX comme MiKTeX ou TeXlive.
+
+\bigskip
+Cette extension peut être utilisée avec |xelatex|, |lualatex| et |pdflatex| mais aussi avec le cheminement
+classique |latex|-|dvips|-|ps2pdf| (ou Adobe Distiller).
+
+\bigskip
+Cette extension nécessite et charge les extensions \pkg{l3keys2e}, \pkg{xparse}, \pkg{array}, \pkg{amsmath} et
+\pkg{pgfcore} ainsi que le module \pkg{shapes} de \textsc{pgf} (l'extension \pkg{tikz}, qui est une surcouche de
+\textsc{pgf} n'est \emph{pas} chargée). L'utilisateur final n'a qu'à charger l'extension \pkg{nicematrix} avec
+l'instruction habituelle : |\usepackage{nicematrix}|.
+
+
+\bigskip
+L'idée de \pkg{nicematrix} est de créer des nœuds \textsc{pgf} derrière les cases et les positions des filets des
+tableaux créés par \pkg{array} et de les utiliser pour développer de nouvelles fonctionnalités. Comme toujours avec
+\textsc{pgf}, les coordonnées de ces nœuds sont écrites dans le fichier |.aux| pour être utilisées à la
+compilation suivante. C'est pourquoi l'utilisation de \pkg{nicematrix} nécessite \textbf{plusieurs compilations
+ successives}.
+
+\bigskip
+La plupart des fonctionnalités de \pkg{nicematrix} sont accessibles sans avoir à utiliser explicitement
+\textsc{pgf} ou Tikz (ce dernier n'est d'ailleurs pas chargé par défaut).
+
+\bigskip
Une commande|\NiceMatrixOptions| est fournie pour régler les options (la portée des options fixées par cette
-commande est le groupe TeX courant).
+commande est le groupe TeX courant : elles sont semi-globales).
+
+
+\newpage
+
+\section{Les environnements de cette extension}
+
+L'extension \pkg{nicematrix} définit les nouveaux environnements suivants :
+
+\medskip
+\begin{ttfamily}
+\setlength{\tabcolsep}{3mm}
+\begin{tabular}{llll}
+\{NiceTabular\} & \{NiceArray\} & \{NiceMatrix\} \\
+ & \{pNiceArray\} & \{pNiceMatrix\} \\
+ & \{bNiceArray\} & \{bNiceMatrix\} \\
+ & \{BNiceArray\} & \{BNiceMatrix\} \\
+ & \{vNiceArray\} & \{vNiceMatrix\} \\
+ & \{VNiceArray\} & \{VNiceMatrix\}
+\end{tabular}
+\end{ttfamily}
+
+
+\medskip
+Les environnements |{NiceArray}| et |{NiceTabular}| sont similaires aux environnements |{array}| et |{tabular}| de
+l'extension \pkg{array} (qui est chargée par \pkg{nicematrix}).
+
+\medskip
+Il y a néanmoins quelques différences :
+\begin{itemize}
+\item Pour des raisons techniques, dans le préambule de ces environnements, l'utilisateur doit utiliser les lettres
+|L|, |C| et~|R|\footnote{Les types de colonnes |L|, |C| et |R| sont définis localement à l'intérieur de
+ |{NiceTabular}| ou |{NiceArray}| avec la commande |\newcolumntype| de \pkg{array}. Cette définition masque une
+ éventuelle définition précédente.} au lieu de |l|, |c| et |r|, y compris dans les commandes |\multicolumn| et
+dans les types de colonnes définis par |\newcolumntype|.
+
+\item Dans |{NiceArray}| (et ses variantes), les colonnes de type |w| (ex. : |wc{1cm}|) sont composées en mode
+mathématique alors que dans |{array}| de \pkg{array}, elles sont composées en mode texte.
+\end{itemize}
+
+\medskip
+Les environnements |{pNiceArray}|, |{bNiceArray}|, etc. n'ont pas d'équivalents dans \pkg{array}.
+
+\medskip
+Les environnements |{NiceMatrix}|, |{pNiceMatrix}|, etc. sont similaires aux environnements correspondants de
+l'\pkg{amsmath} (qui est chargée par \pkg{nicematrix}) : |{matrix}|, |{pmatrix}|, etc.
+
+\medskip
+Tous les environnements de l'extension \pkg{nicematrix} acceptent, entre crochets, une liste optionnelle de paires
+de la forme \textsl{clé=valeur}. {\bfseries Il doit n'y avoir aucun espace devant le crochet ouvrant (|[|) de cette
+liste d'options.}
+
+
+
+\section{L'espace vertical entre les rangées}
+
+Il est bien connu que certaines rangées des tableaux créés par défault avec LaTeX sont trop proches l'une de
+l'autre. On en donne ci-dessous un exemple classique.
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+$\begin{pmatrix}
+\frac12 & -\frac12 \\
+\frac13 & \frac14 \\
+\end{pmatrix}$
+\end{BVerbatim}
+$\begin{pmatrix}
+\frac12 & -\frac12 \\
+\frac13 & \frac14 \\
+\end{pmatrix}$
+
+\bigskip
+En s'inspirant de l'extension \pkg{cellspace} qui traite de ce problème, l'extension \pkg{nicematrix} propose deux
+clés |cell-space-top-limit| et |cell-space-bottom-limit| qui sont similaires aux deux paramètres
+|\cellspacetoplimit| et |\cellspacebottomlimit| proposés par \pkg{cellspace}. La valeur initiale de ces paramètres
+est $0$~pt pour que les environnements de \pkg{nicematrix} aient par défaut le même comportement que ceux de
+\pkg{array} et de l'\pkg{amsmth} mais une valeur de $1$~pt serait un bon choix. On conseille de régler leurs
+valeurs avec la commande |\NiceMatrixOptions|.
+
+\medskip
+\begin{Verbatim}
+\NiceMatrixOptions{~emphase#cell-space-top-limit = 1pt,cell-space-bottom-limit = 1pt@}
+\end{Verbatim}
+
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+$\begin{pNiceMatrix}
+\frac12 & -\frac12 \\
+\frac13 & \frac14 \\
+\end{pNiceMatrix}$
+\end{BVerbatim}
+\begin{scope}
+\NiceMatrixOptions{
+ cell-space-top-limit = 1pt ,
+ cell-space-bottom-limit = 1pt ,
+}
+$\begin{pNiceMatrix}
+\frac12 & -\frac12 \\
+\frac13 & \frac14 \\
+\end{pNiceMatrix}$
+\end{scope}
+
\bigskip
-\textbf{Un exemple d'utilisation pour les lignes en pointillés continues}
+\section{La clé baseline}
+
+L'extension \pkg{nicematrix} propose une option |baseline| pour la position verticale des tableaux. Cette
+option |baseline| prend comme valeur un entier qui indique le numéro de rangée dont la ligne de base servira de
+ligne de base pour le tableau.
\medskip
-\begin{minipage}{10cm}
-Considérons par exemple le code suivant qui utilise un environnement |{pmatrix}| de l'extension \pkg{amsmath}.
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+$A = \begin{pNiceMatrix}[~emphase#baseline=2@]
+\frac{1}{\sqrt{1+p^2}} & p & 1-p \\
+1 & 1 & 1 \\
+1 & p & 1+p
+\end{pNiceMatrix}$
+\end{BVerbatim}
+$A = \begin{pNiceMatrix}[baseline=2]
+\frac{1}{\sqrt{1+p^2}} & p & 1-p \\
+1 & 1 & 1 \\
+1 & p & 1+p
+\end{pNiceMatrix}$
+
+
+\interitem
+L'option |baseline| peut aussi prendre les trois valeurs spéciales |t|, |c| et |b|. Ces trois lettres peuvent aussi
+être utilisées de manière absolue comme pour l'option des environnements |{tabular}| et |{array}| de \pkg{array}.
+La valeur initiale de |baseline| est~|c|.
+
+
+\bigskip
+Dans l'exemple suivant, on utilise l'option |t| (synonyme de |baseline=t|) immédiatement après un |\item| de liste.
+On remarquera que la présence d'un |\hline| initial n'empêche pas l'alignement sur la ligne de base de la première
+rangée (avec |{tabular}| ou |{array}| de \pkg{array}, il faut utiliser |\firsthline|\footnote{On peut aussi utiliser |\firsthline|
+ dans les environnements de \pkg{nicematrix}.}).
\smallskip
-\begin{BVerbatim}
-$A = \begin{pmatrix}
-1 & \cdots & \cdots & 1 \\
-0 & \ddots & & \vdots \\
-\vdots & \ddots & \ddots & \vdots \\
-0 & \cdots & 0 & 1
-\end{pmatrix}$
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+\begin{enumerate}
+\item un item
+\smallskip
+\item \renewcommand{\arraystretch}{1.2}
+$\begin{NiceArray}[t]{LCCCCCC}
+\hline
+n & 0 & 1 & 2 & 3 & 4 & 5 \\
+u_n & 1 & 2 & 4 & 8 & 16 & 32
+\hline
+\end{NiceArray}$
+\end{enumerate}
\end{BVerbatim}
+%
+\begin{minipage}{5cm}
+\begin{enumerate}
+\item un item
+\smallskip
+\item \renewcommand{\arraystretch}{1.2}
+$\begin{NiceArray}[t]{LCCCCCC}
+\hline
+n & 0 & 1 & 2 & 3 & 4 & 5 \\
+u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
+\hline
+\end{NiceArray}$
+\end{enumerate}
+\end{minipage}
+
+
+\bigskip
+Il est également possible d'utiliser les outils de \pkg{booktabs}: |\toprule|,
+|\bottomrule|, |\midrule|, etc.\par\nobreak
\smallskip
-Ce code compose la matrice $A$ représentée à droite.
-\end{minipage}\hspace{1cm}
-$A = \begin{pmatrix}
-1 &\cdots &\cdots &1 \\
-0 &\ddots & &\vdots \\
-\vdots &\ddots &\ddots &\vdots \\
-0 &\cdots &0 &1
-\end{pmatrix}$
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+\begin{enumerate}
+\item an item
+\smallskip
+\item
+$\begin{NiceArray}[t]{LCCCCCC}
+~emphase#\toprule@
+n & 0 & 1 & 2 & 3 & 4 & 5 \\
+~emphase#\midrule@
+u_n & 1 & 2 & 4 & 8 & 16 & 32
+~emphase#\bottomrule@
+\end{NiceArray}$
+\end{enumerate}
+\end{BVerbatim}
+\begin{minipage}{5cm}
+\begin{enumerate}
+\item an item
+\smallskip
+\item
+$\begin{NiceArray}[t]{LCCCCCC}
+\toprule
+n & 0 & 1 & 2 & 3 & 4 & 5 \\
+\midrule
+u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
+\bottomrule
+\end{NiceArray}$
+\end{enumerate}
+\end{minipage}
+
+
+
+\section{Les blocs}
+\label{Block}
+Dans les environnements de \pkg{nicematrix}, on peut utiliser la commande |\Block| pour placer un élément au centre
+d'un rectangle de cases fusionnées. La commande |\Block| ne crée pas d'espace par elle-même.
+La commande |\Block| doit être utilisée dans la case supérieure gauche du bloc avec deux arguments. Le premier
+argument est la taille de ce bloc avec la syntaxe $i$-$j$ où $i$ est le nombre de rangées et $j$ le nombre de
+colonnes du bloc. Le deuxième argument, est, sans surprise, le contenu du bloc.
+Dans |{NiceTabular}|, le contenu est composé en mode texte. Dans les autres environnements, il est composé en mode
+mathématique.
+
+\medskip
+\begin{BVerbatim}
+\begin{NiceTabular}{CCCC}
+rose & tulipe & marguerite & dahlia \\
+violette & ~emphase#\Block{2-2}{\LARGE\color{blue} fleurs}@ & & souci \\
+pervenche & & & lys \\
+arum & iris & jacinthe & muguet
+\end{NiceTabular}
+\end{BVerbatim}
+
+
+\medskip
+\begin{center}
+\begin{NiceTabular}{CCCC}
+rose & tulipe & marguerite & dahlia \\
+violette & \Block{2-2}{\LARGE\color{blue} fleurs} & & souci \\
+pervenche & & & lys \\
+arum & iris & jacinthe & muguet
+\end{NiceTabular}
+\end{center}
+
+
+
+\bigskip
+On peut aussi utiliser la commande |\Block| dans des matrices mathématiques.
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
+$\begin{bNiceArray}{CCC|C}[margin]
+~emphase#\Block{3-3}{A}@ & & & 0 \\
+& \hspace*{1cm} & & \Vdots \\
+& & & 0 \\
+\hline
+0 & \Cdots& 0 & 0
+\end{bNiceArray}$
+\end{BVerbatim}
+$\begin{bNiceArray}{CCC|C}[margin]
+\Block{3-3}{A} & & & 0 \\
+& \hspace*{1cm} & & \Vdots \\
+& & & 0 \\
+\hline
+0 & \Cdots& 0 & 0
+\end{bNiceArray}$
\bigskip
+On peut souhaiter agrandir la taille du «$A$» placé dans le bloc de l'exemple précédent. Comme il est composé en
+mode mathématique, on ne peut pas directement utiliser une commande comme |\large|, |\Large| ou |\LARGE|. C'est
+pourquoi une option à mettre entre chevrons est proposée par |\Block| pour spécifier du code LaTeX qui sera inséré
+\emph{avant} le début du mode mathématique.
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
+$\begin{bNiceArray}{CCC|C}[margin]
+\Block{3-3}~emphase#<\LARGE>@{A} & & & 0 \\
+& \hspace*{1cm} & & \Vdots \\
+& & & 0 \\
+\hline
+0 & \Cdots& 0 & 0
+\end{bNiceArray}$
+\end{BVerbatim}
+$\begin{bNiceArray}{CCC|C}[margin]
+\Block{3-3}<\LARGE>{A} & & & 0 \\
+& \hspace*{1cm} & & \Vdots \\
+& & & 0 \\
+\hline
+0 & \Cdots& 0 & 0
+\end{bNiceArray}$
+
+
+\section{Les filets horizontaux et verticaux}
+
+Les techniques habituelles pour tracer des filets peuvent être utilisées dans les environnements de
+\pkg{nicematrix}, à l'exception de |\vline|.
+
+\subsection{L'épaisseur et la couleur des filets}
+
+Les environnements de \pkg{nicematrix} proposent une clé |rules/width| pour fixer la largeur (en fait l'épaisseur)
+des filets dans l'environnement. En fait, cette clé ne fait que fixer la valeur de |\arrayrulewidth|.
+
+\smallskip
+On sait que \pkg{colortbl} propose la commande |\arrayrulecolor| pour spécifier la couleur de ces filets.
+
+\smallskip
+Avec \pkg{nicematrix}, il est possible de spécifier une couleur même si \pkg{colortbl} n'est pas chargé. Par souci
+de compatibilité, la commande est nommée également |\arrayrulecolor|. Les environnements de \pkg{nicematrix}
+proposent également une clé |rules/color| qui permet de fixer cette couleur pour l'environnement en question.
+
+\medskip
\begin{scope}
-\NiceMatrixOptions{transparent}
-\begin{minipage}{10cm}
-Maintenant, si nous utilisons l'extension \pkg{nicematrix} avec l'option |transparent|, le même code va donner le
-résultat ci-contre à droite.
-\end{minipage}\hspace{1cm}
-$A = \begin{pmatrix}
-1 & \cdots & \cdots & 1 \\
-0 & \ddots & & \vdots \\
-\vdots & \ddots & \ddots & \vdots \\
-0 & \cdots & 0 & 1
-\end{pmatrix}$
+\hfuzz=10cm
+\begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
+\begin{NiceTabular}{|CCC|}[~emphase#rules/color=[gray]{0.9},rules/width=1pt@]
+\hline
+rose & tulipe & lys \\
+arum & iris & violette \\
+muguet & dahlia & souci \\
+\hline
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{|CCC|}[rules/color=[gray]{0.9},rules/width=1pt]
+\hline
+rose & tulipe & lys \\
+arum & iris & violette \\
+muguet & dahlia & souci \\
+\hline
+\end{NiceTabular}
\end{scope}
+\medskip
+Si on veut définir de nouveaux spécificateurs de colonnes pour des filets (par exemple plus épais ou bien d'une
+couleur spécifique), on aura peut-être intérêt à utiliser la commande |\OnlyMainNiceMatrix| décrite p.~\pageref{OnlyMainNiceMatrix}.
+
+\bigskip
+\subsection{Une remarque concernant \textbackslash cline}
-\section{Les environnements de cette extension}
+\label{remark-cline}
-L'extension \pkg{nicematrix} définit les nouveaux environnements suivants :
+Les traits verticaux et horizontaux que l'on insère avec |\hline| et le spécificateur de colonne «\verb+|+» de
+\pkg{array} rendent le tableau plus large ou plus long d'une quantité égale à la largeur du trait.
+
+\smallskip
+Pour des raisons historiques, il n'en est pas de même pour la commande |\cline|, comme on peut le voir avec
+l'exemple suivant.
\medskip
-\begin{ttfamily}
-\setlength{\tabcolsep}{3mm}
-\begin{tabular}{llll}
-\{NiceMatrix\} & \{NiceArray\} & \{NiceTabular\} \\
-\{pNiceMatrix\} & \{pNiceArray\} \\
-\{bNiceMatrix\} & \{bNiceArray\} \\
-\{BNiceMatrix\} & \{BNiceArray\} \\
-\{vNiceMatrix\} & \{vNiceArray\} \\
-\{VNiceMatrix\} & \{VNiceArray\} \\
- & \{NiceArrayWithDelims\}
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+\setlength{\arrayrulewidth}{2pt}
+\begin{tabular}{cccc} \hline
+A&B&C&D \\ ~emphase#\cline{2-2}@
+A&B&C&D \\ \hline
\end{tabular}
-\end{ttfamily}
+\end{BVerbatim}
+%
+\begin{scope}
+\setlength{\arrayrulewidth}{2pt}
+\begin{tabular}[c]{cccc}
+\hline
+A&B&C&D \\
+\cline{2-2}
+A&B&C&D \\
+\hline
+\end{tabular}
+\end{scope}
+
+\medskip
+Dans les environnements de \pkg{nicematrix}, cette situation est corrigée (il est néanmoins possible de revenir au
+comportement par défaut de |\cline| avec la clé |standard-cline|).
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+\setlength{\arrayrulewidth}{2pt}
+\begin{NiceTabular}{CCCC} \hline
+A&B&C&D \\ ~emphase#\cline{2-2}@
+A&B&C&D \\ \hline
+\end{NiceTabular}
+\end{BVerbatim}
+%
+\begin{scope}
+\setlength{\arrayrulewidth}{2pt}
+\begin{NiceTabular}[c]{CCCC}
+\hline
+A&B&C&D \\
+\cline{2-2}
+A&B&C&D \\
+\hline
+\end{NiceTabular}
+\end{scope}
+
+
+\bigskip
+\subsection{Les clés hlines et vlines}
+
+La clé |hlines| demande un tracé de tous les filets horizontaux et la clé |vlines| demande un tracé de tous les
+filets verticaux. En fait, dans les environnements avec délimiteurs (comme |{pNiceMatrix}| ou |{bNiceArray}|), les
+filets extérieurs ne sont pas tracés (ce qui est le comportement certainement attendu).
\medskip
-Par défaut, les environnements |{NiceMatrix}|, |{pNiceMatrix}|, |{bNiceMatrix}|, |{BNiceMatrix}|, |{vNiceMatrix}|
-et |{VNiceMatrix}| se comportent quasiment comme les environnements correspondants de \pkg{amsmath} : |{matrix}|,
-|{pmatrix}|, |{bmatrix}|, |{Bmatrix}|, |{vmatrix}| et |{Vmatrix}|.
+\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
+$\begin{pNiceMatrix}[~emphase#vlines@,rules/width=0.2pt]
+1 & 2 & 3 & 4 & 5 & 6 \\
+1 & 2 & 3 & 4 & 5 & 6 \\
+1 & 2 & 3 & 4 & 5 & 6
+\end{pNiceMatrix}$
+\end{BVerbatim}
+$\begin{pNiceMatrix}[vlines,rules/width=0.2pt]
+1 & 2 & 3 & 4 & 5 & 6 \\
+1 & 2 & 3 & 4 & 5 & 6 \\
+1 & 2 & 3 & 4 & 5 & 6
+\end{pNiceMatrix}$
+\bigskip
+Il y a néanmoins une différence entre l'utilisation de l'option |vlines| et du spécificateur «\verb+|+» dans le
+préambule de l'environnement : les filets tracés par |vlines| traversent les double-filets horizontaux tracés par
+|\hline\hline| (il n'y a pas besoin d'utiliser \pkg{hhline}).
+
\medskip
-Les environnements |{NiceArray}| et |{NiceTabular}| sont similaires aux environnements |{array}| et |{tabular}| de
-l'extension |{array}|. Néanmoins, pour des raisons techniques, dans le préambule de ces environnements,
-l'utilisateur doit utiliser les lettres |L|, |C| et~|R| au lieu de |l|, |c| et |r|. Il est possible d'utiliser les
-constructions |p{...}|, |m{...}|, |b{...}|, |w{...}{...}|, |W{...}{...}|, \verb+|+, |>{...}|, |<{...}|, |@{...}|,
-|!{...}| et |*{n}{...}|.
+\begin{BVerbatim}[baseline=c,boxwidth=11.5cm]
+$\begin{NiceMatrix}[~emphase#vlines@] \hline
+a & b & c & d \\ \hline \hline
+1 & 2 & 3 & 4 \\
+1 & 2 & 3 & 4 \\ \hline
+\end{NiceMatrix}$
+\end{BVerbatim}
+%
+$\begin{NiceMatrix}[vlines]
+\hline
+a & b & c & d \\
+\hline \hline
+1 & 2 & 3 & 4 \\
+1 & 2 & 3 & 4 \\
+\hline
+\end{NiceMatrix}$
+
+
+\bigskip
+Si vous utilisez \pkg{booktabs} (qui fournit |\toprule|, |\midrule|, |\bottomrule|, etc.) et que vous tenez
+absolument à mettre des filets verticaux (ce qui est contraire à l'esprit à \pkg{booktabs}), sachez que la clé
+|vlines| est compatible avec \pkg{booktabs}.
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=11.5cm]
+$\begin{NiceMatrix}[~emphase#vlines@] \toprule
+a & b & c & d \\ \midrule
+1 & 2 & 3 & 4 \\
+1 & 2 & 3 & 4 \\ \bottomrule
+\end{NiceMatrix}$
+\end{BVerbatim}
+%
+$\begin{NiceMatrix}[vlines]
+\toprule
+a & b & c & d \\
+\midrule
+1 & 2 & 3 & 4 \\
+1 & 2 & 3 & 4 \\
+\bottomrule
+\end{NiceMatrix}$
+
+
+\subsection{La clé hvlines}
+\label{hvlines}
+
+La clé |hvlines| demande le tracé de tous les filets horizontaux et verticaux \emph{sauf dans les
+ blocs}.\footnote{En fait, quand la clé |hvlines| est utilisée, les filets ne sont pas non plus tracés dans les blocs virtuels
+ délimités par des cases reliées par des lignes pointillées (cf. p. \pageref{dotted-and-hvlines}).}
+
+\medskip
+\begin{Verbatim}
+\begin{NiceTabular}{CCCC}[~emphase#hvlines@,rules/color=blue,rules/width=1pt]
+rose & tulipe & marguerite & dahlia \\
+violette & \Block{2-2}{\LARGE\color{blue} fleurs} & & souci \\
+pervenche & & & lys \\
+arum & iris & jacinthe & muguet
+\end{NiceTabular}
+\end{Verbatim}
+%
+\begin{center}
+\begin{NiceTabular}{CCCC}[hvlines,rules/color=blue,rules/width=1pt]
+rose & tulipe & marguerite & dahlia \\
+violette & \Block{2-2}{\LARGE\color{blue} fleurs} & & souci \\
+pervenche & & & lys \\
+arum & iris & jacinthe & muguet
+\end{NiceTabular}
+\end{center}
+
+
+
+\subsection{La commande \textbackslash diagbox}
+
+La commande |\diagbox| (inspirée par l'extension \pkg{diagbox}) permet, quand elle est utilisée dans une case, de
+couper cette case selon une diagonale descendante.\footnote{L'auteur de ce document considère que ce type de
+ construction est un piètre choix graphique.}
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+$\begin{NiceArray}{*{5}{C}}[hvlines]
+~emphase#\diagbox{x}{y}@ & e & a & b & c \\
+e & e & a & b & c \\
+a & a & e & c & b \\
+b & b & c & e & a \\
+c & c & b & a & e
+\end{NiceArray}$
+\end{BVerbatim}
+$\begin{NiceArray}{*{5}{C}}[hvlines]
+\diagbox{x}{y} & e & a & b & c \\
+e & e & a & b & c \\
+a & a & e & c & b \\
+b & b & c & e & a \\
+c & c & b & a & e
+\end{NiceArray}$
+
+
+
+
+
+\subsection{Filets en pointillés}
+
+
+Dans les environnements de \pkg{nicematrix}, il est possible d'utiliser la commande |\hdottedline| (fournie
+par \pkg{nicematrix}) qui est l'équivalent pour les pointillés des commandes |\hline| et |\hdashline|
+(cette dernière étant une commande de \pkg{arydshln}).
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
+\begin{pNiceMatrix}
+1 & 2 & 3 & 4 & 5 \\
+~emphase#\hdottedline@
+6 & 7 & 8 & 9 & 10 \\
+11 & 12 & 13 & 14 & 15
+\end{pNiceMatrix}
+\end{BVerbatim}
+$\begin{pNiceMatrix}
+1 & 2 & 3 & 4 & 5 \\
+\hdottedline
+6 & 7 & 8 & 9 & 10 \\
+11 & 12 & 13 & 14 & 15
+\end{pNiceMatrix}$
+
+
+\bigskip
+Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, |{NiceArray}|, etc.), il est possible
+de dessiner un trait vertical en pointillés avec le spécificateur «|:|».
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
+\begin{pNiceArray}{CCCC~emphase#:@C}
+1 & 2 & 3 & 4 & 5 \\
+6 & 7 & 8 & 9 & 10 \\
+11 & 12 & 13 & 14 & 15
+\end{pNiceArray}
+\end{BVerbatim}
+$\begin{pNiceArray}{CCCC:C}
+1 & 2 & 3 & 4 & 5 \\
+6 & 7 & 8 & 9 & 10 \\
+11 & 12 & 13 & 14 & 15
+\end{pNiceArray}$
+
+\bigskip
+Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour indiquer dans le préambule un trait
+vertical en pointillés avec l'option |letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|.
+
+
+\bigskip
+\emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie \pkg{nicematrix}) est chargée, les traits
+verticaux et horizontaux que l'on insère rendent le tableau plus large ou plus long d'une quantité égale à la
+largeur du trait\footnote{En fait, cela est vrai pour |\hline| et «\verb+|+» mais pas pour |\cline|.}. Avec
+\pkg{nicematrix}, les lignes en pointillés tracées par |\hdottedline| et «|:|» ont le même effet.
+
+
+
+
+\section{Les couleurs des rangées et des colonnes}
+
+L'extension \pkg{colortbl} permet de colorier des cases, des rangées ou des colonnes d'un tableau. Néanmoins,
+l'affichage du \textsc{pdf} résultant n'est pas toujours parfait, en particulier quand on utilise également des
+filets. Dans certains lecteurs de \textsc{pdf}, des filets verticaux semblent disparaître. De fines lignes blanches
+peuvent également apparaître.
+
+\medskip
+L'extension \pkg{nicematrix} propose des outils similaires qui ne présentent pas ces inconvénients. Elle propose
+une clé |code-before|\footnote{Il existe aussi une clé |code-after| : cf. p.~\pageref{code-after}.} pour du code
+qui sera exécuté \emph{avant} le tracé du tableau. Dans ce |code-before|, de nouvelles commandes sont disponibles :
+|\cellcolor|, |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors| et |\chessboardcolors|.
+\label{code-before}
+
+\medskip
+Ces outils sont indépendants de \pkg{colortbl}.\footnote{On peut donc colorier les filets, les cellules, les
+ rangées, les colonnes, etc. sans charger \pkg{colortbl}. Le présent document ne charge pas \pkg{colortbl}.}
+
+\medskip
+Toutes ces commandes acceptent un argument optionnel (entre crochets et en première position) qui est le modèle
+colorimétrique pour la spécification des couleurs.
+
+\medskip
+\begin{itemize}
+\item La commande |\cellcolor| tient son nom de la commande |\cellcolor| de \pkg{colortbl}.
+
+Elle prend en arguments obligatoires une couleur et une liste de cases sous le format $i$-$j$ où $i$ est le
+numéro de ligne et $j$ le numéro de colonne.
+
+\medskip
+\begin{scope}
+\hfuzz=10cm
+\begin{BVerbatim}[boxwidth=10cm,baseline=c]
+\begin{NiceTabular}{|C|C|C|}[code-before = ~emphase#\cellcolor{red!15}{3-1,2-2,1-3}@]
+\hline
+a & b & c \\ \hline
+e & f & g \\ \hline
+h & i & j \\ \hline
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{|C|C|C|}[code-before = \cellcolor{red!15}{3-1,2-2,1-3}]
+\hline
+a & b & c \\ \hline
+e & f & g \\ \hline
+h & i & j \\ \hline
+\end{NiceTabular}
+\end{scope}
+
+\bigskip
+\item La commande |\rectanglecolor| prend trois arguments obligatoires. Le premier est la couleur, les deux
+suivants fournissent la case en haut à gauche et la case en bas à droite du rectangle.
+
+\medskip
+\begin{scope}
+\hfuzz=10cm
+\begin{BVerbatim}[boxwidth=10cm,baseline=c]
+\begin{NiceTabular}{|C|C|C|}[code-before = ~emphase#\rectanglecolor{blue!15}{2-2}{3-3}@]
+\hline
+a & b & c \\ \hline
+e & f & g \\ \hline
+h & i & j \\ \hline
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{|C|C|C|}[code-before = \rectanglecolor{blue!15}{2-2}{3-3}]
+\hline
+a & b & c \\ \hline
+e & f & g \\ \hline
+h & i & j \\ \hline
+\end{NiceTabular}
+\end{scope}
+
+
+
+\bigskip
+\item La commande |\rowcolor| doit son nom à la commande |\rowcolor| de \pkg{colortbl}. Son premier argument
+obligatoire est la couleur et le deuxième est une liste de numéros de rangées ou bien d'intervalles de rangées sous
+la forme $a$-$b$ (un intervalle de la forme $a$- représente toutes les rangées à partir de la rangée~$a$).
+
+\medskip
+
+\begin{scope}
+\hfuzz=10cm
+\begin{BVerbatim}[boxwidth=9cm,baseline=c]
+$\begin{NiceArray}{LLL}[hvlines, ~emphase#code-before = \rowcolor{red!15}{1,3-5,8-}@]
+a_1 & b_1 & c_1 \\
+a_2 & b_2 & c_2 \\
+a_3 & b_3 & c_3 \\
+a_4 & b_4 & c_4 \\
+a_5 & b_5 & c_5 \\
+a_6 & b_6 & c_6 \\
+a_7 & b_7 & c_7 \\
+a_8 & b_8 & c_8 \\
+a_9 & b_9 & c_9 \\
+a_{10} & b_{10} & c_{10} \\
+\end{NiceArray}$
+\end{BVerbatim}
+%
+$\begin{NiceArray}{LLL}%
+[baseline=4,hvlines, code-before = \rowcolor{red!15}{1,3-5,8-}]
+a_1 & b_1 & c_1 \\
+a_2 & b_2 & c_2 \\
+a_3 & b_3 & c_3 \\
+a_4 & b_4 & c_4 \\
+a_5 & b_5 & c_5 \\
+a_6 & b_6 & c_6 \\
+a_7 & b_7 & c_7 \\
+a_8 & b_8 & c_8 \\
+a_9 & b_9 & c_9 \\
+a_{10} & b_{10} & c_{10} \\
+\end{NiceArray}$
+\end{scope}
+
+
+\bigskip
+\item La commande |\columncolor| doit son nom à la commande |\columncolor| de \pkg{colortbl}. Sa syntaxe est
+similaire à celle de |\rowcolor|.
+
+\bigskip
+\item La commande |\rowcolors| (avec un \emph{s}) doit son nom à la commande |\rowcolors| de
+\pkg{xcolor}\footnote{La commande |\rowcolors| de \pkg{xcolor} est disponible quand \pkg{xcolor} est chargé avec
+ l'option |table|.}. Le \emph{s} rappelle qu'il y a deux couleurs. Elle colorie alternativement les rangées avec
+les deux couleurs à partir de la rangée dont le numéro est donné en premier argument (obligatoire).
+
+\medskip
+\begin{scope}
+\hfuzz=10cm
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+\begin{NiceTabular}{LR}[hlines,code-before = ~emphase#\rowcolors{1}{blue!10}{}@]
+Pierre & 12 \\
+Jacques & 8 \\
+Stéphanie & 18 \\
+Amélie & 20 \\
+Henri & 14 \\
+Estelle & 15
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{LR}[hlines,code-before = \rowcolors{1}{blue!10}{},baseline=3]
+Pierre & 12 \\
+Jacques & 8 \\
+Stéphanie & 18 \\
+Amélie & 20 \\
+Henri & 14 \\
+Estelle & 15
+\end{NiceTabular}
+\end{scope}
+
+
+
+\bigskip
+\item La commande |\chessboardcolors| prend en arguments obligatoires deux couleurs et colorie les cases en
+quinconces avec les deux couleurs.
+
+\medskip
+\begin{scope}
+\hfuzz=10cm
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+$\begin{pNiceMatrix}[R,margin, ~emphase#code-before=\chessboardcolors{red!15}{blue!15}@]
+1 & -1 & 1 \\
+-1 & 1 & -1 \\
+1 & -1 & 1
+\end{pNiceMatrix}$
+\end{BVerbatim}
+$\begin{pNiceMatrix}%
+[baseline=1, R, margin, code-before = \chessboardcolors{red!15}{blue!15}]
+1 & -1 & 1 \\
+-1 & 1 & -1 \\
+1 & -1 & 1
+\end{pNiceMatrix}$
+\end{scope}
+
+\medskip
+On a utilisé la clé |R| qui impose que toutes les colonnes soient alignées à droite (cf. p.~\pageref{key-R}).
+\end{itemize}
+
+\bigskip
+On remarquera que ces commandes sont compatibles avec les commandes de \pkg{booktabs} (|\toprule|, |\midrule|,
+|\bottomrule|, etc).
+
+\medskip
+\begin{scope}
+\hfuzz=10cm
+\begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
+\begin{NiceTabular}{LSSSS}%
+[code-before = \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{}]
+~emphase#\toprule@
+\Block{2-1}{Produit} \\
+\Block{1-3}{dimensions (cm)} & & &
+\Block{2-1}{\rotate Prix} \\
+~emphase#\cmidrule(rl){2-4}@
+ & L & l & h \\
+~emphase#\midrule@
+petit & 3 & 5.5 & 1 & 30 \\
+moyen & 5.5 & 8 & 1.5 & 50.5 \\
+premium & 8.5 & 10.5 & 2 & 80 \\
+extra & 8.5 & 10 & 1.5 & 85.5 \\
+spécial & 12 & 12 & 0.5 & 70 \\
+~emphase#\bottomrule@
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}[c]{LSSSS}%
+[code-before = \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{}]
+\toprule
+\Block{2-1}{Produit} &
+\Block{1-3}{dimensions (cm)} & & &
+\Block{2-1}{\rotate Prix} \\
+\cmidrule(rl){2-4}
+ & L & l & h \\
+\midrule
+petit & 3 & 5.5 & 1 & 30 \\
+moyen & 5.5 & 8 & 1.5 & 50.5 \\
+premium & 8.5 & 10.5 & 2 & 80 \\
+extra & 8.5 & 10 & 1.5 & 85.5 \\
+spécial & 12 & 12 & 0.5 & 70 \\
+\bottomrule
+\end{NiceTabular}
+\end{scope}
+
+\medskip
+On a utilisé le type de colonne |S| de \pkg{siunitx}.
+
+
+\section{La largeur des colonnes}
+\label{width}
+
+Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, |{NiceArray}|, etc.), il est possible
+de fixer la largeur d'une colonne avec les lettres classiques |w| et |W| de l'extension \pkg{array}. Dans
+|{NiceTabular}|, les cases des colonnes de ce type sont composées en mode texte mais, dans |{NiceArray}|,
+|{pNiceArray}|, etc., elles sont composées en mode mathématique (alors que dans |{array}| de \pkg{array}, elles
+sont composées en mode texte).
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=9cm]
+\begin{NiceTabular}{~emphase#Wc{2cm}@CC}[hvlines]
+Paris & New York & Madrid \\
+Berlin & London & Roma \\
+Rio & Tokyo & Oslo
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{Wc{2cm}CC}[hvlines]
+Paris & New York & Madrid \\
+Berlin & London & Roma \\
+Rio & Tokyo & Oslo
+\end{NiceTabular}
+
+
+\bigskip
+Dans les environnements de \pkg{nicematrix}, il est aussi possible de fixer la largeur \emph{minimale} de toutes
+les colonnes de la matrice directement avec l'option |columns-width|.
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+$\begin{pNiceMatrix}[~emphase#columns-width = 1cm@]
+1 & 12 & -123 \\
+12 & 0 & 0 \\
+4 & 1 & 2
+\end{pNiceMatrix}$
+\end{BVerbatim}
+$\begin{pNiceMatrix}[columns-width = 1cm]
+1 & 12 & -123 \\
+12 & 0 & 0 \\
+4 & 1 & 2
+\end{pNiceMatrix}$
+
+\medskip
+Notez que l'espace inséré entre deux colonnes (égal à 2 |\tabcolsep| dans |{NiceTabular}| et à 2 |\arraycolsep|
+dans les autres environnements) n'est pas supprimé (il est évidemment possible de le supprimer en mettant
+|\tabcolsep| ou |\arraycolsep| à~$0$ avant).
+
+\bigskip
+Il est possible de donner la valeur spéciale |auto| à l'option |columns-width|: toutes les colonnes du tableau
+auront alors une largeur égale à la largeur de la case la plus large du tableau.\footnote{Le résultat est atteint
+ dès la première compilation (mais Tikz écrivant des informations dans le fichier |.aux|, un message demandant une
+ deuxième compilation apparaîtra).}\par\nobreak
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+$\begin{pNiceMatrix}[~emphase#columns-width = auto@]
+1 & 12 & -123 \\
+12 & 0 & 0 \\
+4 & 1 & 2
+\end{pNiceMatrix}$
+\end{BVerbatim}
+$\begin{pNiceMatrix}[columns-width = auto]
+1 & 12 & -123 \\
+12 & 0 & 0 \\
+4 & 1 & 2
+\end{pNiceMatrix}$
+
+\bigskip
+Sans surprise, il est possible de fixer la largeur minimale de toutes les colonnes de toutes les matrices dans une
+certaine portion de document avec la commande |\NiceMatrixOptions|.\par\nobreak
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
+~emphase#\NiceMatrixOptions{columns-width=10mm}@
+$\begin{pNiceMatrix}
+a & b \\ c & d
+\end{pNiceMatrix}
+=
+\begin{pNiceMatrix}
+1 & 1245 \\ 345 & 2
+\end{pNiceMatrix}$
+\end{BVerbatim}
+\begin{scope}
+\NiceMatrixOptions{columns-width=10mm}
+$\begin{pNiceMatrix}
+a & b \\
+c & d
+\end{pNiceMatrix}
+=
+\begin{pNiceMatrix}
+1 & 1245 \\
+345 & 2
+\end{pNiceMatrix}$
+\end{scope}
+
+
+\bigskip
+Mais il est aussi possible de fixer une zone dans laquelle toutes les matrices auront leurs colonnes de la même
+largeur, égale à la largeur de la case la plus large de toutes les matrices de la zone. Cette construction utilise
+l'environnement |{NiceMatrixBlock}| avec l'option |auto-columns-width|\footnote{Pour le moment, c'est le seul
+ usage de l'environnement |{NiceMatrixBlock}| mais il pourrait y en avoir davantage dans le futur.}.
+L'environnement |{NiceMatrixBlock}| n'a pas de rapport direct avec la commande |\Block| présentée précédemment dans
+ce document (cf.~p.~\pageref{Block}).
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
+~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@
+$\begin{array}{c}
+\begin{bNiceMatrix}
+ 9 & 17 \\ -2 & 5
+ \end{bNiceMatrix} \\ \\
+\begin{bNiceMatrix}
+ 1 & 1245345 \\ 345 & 2
+\end{bNiceMatrix}
+\end{array}$
+~emphase#\end{NiceMatrixBlock}@
+\end{BVerbatim}
+\begin{NiceMatrixBlock}[auto-columns-width]
+$\begin{array}{c}
+\begin{bNiceMatrix}
+ 9 & 17 \\ -2 & 5
+ \end{bNiceMatrix} \\ \\
+\begin{bNiceMatrix}
+ 1 & 1245345 \\ 345 & 2
+\end{bNiceMatrix}
+\end{array}$
+\end{NiceMatrixBlock}
+
+\medskip
+\textbf{Plusieurs compilations peuvent être nécessaires pour obtenir le résultat désiré.}
+
+
+
+\bigskip
+\section{Les rangées et colonnes extérieures}
+Les environnements de \pkg{nicematrix} permettent de composer des rangées et des colonnes «extérieures» grâce aux options
+|first-row|, |last-row|, |first-col| et |last-col|.
+\label{exterior}
+
+Si elle est présente, la «première rangée» (extérieure) est numérotée par $0$ (et non $1$). Il en est de même pour
+la «première colonne».
+
+\begin{Verbatim}
+$\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@,nullify-dots]
+ & C_1 & \Cdots & & C_4 & \\
+L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+ & a_{31} & a_{32} & a_{33} & a_{34} & \\
+L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+ & C_1 & \Cdots & & C_4 &
+\end{pNiceMatrix}$
+\end{Verbatim}
+%
+\[\begin{pNiceMatrix}[first-row,last-row,first-col,last-col,nullify-dots]
+ & C_1 & \Cdots & & C_4 & \\
+L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+ & a_{31} & a_{32} & a_{33} & a_{34} & \\
+L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+ & C_1 & \Cdots & & C_4 &
+\end{pNiceMatrix}\]
+
+\medskip
+Les lignes pointillées ont été tracées avec les outils présentés p.~\pageref{Cdots}.
+
+
+\bigskip
+Il y a plusieurs remarques à formuler.
+%
+\begin{itemize}[beginpenalty=10000]
+\item Si on utilise un environnement avec préambule explicite (c'est-à-dire |{NiceArray}| ou l'une de ses
+variantes), on ne doit pas mettre dans ce préambule de spécification de colonne pour les éventuelles première et
+dernière colonne : ce sera automatiquement (et nécessairement) une colonne |R| pour la première colonne et une
+colonne |L| pour la dernière.
+
+\item On peut se demander comment \pkg{nicematrix} détermine le nombre de rangées et de colonnes nécessaires à la
+composition de la «dernière rangée» et de la «dernière colonne».
+
+\begin{itemize}
+\item Dans le cas d'un environnement avec préambule, comme |{NiceTabular}| ou |{pNiceArray}|, le nombre de colonnes
+se déduit évidemment du préambule.
+
+\item Dans le cas où l'option |light-syntax| (cf. p. \pageref{light-syntax}) est utilisée, \pkg{nicematrix} profite
+du fait que cette option nécessite de toutes manières le chargement complet du contenu de l'environnement (d'où
+l'impossibilité de mettre du verbatim dans ce cas-là) avant composition du tableau. L'analyse du contenu de
+l'environnement donne le nombre de rangées (mais pas le nombre de colonnes).
+
+\item Dans les autres cas, \pkg{nicematrix} détermine le nombre de rangées et de colonnes à la première compilation
+et l'écrit dans le fichier |.aux| pour pouvoir l'utiliser à la compilation suivante.
+
+\textsl{Néanmoins, il est possible de donner le numéro de la dernière rangée et le numéro de la dernière colonne en
+arguments des options |last-row| et |last-col|, ce qui permettra d'accélérer le processus complet de
+compilation.} C'est ce que nous ferons dans la suite.
+\end{itemize}
+
+\end{itemize}
+
+
+
+\bigskip
+On peut contrôler l'apparence de ces rangées et colonnes avec les options |code-for-first-row|,
+|code-for-last-row|, |code-for-first-col| et |code-for-last-col|. Ces options sont des listes de tokens qui seront
+insérées au début de chaque case de la rangée ou de la colonne considérée.
+
+\begin{Verbatim}
+\NiceMatrixOptions{~emphase#code-for-first-row@ = \color{red},
+ ~emphase#code-for-first-col@ = \color{blue},
+ ~emphase#code-for-last-row@ = \color{green},
+ ~emphase#code-for-last-col@ = \color{magenta}}
+$\begin{pNiceArray}{CC|CC}[first-row,last-row=6,first-col,last-col,nullify-dots]
+ & C_1 & \Cdots & & C_4 & \\
+L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+\hline
+ & a_{31} & a_{32} & a_{33} & a_{34} & \\
+L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+ & C_1 & \Cdots & & C_4 &
+\end{pNiceArray}$
+\end{Verbatim}
+%
+\begin{scope}
+\NiceMatrixOptions{code-for-first-row = \color{red},
+ code-for-first-col = \color{blue},
+ code-for-last-row = \color{green},
+ code-for-last-col = \color{magenta}}
+\begin{displaymath}
+\begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
+ & C_1 & \multicolumn1C{\Cdots} & & C_4 & \\
+L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+\hline
+ & a_{31} & a_{32} & a_{33} & a_{34} & \\
+L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+ & C_1 & \multicolumn1C{\Cdots} & & C_4 &
+\end{pNiceArray}
+\end{displaymath}
+\end{scope}
+
+
+
+\emph{Remarques}
+\begin{itemize}[beginpenalty=10000]
+\item Comme on peut le voir dans l'exemple précédent, les filets horizontaux et verticaux ne s'étendent pas dans
+les rangées et colonnes extérieures.
+
+Néanmoins, si on veut définir de nouveaux spécificateurs de colonnes pour des filets (par exemple plus épais), on
+aura sans doute intérêt à utiliser la commande |\OnlyMainNiceMatrix| décrite p.~\pageref{OnlyMainNiceMatrix}.
+\item Une spécification de couleur présente dans |code-for-first-row| s'applique à une ligne pointillée tracée
+dans cette «première rangée» (sauf si une valeur a été donnée à |xdots/color|). Idem pour les autres.
+\item Sans surprise, une éventuelle option |columns-width| (décrite p.~\pageref{width}) ne s'applique pas à la
+«première colonne» ni à la «dernière colonne».
+\item Pour des raisons techniques, il n'est pas possible d'utiliser l'option de la commande |\\| après la
+«première rangée» ou avant la «dernière rangée» (le placement des délimiteurs serait erroné).
+\end{itemize}
+
+
-Voir p.~\pageref{NiceArray} la partie concernant |{NiceArray}| et |{NiceTabular}|.
\section{Les lignes en pointillés continues}
+\label{Cdots}
+
À l'intérieur des environnements de l'extension \pkg{nicematrix}, de nouvelles commandes sont définies : |\Ldots|,
|\Cdots|, |\Vdots|, |\Ddots|, et |\Iddots|. Ces commandes sont conçues pour être utilisées à la place de |\dots|,
|\cdots|, |\vdots|, |\ddots| et |\iddots|.\footnote{La commande |\iddots|, définie dans \pkg{nicematrix}, est une
@@ -416,8 +1392,6 @@ x & \Ldots & & & & x
L'option |nullify-dots| «smashe» les instructions |\Ldots| (et ses variantes) horizontalement mais aussi
verticalement.
-\medskip
-{\bfseries Il doit n'y avoir aucun espace devant le crochet ouvrant (|[|) des options de l'environnement.}
\subsection{La commande \textbackslash Hdotsfor}
@@ -636,225 +1610,51 @@ b & a & b & \Ddots & & \Vdots \\
\end{pNiceMatrix}\]
-\section{Les nœuds PGF-Tikz créés par l'extension nicematrix}
+\subsection{Les lignes pointillées et la clé hvlines}
-\label{name}
+\label{dotted-and-hvlines}
-L'extension \pkg{nicematrix} crée un nœud PGF-Tikz pour chaque case (non vide) du tableau considéré. Ces nœuds sont
-utilisés pour tracer les lignes en pointillés entre les cases du tableau. Toutefois, l'utilisateur peut aussi
-utiliser directement ces nœuds (s'il a chargé Tikz\footnote{On rappelle que depuis la version 3.13,
- \pkg{nicematrix} ne charge plus Tikz par défaut, mais seulement \textsc{pgf} (Tikz est une surcouche de
- \textsc{pgf}).}). On commence par donner un nom au tableau (avec l'option |name|). Cela étant fait, les nœuds
-sont accessibles à travers les noms «\textsl{nom}-$i$-$j$» où \textsl{nom} est le nom donné au tableau et $i$ et
-$j$ les numéros de rangée et de colonne de la case considérée.
+On a dit (cf. p. \pageref{hvlines}) que la clé |hvlines| trace tous les filets horizontaux et verticaux, exceptés
+dans les blocs. En fait, avec cette clé, les filets ne sont pas non plus tracés dans les blocs virtuels délimités
+par des cases reliées par des lignes pointillées.
\medskip
\begin{BVerbatim}[baseline=c,boxwidth=11cm]
-$\begin{pNiceMatrix}[name=~emphase#ma-matrice@]
-1 & 2 & 3 \\
-4 & 5 & 6 \\
-7 & 8 & 9
+\NiceMatrixOptions{nullify-dots}
+$\begin{pNiceMatrix}[rules/color=gray,~emphase#hvlines@,margin]
+0 & \Cdots & & & & 0 \\
+1 & \Cdots & & & 1 & 2 \\
+0 & \Ddots & & & \Vdots & \Vdots \\
+\Vdots & \Ddots & & & & \\
+ & & & & & \\
+0 & \Cdots & & 0 & 1 & 2 \\
\end{pNiceMatrix}$
-\tikz[remember picture,overlay]
- \draw ~emphase#(ma-matrice-2-2)@ circle (2mm) ;
\end{BVerbatim}
-$\begin{pNiceMatrix}[name=ma-matrice]
-1 & 2 & 3 \\
-4 & 5 & 6 \\
-7 & 8 & 9
+\begin{scope}
+\NiceMatrixOptions{nullify-dots}
+$\begin{pNiceMatrix}[rules/color=gray,hvlines,margin]
+0 & \Cdots & & & & 0 \\
+1 & \Cdots & & & 1 & 2 \\
+0 & \Ddots & & & \Vdots & \Vdots \\
+\Vdots & \Ddots & & & & \\
+ & & & & & \\
+0 & \Cdots & & 0 & 1 & 2 \\
\end{pNiceMatrix}$
-\tikz[remember picture,overlay]
- \draw (ma-matrice-2-2) circle (2mm) ;
-
-\medskip
-Ne pas oublier les options |remember picture| et |overlay|.
-
-\bigskip
-Dans l'exemple suivant, nous avons surligné toutes les cases de la matrice.
-\[\begin{pNiceMatrix}
-a & a + b & a + b + c \\
-a & a & a + b \\
-a & a & a
-\CodeAfter
-\begin{tikzpicture}[
- every node/.style =
- {
- blend mode = multiply,
- inner sep = 0 pt ,
- fill = red!15
- }
- ]
-\node [fit = (1-1)] {} ;
-\node [fit = (1-3)] {} ;
-\node [fit = (2-2)] {} ;
-\node [fit = (3-1)] {} ;
-\node [fit = (3-3)] {} ;
-\node [fit = (1-2)] {} ;
-\node [fit = (2-1)] {} ;
-\node [fit = (2-3)] {} ;
-\node [fit = (3-2)] {} ;
-\end{tikzpicture}
-\end{pNiceMatrix}\]
-
-
-\bigskip
-En fait, l'extension \pkg{nicematrix} peut créer deux séries de nœuds supplémentaires (\emph{extra nodes} en
-anglais) : les «nœuds moyens» (\emph{medium nodes} en anglais) et les «nœuds larges» (\emph{large nodes} en
-anglais). Les premiers sont créés avec l'option |create-medium-nodes| et les seconds avec l'option
-|create-large-nodes|.\footnote{Il existe aussi l'option |create-extra-nodes| qui est un alias pour la conjonction
-de |create-medium-nodes| et |create-large-nodes|.}
-
-\medskip
-Les noms des «nœuds moyens» s'obtiennent en ajoutant le suffixe «|-medium|» au nom des nœuds normaux. Dans
-l'exemple suivant, on a surligné tous les «nœuds moyens». Nous considérons que cet exemple se suffit à lui-même
-comme définition de ces nœuds.
-\[\begin{pNiceMatrix}[
- create-medium-nodes,
- code-after = {\begin{tikzpicture}
- [every node/.style = {fill = red!15,
- blend mode = multiply,
- inner sep = 0 pt},
- name suffix = -medium]
- \node [fit = (1-1)] {} ;
- \node [fit = (1-2)] {} ;
- \node [fit = (1-3)] {} ;
- \node [fit = (2-1)] {} ;
- \node [fit = (2-2)] {} ;
- \node [fit = (2-3)] {} ;
- \node [fit = (3-1)] {} ;
- \node [fit = (3-2)] {} ;
- \node [fit = (3-3)] {} ;
- \end{tikzpicture}}]
-a & a + b & a + b + c \\
-a & a & a + b \\
-a & a & a
-\end{pNiceMatrix}\]
-
-
-\medskip
-Les noms des «nœuds larges» s'obtiennent en ajoutant le suffixe «|-large|» au nom des nœuds normaux. Dans l'exemple
-suivant, on a surligné tous les «nœuds larges». Nous considérons que cet exemple se suffit à lui-même comme
-définition de ces nœuds.\footnote{Il n'y a pas de «nœuds larges» créés dans les rangées et colonnes extérieures
- (pour ces rangées et colonnes, voir p.~\pageref{exterior}).}
-
-\[\begin{pNiceMatrix}[
- create-large-nodes,
- code-after = {\begin{tikzpicture}
- [every node/.style = {blend mode = multiply,
- inner sep = 0 pt},
- name suffix = -large]
- \node [fit = (1-1),fill = red!15] {} ;
- \node [fit = (1-3),fill = red!15] {} ;
- \node [fit = (2-2),fill = red!15] {} ;
- \node [fit = (3-1),fill = red!15] {} ;
- \node [fit = (3-3),fill = red!15] {} ;
- \node [fit = (1-2),fill = blue!15] {} ;
- \node [fit = (2-1),fill = blue!15] {} ;
- \node [fit = (2-3),fill = blue!15] {} ;
- \node [fit = (3-2),fill = blue!15] {} ;
- \end{tikzpicture}}]
-a & a + b & a + b + c \\
-a & a & a + b \\
-a & a & a
-\end{pNiceMatrix}\]
-
-
-\medskip
-Les «nœuds larges» de la première colonne et de la dernière colonne peuvent apparaître trop petits pour certains
-usages. C'est pourquoi il est possible d'utiliser les options |left-margin| et |right-margin| pour ajouter de
-l'espace des deux côtés du tableau et aussi de l'espace dans les «nœuds larges» de la première colonne et de la
-dernière colonne. Dans l'exemple suivant, nous avons utilisé les options |left-margin| et
-|right-margin|.\footnote{Les options |left-margin| et |right-margin| prennent des dimensions comme valeurs mais, si
- aucune valeur n'est donnée, c'est la valeur par défaut qui est utilisée et elle est égale à |\arraycolsep| (par
- défaut, 5~pt).Il existe aussi une option |margin| pour fixer à la fois |left-margin| et |right-margin|.}
-\[\begin{pNiceMatrix}[
- create-large-nodes,left-margin,right-margin,
- code-after = {\begin{tikzpicture}
- [every node/.style = {blend mode = multiply,
- inner sep = 0 pt},
- name suffix = -large]
- \node [fit = (1-1),fill = red!15] {} ;
- \node [fit = (1-3),fill = red!15] {} ;
- \node [fit = (2-2),fill = red!15] {} ;
- \node [fit = (3-1),fill = red!15] {} ;
- \node [fit = (3-3),fill = red!15] {} ;
- \node [fit = (1-2),fill = blue!15] {} ;
- \node [fit = (2-1),fill = blue!15] {} ;
- \node [fit = (2-3),fill = blue!15] {} ;
- \node [fit = (3-2),fill = blue!15] {} ;
- \end{tikzpicture}}]
-a & a + b & a + b + c \\
-a & a & a + b \\
-a & a & a
-\end{pNiceMatrix}\]
-
-\medskip
-Il est aussi possible d'ajouter de l'espace sur les côtés du tableau avec les options |extra-left-margin| et
-|extra-right-margin|. Ces marges ne sont pas incorporées dans les «nœuds larges». Dans l'exemple suivant, nous
-avons utilisé |extra-left-margin| et |extra-right-margin| avec la valeur $3$~pt.
-\[\begin{pNiceMatrix}[
- create-large-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
- code-after = {\begin{tikzpicture}
- [every node/.style = {blend mode = multiply,
- inner sep = 0 pt},
- name suffix = -large]
- \node [fit = (1-1),fill = red!15] {} ;
- \node [fit = (1-3),fill = red!15] {} ;
- \node [fit = (2-2),fill = red!15] {} ;
- \node [fit = (3-1),fill = red!15] {} ;
- \node [fit = (3-3),fill = red!15] {} ;
- \node [fit = (1-2),fill = blue!15] {} ;
- \node [fit = (2-1),fill = blue!15] {} ;
- \node [fit = (2-3),fill = blue!15] {} ;
- \node [fit = (3-2),fill = blue!15] {} ;
- \end{tikzpicture}}]
-a & a + b & a + b + c \\
-a & a & a + b \\
-a & a & a
-\end{pNiceMatrix}\]
+\end{scope}
-\medskip
-Dans le cas présent, si on veut un contrôle sur la hauteur des rangées, on peut ajouter un |\strut| dans chaque
-rangée du tableau.
-\[\begin{pNiceMatrix}[
- create-large-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
- code-after = {\begin{tikzpicture}
- [every node/.style = {blend mode = multiply,
- inner sep = 0 pt},
- name suffix = -large]
- \node [fit = (1-1),fill = red!15] {} ;
- \node [fit = (1-3),fill = red!15] {} ;
- \node [fit = (2-2),fill = red!15] {} ;
- \node [fit = (3-1),fill = red!15] {} ;
- \node [fit = (3-3),fill = red!15] {} ;
- \node [fit = (1-2),fill = blue!15] {} ;
- \node [fit = (2-1),fill = blue!15] {} ;
- \node [fit = (2-3),fill = blue!15] {} ;
- \node [fit = (3-2),fill = blue!15] {} ;
- \end{tikzpicture}}]
-\strut a & a + b & a + b + c \\
-\strut a & a & a + b \\
-\strut a & a & a
-\end{pNiceMatrix}\]
-\bigskip
-On explique plus loin comment surligner les nœuds créés par Tikz (cf. p. \pageref{highlight}).
\section{Le code-after}
\label{code-after}
-L'option |code-after| peut être utilisée pour indiquer du code qui sera exécuté après la construction de la matrice,
-et donc, en particulier, après la construction de tous les nœuds.
+L'option |code-after| peut être utilisée pour indiquer du code qui sera exécuté après la construction de la
+matrice.\footnote{Il existe aussi une clé |code-before| décrite p.~\pageref{code-before}.}
-\textbf{Si on a chargé Tikz}\footnote{On rappelle que depuis la version 3.13, \pkg{nicematrix} ne charge plus Tikz
- par défaut, mais seulement \textsc{pgf} (Tikz est une surcouche de \textsc{pgf}).}, on peut accéder à ces nœuds
-avec des instructions Tikz classiques. Les nœuds devront être désignés sous la forme $i$-$j$ (sans le préfixe
-correspondant au nom de l'environnement).
-
-De plus, une commande spéciale, nommée |\line| est disponible pour tracer directement des lignes en pointillés
-entre les nœuds). Elle peut par exemple être utilisée pour tracer une ligne entre deux cases adjacentes comme dans
-l'exemple suivant.
+Une commande spéciale, nommée |\line| est disponible pour tracer directement des lignes en pointillés entre les
+cases. Elle prend deux arguments correspondant aux deux cases à relier, chacun de la forme $i$-$j$ où $i$ est le
+numéro de ligne et $j$ est le numéro de colonne. Elle peut par exemple être utilisée pour tracer une ligne entre
+deux cases adjacentes comme dans l'exemple suivant.
\label{line-in-code-after}
\medskip
@@ -882,786 +1682,47 @@ Pour améliorer la lisibilité du code, une syntaxe alternative est proposée :
|code-after| à la fin de l'environnement, après le mot-clé |\CodeAfter|. Pour un exemple, voir page
\pageref{exemple-CodeAfter}.
-\section{Les environnements \{NiceArray\} et \{NiceTabular\}}
-\label{NiceArray}
-
-Les environnements |{NiceArray}| et |{NiceTabular}| sont similaires aux environnements |{array}| et |{tabular}|.
-L'argument obligatoire est le préambule du tableau. Néanmoins, pour des raisons techniques, l'utilisateur doit
-utiliser les lettres |L|, |C| et |R|\footnote{Les types de colonnes |L|, |C| et |R| sont définis localement à
- l'intérieur de |{NiceArray}| avec la commande |\newcolumntype| de \pkg{array}. Cette définition masque une
- éventuelle définition précédente.} au lieu de |l|, |c| et |r|. Dans une commande |\multicolumn|, on doit
-également utiliser les lettres |L|, |C| et |R|.
-
-Il est possible d'utiliser les constructions |p{...}|, |m{...}|, |b{...}|, |w{...}{...}|, |W{...}{...}|, \verb+|+,
-|>{...}|, |<{...}|, |@{...}|, |!{...}| et |*{n}{...}|. Néanmoins, dans l'environnement |{NiceArray}| (et ses
-variantes), le contenu des colonnes de type |w| ou |W| est composé en mode mathématique (dans |{array}| de
-\pkg{array}, elles sont composées en mode texte).
-\bigskip
-Sans surprise, l'extension \pkg{nicematrix} fournit également les variantes |{pNiceArray}|, |{vNiceArray}|,
-|{VNiceArray}|, |{bNiceArray}| et |{BNiceArray}|.
-\interitem
-L'un des intérêts de |{pNiceArray}| par rapport à |{pNiceMatrix}| est la possibilité de tracer des filets verticaux
-:
+\section{Autres fonctionnalités}
-\bigskip
-\begin{BVerbatim}[baseline=c,boxwidth=10cm]
-$\left[\begin{NiceArray}{CCCC|C}
-a_1 & ? & \Cdots & ? & ? \\
-0 & & \Ddots & \Vdots & \Vdots\\
-\Vdots & \Ddots & \Ddots & ? \\
-0 & \Cdots & 0 & a_n & ?
-\end{NiceArray}\right]$
-\end{BVerbatim}
-$\left[\begin{NiceArray}{CCCC|C}
-a_1 & ? & \Cdots & ? & ? \\
-0 & & \Ddots & \Vdots & \Vdots\\
-\Vdots & \Ddots & \Ddots & ? \\
-0 & \Cdots & 0 & a_n & ?
-\end{NiceArray}\right]$
-\interitem
-Un autre intérêt est la possibilité d'utiliser plusieurs types d'alignement de colonnes.
-\bigskip
-\begin{BVerbatim}[baseline=c,boxwidth=10cm]
-$\begin{pNiceArray}{LCR}
-a_{11} & \Cdots & a_{1n} \\
-a_{21} & & a_{2n} \\
-\Vdots & & \Vdots \\
-a_{n-1,1} & \Cdots & a_{n-1,n}
-\end{pNiceArray}$
-\end{BVerbatim}
-$\begin{pNiceArray}{LCR}
-a_{11} & \Cdots & a_{1n} \\
-a_{21} & & a_{2n} \\
-\Vdots & & \Vdots \\
-a_{n-1,1} & \Cdots & a_{n-1,n}
-\end{pNiceArray}$
-
-
-
-\interitem
-En fait, l'environnement |{pNiceArray}| et ses variantes sont fondés sur un environnement plus général, appelé
-|{NiceArrayWithDelims}|. Les deux premiers arguments obligatoires de cet environnement sont les délimiteurs gauche
-et droit qui seront utilisés dans la construction de la matrice. Il est possible d'utiliser |{NiceArrayWithDelims}|
-si on a besoin de délimiteurs atypiques ou asymétriques.
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=11cm]
-$\begin{~emphase#NiceArrayWithDelims@}
- {\downarrow}{\uparrow}{CCC}[margin]
-1 & 2 & 3 \\
-4 & 5 & 6 \\
-7 & 8 & 9
-\end{~emphase#NiceArrayWithDelims@}$
-\end{BVerbatim}
-$\begin{NiceArrayWithDelims}
- {\downarrow}{\uparrow}{CCC}[margin]
-1 & 2 & 3 \\
-4 & 5 & 6 \\
-7 & 8 & 9
-\end{NiceArrayWithDelims}$
-
-\bigskip
-\subsection{Le positionnement vertical des matrices}
-
-L'extension \pkg{nicematrix} propose aussi une option |baseline| pour la position verticale des matrices. Cette
-option |baseline| prend comme valeur un entier qui indique le numéro de rangée dont la ligne de base servira de
-ligne de base pour le tableau.
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=9cm]
-$A = \begin{pNiceMatrix}[~emphase#baseline=2@]
-\frac{1}{\sqrt{1+p^2}} & p & 1-p \\
-1 & 1 & 1 \\
-1 & p & 1+p
-\end{pNiceMatrix}$
-\end{BVerbatim}
-$A = \begin{pNiceMatrix}[baseline=2]
-\frac{1}{\sqrt{1+p^2}} & p & 1-p \\
-1 & 1 & 1 \\
-1 & p & 1+p
-\end{pNiceMatrix}$
-
-
-\interitem
-L'option |baseline| peut aussi prendre les trois valeurs spéciales |t|, |c| et |b|. Ces trois lettres peuvent aussi
-être utilisées de manière absolue comme pour l'option de l'environnement |{array}| de \pkg{array}. La valeur
-initiale de |baseline| est~|c|.
-
-
-\bigskip
-Dans l'exemple suivant, on utilise l'option |t| (synonyme de |baseline=t|) immédiatement après un |\item| de liste.
-On remarquera que la présence d'un |\hline| initial n'empêche pas l'alignement sur la ligne de base de la première
-rangée (avec |{array}| de {array}, il faut utiliser |\firsthline|\footnote{On peut aussi utiliser |\firsthline|
- avec |{NiceArray}|.}).
-
-\smallskip
-\begin{BVerbatim}[baseline=c,boxwidth=9cm]
-\begin{enumerate}
-\item un item
-\smallskip
-\item \renewcommand{\arraystretch}{1.2}
-$\begin{NiceArray}[t]{LCCCCCC}
-\hline
-n & 0 & 1 & 2 & 3 & 4 & 5 \\
-u_n & 1 & 2 & 4 & 8 & 16 & 32
-\hline
-\end{NiceArray}$
-\end{enumerate}
-\end{BVerbatim}
-%
-\begin{minipage}{5cm}
-\begin{enumerate}
-\item un item
-\smallskip
-\item \renewcommand{\arraystretch}{1.2}
-$\begin{NiceArray}[t]{LCCCCCC}
-\hline
-n & 0 & 1 & 2 & 3 & 4 & 5 \\
-u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
-\hline
-\end{NiceArray}$
-\end{enumerate}
-\end{minipage}
-
-
-\bigskip
-Il est également possible d'utiliser les outils de \pkg{booktabs}: |\toprule|,
-|\bottomrule| et |\midrule|.\par\nobreak
-
-\smallskip
-\begin{BVerbatim}[baseline=c,boxwidth=9cm]
-\begin{enumerate}
-\item an item
-\smallskip
-\item
-$\begin{NiceArray}[t]{LCCCCCC}
-~emphase#\toprule@
-n & 0 & 1 & 2 & 3 & 4 & 5 \\
-~emphase#\midrule@
-u_n & 1 & 2 & 4 & 8 & 16 & 32
-~emphase#\bottomrule@
-\end{NiceArray}$
-\end{enumerate}
-\end{BVerbatim}
-\begin{minipage}{5cm}
-\begin{enumerate}
-\item an item
-\smallskip
-\item
-$\begin{NiceArray}[t]{LCCCCCC}
-\toprule
-n & 0 & 1 & 2 & 3 & 4 & 5 \\
-\midrule
-u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
-\bottomrule
-\end{NiceArray}$
-\end{enumerate}
-\end{minipage}
-
-
-
-
-
-\bigskip
-\section{Les rangées et colonnes extérieures}
-Les environnements de \pkg{nicematrix} permettent de composer des rangées et des colonnes «extérieures» grâce aux options
-|first-row|, |last-row|, |first-col| et |last-col|.
-\label{exterior}
-
-Si elle est présente, la «première rangée» (extérieure) est numérotée par $0$ (et non $1$). Il en est de même pour
-la «première rangée».
-
-\begin{Verbatim}
-$\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@,nullify-dots]
- & C_1 & \Cdots & & C_4 & \\
-L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
- & a_{31} & a_{32} & a_{33} & a_{34} & \\
-L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
- & C_1 & \Cdots & & C_4 &
-\end{pNiceMatrix}$
-\end{Verbatim}
-%
-\[\begin{pNiceMatrix}[first-row,last-row,first-col,last-col,nullify-dots]
- & C_1 & \Cdots & & C_4 & \\
-L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
- & a_{31} & a_{32} & a_{33} & a_{34} & \\
-L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
- & C_1 & \Cdots & & C_4 &
-\end{pNiceMatrix}\]
-
-\bigskip
-Il y a plusieurs remarques à formuler.
-%
-\begin{itemize}[beginpenalty=10000]
-\item Si on utilise un environnement avec préambule explicite (c'est-à-dire |{NiceArray}| ou l'une de ses
-variantes), on ne doit pas mettre dans ce préambule de spécification de colonne pour les éventuelles première et
-dernière colonne : ce sera automatiquement (et nécessairement) une colonne |R| pour la première colonne et une
-colonne |L| pour la dernière.
-
-\item On peut se demander comment \pkg{nicematrix} détermine le nombre de rangées et de colonnes nécessaires à la
-composition de la «dernière rangée» et de la «dernière colonne».
-
-\begin{itemize}
-\item Dans le cas d'un environnement avec préambule, comme |{NiceTabular}| ou |{pNiceArray}|, le nombre de colonnes
-se déduit évidemment du préambule.
-
-\item Dans le cas où l'option |light-syntax| (cf. p. \pageref{light-syntax}) est utilisée, \pkg{nicematrix} profite
-du fait que cette option nécessite de toutes manières le chargement complet du contenu de l'environnement (d'où
-l'impossibilité de mettre du verbatim dans ce cas-là) avant composition du tableau. L'analyse du contenu de
-l'environnement donne le nombre de rangées (mais pas le nombre de colonnes).
-
-\item Dans les autres cas, \pkg{nicematrix} détermine le nombre de rangées et de colonnes à la première compilation
-et l'écrit dans le fichier |.aux| pour pouvoir l'utiliser à la compilation suivante.
-
-\textsl{Néanmoins, il est possible de donner le numéro de la dernière rangée et le numéro de la dernière colonne en
-arguments des options |last-row| et |last-col|, ce qui permettra d'accélérer le processus complet de
-compilation.} C'est ce que nous ferons dans la suite.
-\end{itemize}
-
-\end{itemize}
-
-
-
-\bigskip
-On peut contrôler l'apparence de ces rangées et colonnes avec les options |code-for-first-row|,
-|code-for-last-row|, |code-for-first-col| et |code-for-last-col|. Ces options sont des listes de tokens qui seront
-insérées au début de chaque case de la rangée ou de la colonne considérée.
-
-\begin{Verbatim}
-\NiceMatrixOptions{~emphase#code-for-first-row@ = \color{red},
- ~emphase#code-for-first-col@ = \color{blue},
- ~emphase#code-for-last-row@ = \color{green},
- ~emphase#code-for-last-col@ = \color{magenta}}
-$\begin{pNiceArray}{CC|CC}[first-row,last-row=6,first-col,last-col,nullify-dots]
- & C_1 & \Cdots & & C_4 & \\
-L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
-\hline
- & a_{31} & a_{32} & a_{33} & a_{34} & \\
-L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
- & C_1 & \Cdots & & C_4 &
-\end{pNiceArray}$
-\end{Verbatim}
-%
-\begin{scope}
-\NiceMatrixOptions{code-for-first-row = \color{red},
- code-for-first-col = \color{blue},
- code-for-last-row = \color{green},
- code-for-last-col = \color{magenta}}
-\begin{displaymath}
-\begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
- & C_1 & \multicolumn1C{\Cdots} & & C_4 & \\
-L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-\Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
-\hline
- & a_{31} & a_{32} & a_{33} & a_{34} & \\
-L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
- & C_1 & \multicolumn1C{\Cdots} & & C_4 &
-\end{pNiceArray}
-\end{displaymath}
-\end{scope}
-
-
-
-\emph{Remarques}
-\begin{itemize}[beginpenalty=10000]
-\item Comme on peut le voir dans l'exemple précédent, un filet horizontal (tracé avec |\hline|) ne s'étend pas
-dans les colonnes extérieures et un filet vertical (spécifié par un caractère «\verb+|+» dans le préambule du
-tableau) ne s'étend pas dans les rangées extérieures.\footnote{Ce dernier point n'est pas valable si on a chargé,
- en plus de \pkg{nicematrix}, l'extension \pkg{arydshln}. Les extensions \pkg{nicematrix} et \pkg{arydshln} ne
- sont pas parfaitement compatibles car \pkg{arydshln} redéfinit beaucoup de structures internes à \pkg{array}. Par
-ailleurs, si on veut vraiment un filet qui s'étende dans la première et la dernière rangée, on peut utiliser
-|!{\vline}| dans le préambule à la place de \verb+|+.}
-
-Si on veut définir de nouveaux spécificateurs de colonnes pour des filets (par exemple plus épais), on aura
-peut-être intérêt à utiliser la commande |\OnlyMainNiceMatrix| décrite p.~\pageref{OnlyMainNiceMatrix}.
-\item Une spécification de couleur présente dans |code-for-first-row| s'applique à une ligne pointillée tracée
-dans cette «première rangée» (sauf si une valeur a été donnée à |xdots/color|). Idem pour les autres.
-\item Sans surprise, une éventuelle option |columns-width| (décrite p.~\pageref{width}) ne s'applique pas à la
-«première colonne» ni à la «dernière colonne».
-\item Pour des raisons techniques, il n'est pas possible d'utiliser l'option de la commande |\\| après la
-«première rangée» ou avant la «dernière rangée» (le placement des délimiteurs serait erroné).
-\end{itemize}
-
-
-
-
-
-\section[Les lignes en pointillés pour séparer les rangées et les colonnes]{Les lignes en pointillés pour séparer les rangées\\ et les colonnes}
-
-
-Dans les environnements de \pkg{nicematrix}, il est possible d'utiliser la commande |\hdottedline| (fournie
-par \pkg{nicematrix}) qui est l'équivalent pour les pointillés des commandes |\hline| et |\hdashline|
-(cette dernière étant une commande de \pkg{arydshln}).
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
-\begin{pNiceMatrix}
-1 & 2 & 3 & 4 & 5 \\
-~emphase#\hdottedline@
-6 & 7 & 8 & 9 & 10 \\
-11 & 12 & 13 & 14 & 15
-\end{pNiceMatrix}
-\end{BVerbatim}
-$\begin{pNiceMatrix}
-1 & 2 & 3 & 4 & 5 \\
-\hdottedline
-6 & 7 & 8 & 9 & 10 \\
-11 & 12 & 13 & 14 & 15
-\end{pNiceMatrix}$
-
-
-\bigskip
-Dans les environnements avec un préambule explicite (comme |{NiceArray}|, |{pNiceArray}|, etc.), il est possible de
-dessiner un trait vertical en pointillés avec le spécificateur «|:|».
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
-\begin{pNiceArray}{CCCC~emphase#:@C}
-1 & 2 & 3 & 4 & 5 \\
-6 & 7 & 8 & 9 & 10 \\
-11 & 12 & 13 & 14 & 15
-\end{pNiceArray}
-\end{BVerbatim}
-$\begin{pNiceArray}{CCCC:C}
-1 & 2 & 3 & 4 & 5 \\
-6 & 7 & 8 & 9 & 10 \\
-11 & 12 & 13 & 14 & 15
-\end{pNiceArray}$
-
-
-\bigskip
-Ces lignes en pointillés ne s'étendent pas dans les rangées et colonnes extérieures.\par\nobreak
-
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
-$\begin{pNiceArray}{CCC:C}%
- [first-row,last-col,
- code-for-first-row = \color{blue}\scriptstyle,
- code-for-last-col = \color{blue}\scriptstyle ]
-C_1 & C_2 & C_3 & C_4 \\
-1 & 2 & 3 & 4 & L_1 \\
-5 & 6 & 7 & 8 & L_2 \\
-9 & 10 & 11 & 12 & L_3 \\
-\hdottedline
-13 & 14 & 15 & 16 & L_4
-\end{pNiceArray}$
-\end{BVerbatim}
-$\begin{pNiceArray}{CCC:C}%
- [first-row,last-col,
- code-for-first-row = \color{blue}\scriptstyle,
- code-for-last-col = \color{blue}\scriptstyle ]
-C_1 & C_2 & C_3 & C_4 \\
-1 & 2 & 3 & 4 & L_1 \\
-5 & 6 & 7 & 8 & L_2 \\
-9 & 10 & 11 & 12 & L_3 \\
-\hdottedline
-13 & 14 & 15 & 16 & L_4
-\end{pNiceArray}$
-
-\bigskip
-Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour indiquer dans le préambule un trait
-vertical en pointillés avec l'option |letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|.
-
-
-\bigskip
-\emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie \pkg{nicematrix}) est chargée, les traits
-verticaux et horizontaux que l'on insère rendent le tableau plus large ou plus long d'une quantité égale à la
-largeur du trait\footnote{En fait, cela est vrai pour |\hline| et «\verb+|+» mais pas pour |\cline|.}. Avec
-\pkg{nicematrix}, les lignes en pointillés tracées par |\hdottedline| et «|:|» ont le même effet.
-
-\section{La largeur des colonnes}
-\label{width}
+\subsection{Utilisation du type de colonne S de siunitx}
-Dans les environnements avec un préambule explicite (comme |{NiceArray}|, |{pNiceArray}|, etc.), il est possible de
-fixer la largeur d'une colonne avec les lettres classiques |w| et |W| de l'extension \pkg{array}. Dans les
-environnements de \pkg{nicematrix}, les cases des colonnes de ce type sont composées en mode mathématique (alors
-que dans |{array}| de \pkg{array}, elles sont composées en mode texte).
+Si l'extension \pkg{siunitx} est chargée (avant ou après \pkg{nicematrix}), il est possible d'utiliser les colonnes
+de type |S| de \pkg{siunitx} dans les environnements de \pkg{nicematrix}. L'implémentation n'utilise explicitement
+aucune macro privée de \pkg{siunitx}.
\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=10cm]
-$\begin{pNiceArray}{~emphase#Wc{1cm}@CC}
-1 & 12 & -123 \\
-12 & 0 & 0 \\
-4 & 1 & 2
+\begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
+$\begin{pNiceArray}{~emphase#S@CWc{1cm}C}[nullify-dots,first-row]
+{C_1} & \Cdots & & C_n \\
+2.3 & 0 & \Cdots & 0 \\
+12.4 & \Vdots & & \Vdots \\
+1.45 \\
+7.2 & 0 & \Cdots & 0
\end{pNiceArray}$
\end{BVerbatim}
-$\begin{pNiceArray}{Wc{1cm}CC}
-1 & 12 & -123 \\
-12 & 0 & 0 \\
-4 & 1 & 2
+$\begin{pNiceArray}{SCWc{1cm}C}[nullify-dots,first-row]
+{C_1} & \Cdots & & C_n \\
+2.3 & 0 & \Cdots & 0 \\
+12.4 & \Vdots & & \Vdots \\
+1.45 \\
+7.2 & 0 & \Cdots & 0
\end{pNiceArray}$
-
-\bigskip
-Dans les environnements de \pkg{nicematrix}, il est aussi possible de fixer la largeur \emph{minimale} de toutes
-les colonnes de la matrice directement avec l'option |columns-width|.
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=10cm]
-$\begin{pNiceMatrix}[~emphase#columns-width = 1cm@]
-1 & 12 & -123 \\
-12 & 0 & 0 \\
-4 & 1 & 2
-\end{pNiceMatrix}$
-\end{BVerbatim}
-$\begin{pNiceMatrix}[columns-width = 1cm]
-1 & 12 & -123 \\
-12 & 0 & 0 \\
-4 & 1 & 2
-\end{pNiceMatrix}$
-
-\medskip
-Noter que l'espace inséré entre deux colonnes (égal à 2 |\arraycolsep|) n'est pas supprimé (il est évidemment
-possible de le supprimer en mettant |\arraycolsep| à~$0$ avant).
-
-\bigskip
-Il est possible de donner la valeur spéciale |auto| à l'option |columns-width|: toutes les colonnes du tableau
-auront alors une largeur égale à la largeur de la case la plus large du tableau.\footnote{Le résultat est atteint
- dès la première compilation (mais Tikz écrivant des informations dans le fichier |.aux|, un message demandant une
- deuxième compilation apparaîtra).}\par\nobreak
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=10cm]
-$\begin{pNiceMatrix}[~emphase#columns-width = auto@]
-1 & 12 & -123 \\
-12 & 0 & 0 \\
-4 & 1 & 2
-\end{pNiceMatrix}$
-\end{BVerbatim}
-$\begin{pNiceMatrix}[columns-width = auto]
-1 & 12 & -123 \\
-12 & 0 & 0 \\
-4 & 1 & 2
-\end{pNiceMatrix}$
-
-\bigskip
-Sans surprise, il est possible de fixer la largeur minimale de toutes les colonnes de toutes les matrices dans une
-certaine portion de document avec la commande |\NiceMatrixOptions|.\par\nobreak
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
-~emphase#\NiceMatrixOptions{columns-width=10mm}@
-$\begin{pNiceMatrix}
-a & b \\ c & d
-\end{pNiceMatrix}
-=
-\begin{pNiceMatrix}
-1 & 1245 \\ 345 & 2
-\end{pNiceMatrix}$
-\end{BVerbatim}
-\begin{scope}
-\NiceMatrixOptions{columns-width=10mm}
-$\begin{pNiceMatrix}
-a & b \\
-c & d
-\end{pNiceMatrix}
-=
-\begin{pNiceMatrix}
-1 & 1245 \\
-345 & 2
-\end{pNiceMatrix}$
-\end{scope}
-
-
-\bigskip
-Mais il est aussi possible de fixer une zone dans laquelle toutes les matrices auront leurs colonnes de la même
-largeur, égale à la largeur de la case la plus large de toutes les matrices de la zone. Cette construction utilise
-l'environnement |{NiceMatrixBlock}| avec l'option |auto-columns-width|\footnote{Pour le moment, c'est le seul
- usage de l'environnement |{NiceMatrixBlock}| mais il pourrait y en avoir davantage dans le futur.}.
-L'environnement |{NiceMatrixBlock}| n'a pas de rapport direct avec la commande |\Block| présentée juste ci-dessous
-(cf.~p.~\pageref{Block}).
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
-~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@
-$\begin{pNiceMatrix}
-a & b \\ c & d
-\end{pNiceMatrix}
-=
-\begin{pNiceMatrix}
-1 & 1245 \\ 345 & 2
-\end{pNiceMatrix}$
-~emphase#\end{NiceMatrixBlock}@
-\end{BVerbatim}
-\begin{NiceMatrixBlock}[auto-columns-width]
-$\begin{pNiceMatrix}
- a & b \\ c & d
- \end{pNiceMatrix}
-=
- \begin{pNiceMatrix}
- 1 & 1245 \\ 345 & 2
-\end{pNiceMatrix}$
-\end{NiceMatrixBlock}
-
-\medskip
-\textbf{Plusieurs compilations peuvent être nécessaires pour obtenir le résultat désiré.}
-
-\section{Les matrices par blocs}
-
-\label{Block}
-
-Cette partie, qui introduit une commande |\Block|, n'a pas de rapport direct avec l'environnement
-|{NiceMatrixBlock}| présenté dans la section précédente.
-
-\smallskip
-Dans les environnements de \pkg{nicematrix}, on peut utiliser la commande |\Block| pour placer un élément au centre
-d'un rectangle de cases fusionnées.
-
-La commande |\Block| doit être utilisée dans la case supérieure gauche du bloc avec deux arguments. Le premier
-argument est la taille de ce bloc avec la syntaxe $i$-$j$ où $i$ est le nombre de rangées et $j$ le nombre de
-colonnes du bloc. Le deuxième argument, est, sans surprise, le contenu du bloc (en mode mathématique). Un nœud Tikz
-correspondant à l'ensemble des cases fusionnées est créé sous le nom «$i$-$j$-block» où \textsl{nom} est le
-nom donné au tableau. Si on a demandé la création des nœuds |medium|, alors un nœud de ce type est aussi créé pour
-ce bloc avec un nom suffixé par |-medium|.
-
-\medskip
-Dans les exemples qui suivent, on utilise la commande |\arrayrulecolor| de \pkg{colortbl}.
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
-\arrayrulecolor{blue}
-$\begin{bNiceArray}{CCC|C}[margin]
-~emphase#\Block{3-3}{A}@ & & & 0 \\
-& \hspace*{1cm} & & \Vdots \\
-& & & 0 \\
-\hline
-0 & \Cdots& 0 & 0
-\end{bNiceArray}$
-\arrayrulecolor{black}
-\end{BVerbatim}
-\begin{scope}
-\arrayrulecolor{blue}
-$\begin{bNiceArray}{CCC|C}[margin]
-\Block{3-3}{A} & & & 0 \\
-& \hspace*{1cm} & & \Vdots \\
-& & & 0 \\
-\hline
-0 & \Cdots& 0 & 0
-\end{bNiceArray}$
-\arrayrulecolor{black}
-\end{scope}
-
-\bigskip
-On peut souhaiter agrandir la taille du «$A$» placé dans le bloc de l'exemple précédent. Comme il est composé en
-mode mathématique, on ne peut pas directement utiliser une commande comme |\large|, |\Large| ou |\LARGE|. C'est
-pourquoi une option à mettre entre chevrons est proposée par |\Block| pour spécifier du code LaTeX qui sera inséré
-\emph{avant} le début du mode mathématique.
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
-\arrayrulecolor{blue}
-$\begin{bNiceArray}{CCC|C}[margin]
-\Block{3-3}~emphase#<\Large>@{A} & & & 0 \\
-& \hspace*{1cm} & & \Vdots \\
-& & & 0 \\
-\hline
-0 & \Cdots& 0 & 0
-\end{bNiceArray}$
-\arrayrulecolor{black}
-\end{BVerbatim}
-\begin{scope}
-\arrayrulecolor{blue}
-$\begin{bNiceArray}{CCC|C}[margin]
-\Block{3-3}<\Large>{A} & & & 0 \\
-& \hspace*{1cm} & & \Vdots \\
-& & & 0 \\
-\hline
-0 & \Cdots& 0 & 0
-\end{bNiceArray}$
-\arrayrulecolor{black}
-\end{scope}
-
-
-\medskip
-Pour des raisons techniques, il n'est pas possible d'écrire |\Block{|$i$|-|$j$|}{<}|
-(mais on peut écrire |\Block{|$i$|-|$j$|}<>{<}| avec le résultat attendu).
-
-
-\section{Les couleurs des rangées et des colonnes}
-
-L'extension \pkg{colortbl} permet de colorier des cellules, des rangées ou des colonnes d'un tableau. Néanmoins,
-l'affichage du \textsc{pdf} résultant n'est pas toujours parfait, en particulier quand on utilise également des
-filets. Dans certains lecteurs de \textsc{pdf}, des filets verticaux semblent disparaître. De fines lignes
-blanches peuvent également apparaître.
-
-\medskip
-La version 4.0 de \pkg{nicematrix} propose des outils similaires qui ne présentent pas ces inconvénients. Elle
-propose une option |code-before| pour du code qui sera exécuté \emph{avant} le tracé du tableau. Dans ce
-|code-before|, de nouvelles commandes sont disponibles : |\cellcolor|, |\rectanglecolor|, |\rowcolor|,
-|\columncolor|, |\rowcolors| et |\chessboardcolors|.
-
-\medskip
-\begin{itemize}
-\item La commande |\cellcolor| tient son nom de la commande |\cellcolor| de \pkg{colortbl}.
-
-Elle prend en arguments une couleur et une liste de cellules sous le format $i$-$j$ où $i$ est le numéro de ligne
-et $j$ le numéro de colonne.
-
-\medskip
-\begin{scope}
-\hfuzz=10cm
-\begin{BVerbatim}[boxwidth=10cm,baseline=c]
-\begin{NiceTabular}{|C|C|C|}[code-before = ~emphase#\cellcolor{red!15}{3-1,2-2,1-3}@]
-\hline
-a & b & c \\ \hline
-e & f & g \\ \hline
-h & i & j \\ \hline
-\end{NiceTabular}
-\end{BVerbatim}
-\begin{NiceTabular}{|C|C|C|}[code-before = \cellcolor{red!15}{3-1,2-2,1-3}]
-\hline
-a & b & c \\ \hline
-e & f & g \\ \hline
-h & i & j \\ \hline
-\end{NiceTabular}
-\end{scope}
-
-\bigskip
-\item La commande |\rectanglecolor| prend trois arguments. Le premier est la couleur, les deux suivants fournissent
-la case en haut à gauche et la case en bas à droite du rectangle.
-
-\medskip
-\begin{scope}
-\hfuzz=10cm
-\begin{BVerbatim}[boxwidth=10cm,baseline=c]
-\begin{NiceTabular}{|C|C|C|}[code-before = ~emphase#\rectanglecolor{red!15}{2-2}{3-3}@]
-\hline
-a & b & c \\ \hline
-e & f & g \\ \hline
-h & i & j \\ \hline
-\end{NiceTabular}
-\end{BVerbatim}
-\begin{NiceTabular}{|C|C|C|}[code-before = \rectanglecolor{red!15}{2-2}{3-3}]
-\hline
-a & b & c \\ \hline
-e & f & g \\ \hline
-h & i & j \\ \hline
-\end{NiceTabular}
-\end{scope}
-
-
-
-\bigskip
-\item La commande |\rowcolor| doit son nom à la commande |\rowcolor| de \pkg{colortbl}. Son premier argument est la
-couleur et le deuxième est une liste de numéros de rangées ou bien d'intervalles de rangées sous la forme
-$a$-$b$ (un intervalle de la forme $a$- représente toutes les rangées à partir de la rangée~$a$).
-
-\medskip
-
-\begin{scope}
-\hfuzz=10cm
-\begin{BVerbatim}[boxwidth=9cm,baseline=c]
-$\begin{NiceArray}{LLL}[hvlines, ~emphase#code-before = \rowcolor{red!15}{1,3-5,8-}@]
-a_1 & b_1 & c_1 \\
-a_2 & b_2 & c_2 \\
-a_3 & b_3 & c_3 \\
-a_4 & b_4 & c_4 \\
-a_5 & b_5 & c_5 \\
-a_6 & b_6 & c_6 \\
-a_7 & b_7 & c_7 \\
-a_8 & b_8 & c_8 \\
-a_9 & b_9 & c_9 \\
-a_{10} & b_{10} & c_{10} \\
-\end{NiceArray}$
-\end{BVerbatim}
-%
-$\begin{NiceArray}{LLL}%
-[baseline=4,hvlines, code-before = \rowcolor{red!15}{1,3-5,8-}]
-a_1 & b_1 & c_1 \\
-a_2 & b_2 & c_2 \\
-a_3 & b_3 & c_3 \\
-a_4 & b_4 & c_4 \\
-a_5 & b_5 & c_5 \\
-a_6 & b_6 & c_6 \\
-a_7 & b_7 & c_7 \\
-a_8 & b_8 & c_8 \\
-a_9 & b_9 & c_9 \\
-a_{10} & b_{10} & c_{10} \\
-\end{NiceArray}$
-\end{scope}
-
-
-\bigskip
-\item La commande |\columncolor| doit son nom à la commande |\columncolor| de \pkg{colortbl}. Sa syntaxe est
-similaire à celle de |\rowcolor|.
-
-\bigskip
-\item La commande |\rowcolors| (avec un \emph{s}) doit son nom à la commande |\rowcolors| de \pkg{xcolor}. Le
-\emph{s} rappelle qu'il y a deux couleurs. Elle colorie alternativement les rangées avec les deux couleurs à partir
-de la rangée dont le numéro est donné en premier argument.
-
\medskip
-
-
-\begin{scope}
-\hfuzz=10cm
-\begin{BVerbatim}[baseline=c,boxwidth=9cm]
-\begin{NiceTabular}{LR}%
-[~emphase#code-before = \rowcolor{red!15}{1} \rowcolors{3}{blue!10}{}@]
-\toprule
-Ville & habitants \\
-\midrule
-Pau & 80000 \\
-Paris & 2000000 \\
-Toulouse & 700000 \\
-Reims & 40000 \\
-\bottomrule
-\end{NiceTabular}
-\end{BVerbatim}
-\begin{NiceTabular}{LR}[code-before =\rowcolor{red!15}{1} \rowcolors{3}{blue!10}{}]
-\toprule
-Ville & habitants \\
-\midrule
-Pau & 80000 \\
-Paris & 2000000 \\
-Toulouse & 700000 \\
-Reims & 40000 \\
-\bottomrule
-\end{NiceTabular}
-\end{scope}
-
-\bigskip
-\item La commande |\chessboardcolors| prend en arguments deux couleurs et colorie les cellules en quinconces avec
-les deux couleurs.
-
-\medskip
-\begin{scope}
-\hfuzz=10cm
-\begin{BVerbatim}[baseline=c,boxwidth=9cm]
-$\begin{pNiceMatrix}[R,margin, ~emphase#code-before=\chessboardcolors{red!15}{blue!15}@]
-1 & -1 & 1 \\
--1 & 1 & -1 \\
-1 & -1 & 1
-\end{pNiceMatrix}$
-\end{BVerbatim}
-$\begin{pNiceMatrix}%
-[baseline=1, R, margin, code-before = \chessboardcolors{red!15}{blue!15}]
-1 & -1 & 1 \\
--1 & 1 & -1 \\
-1 & -1 & 1
-\end{pNiceMatrix}$
-\end{scope}
-
-\end{itemize}
+En revanche, les colonnes |d| de l'extension \pkg{dcolumn} ne sont pas prises en charge par \pkg{nicematrix}.
-\section{Fonctionnalités avancées}
+\subsection{Option d'alignement dans \{NiceMatrix\}}
-\subsection{Option d'alignement dans NiceMatrix}
+\label{key-R}
Les environnements sans préambule (|{NiceMatrix}|, |{pNiceMatrix}|, |{bNiceMatrix}|, etc.) proposent les options
-|l| et |r| (possédant |L| et |R| comme alias) qui imposent des colonnes alignées à gauche ou à
-droite.\footnote{Cela reprend une partie des fonctionnalités proposées par les environnements |{pmatrix*}|,
- |{bmatrix*}|, etc. de \pkg{mathtools}.}
+|l| et |r| (possédant |L| et |R| comme alias) qui imposent des colonnes alignées à gauche ou à droite.
\medskip
\begin{BVerbatim}[baseline=c,boxwidth=10cm]
@@ -1675,7 +1736,10 @@ $\begin{bNiceMatrix}[R]
\sin x & \cos x
\end{bNiceMatrix}$
-
+\medskip
+Il existe aussi l'option |S| qui impose que toutes les colonnes soient des colonnes |S| de \pkg{siunitx} (si cette
+extension est chargée).\footnote{Cela reprend une partie des fonctionnalités proposées par les environnements |{pmatrix*}|,
+ |{bmatrix*}|, etc. de \pkg{mathtools}.}
\subsection{La commande \textbackslash rotate}
@@ -1790,8 +1854,9 @@ numéro de la rangée courante et le numéro de la colonne courante\footnote{On
Bien entendu, l'utilisateur ne doit pas modifier les valeurs de ces compteurs qui sont utilisés en interne par
\pkg{nicematrix}.
-Dans le |code-after| (cf. p. \pageref{code-after}), |iRow| représente le nombre total de rangées (hors éventuelles
-rangées extérieures) et |jCol| le nombre total de colonnes (hors potentielles colonnes extérieures).
+Dans le |code-before| (cf. p. \pageref{code-before}) et dans le |code-after| (cf. p. \pageref{code-after}), |iRow|
+représente le nombre total de rangées (hors éventuelles rangées extérieures) et |jCol| le nombre total de colonnes
+(hors potentielles colonnes extérieures).
\medskip
\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
@@ -1818,8 +1883,8 @@ $\begin{pNiceMatrix}[first-row,
\medskip
Si des compteurs LaTeX nommés |iRow| ou |jCol| sont créés dans le document par d'autres extensions que
-\pkg{nicematrix} (ou tout simplement par l'utilisateur), ces compteurs sont masqués dans les environnements de
-\pkg{nicematrix}.
+\pkg{nicematrix} (ou tout simplement par l'utilisateur final), ces compteurs sont masqués dans les environnements
+de \pkg{nicematrix}.
\bigskip
@@ -1838,166 +1903,460 @@ $C = ~emphase#\pAutoNiceMatrix@{3-3}{C_{\arabic{iRow},\arabic{jCol}}}$
\end{Verbatim}
-$C = \pAutoNiceMatrix{3-3}{C_{\arabic{iRow},\arabic{jCol}}}$
+\[C = \pAutoNiceMatrix{3-3}{C_{\arabic{iRow},\arabic{jCol}}}\]
-\subsection{Les options hlines, vlines et hvlines}
-\label{hvlines}
-Dans les environnements de \pkg{nicematrix}, on peut bien entendu ajouter des filets horizontaux entre les rangées
-avec la commande~|\hline| et des filets verticaux avec le spécificateur ``\verb+|+'' dans le préambule de
-l'environnement. Par souci de commodité, l'extension \pkg{nicematrix} fournit aussi l'option |hlines| (resp.
-|vlines|) qui impose directement que tous les filets horizontaux (resp. verticaux) soient tracés (à l'exception,
-très naturelle, des filets extérieurs aux rangées et colonnes extérieures). L'option |hvlines| est la conjonction
-des options |hlines| et |vlines|.
+\subsection{L'option light-syntax}
+
+\label{light-syntax}
+
+L'option |light-syntax| (inspirée de l'extension \pkg{spalign}) permet d'alléger la saisie des matrices, ainsi que
+leur lisibilité dans le source TeX. Lorsque cette option est activée, on doit utiliser le point-virgule comme
+marqueur de fin de rangée et séparer les colonnes par des espaces ou des tabulations. On remarquera toutefois que,
+comme souvent dans le monde TeX, les espaces après les séquences de contrôle ne sont pas comptées et que les
+éléments entre accolades sont considérés comme un tout.
+
\medskip
-Dans l'exemple suivant, on utilise la commande |\arrayrulecolor| de \pkg{colortbl}.
+\begin{scope}
+\begin{BVerbatim}[baseline=c,boxwidth=10cm]
+$\begin{bNiceMatrix}[~emphase#light-syntax@,first-row,first-col]
+{} a b ;
+a 2\cos a {\cos a + \cos b} ;
+b \cos a+\cos b { 2 \cos b }
+\end{bNiceMatrix}$
+\end{BVerbatim}
+\end{scope}
+%
+$\begin{bNiceMatrix}[light-syntax,first-row,first-col]
+{} a b ;
+a 2\cos a {\cos a + \cos b} ;
+b \cos a+\cos b { 2 \cos b }
+\end{bNiceMatrix}$
+
+\medskip
+On peut changer le caractère utilisé pour indiquer les fins de rangées avec l'option |end-of-row|. Comme dit
+précédemment, la valeur initiale de ce paramètre est un point-virgule.
+
+\medskip
+Lorsque l'option |light-syntax| est utilisée, il n'est pas possible de mettre d'éléments en verbatim (avec par
+exemple la commande |\verb|) dans les cases du tableau.\footnote{La raison en est que lorsque l'option
+ |light-syntax| est utilisée, le contenu complet de l'environnement est chargé comme un argument de commande TeX.
+ L'environnement ne se comporte plus comme un «vrai» environnement de LaTeX qui se contente d'insérer des
+ commandes avant et après.}
+\subsection{L'environnement \{NiceArrayWithDelims\}}
+En fait, l'environnement |{pNiceArray}| et ses variantes sont fondés sur un environnement plus général, appelé
+|{NiceArrayWithDelims}|. Les deux premiers arguments obligatoires de cet environnement sont les délimiteurs gauche
+et droit qui seront utilisés dans la construction de la matrice. Il est possible d'utiliser |{NiceArrayWithDelims}|
+si on a besoin de délimiteurs atypiques ou asymétriques.
\medskip
\begin{BVerbatim}[baseline=c,boxwidth=11cm]
-\arrayrulecolor{blue}
-$\begin{NiceArray}{CCCC}[~emphase#hvlines@,first-row,first-col]
- & e & a & b & c \\
-e & e & a & b & c \\
-a & a & e & c & b \\
-b & b & c & e & a \\
-c & c & b & a & e
-\end{NiceArray}$
-\arrayrulecolor{black}
+$\begin{~emphase#NiceArrayWithDelims@}
+ {\downarrow}{\uparrow}{CCC}[margin]
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9
+\end{~emphase#NiceArrayWithDelims@}$
\end{BVerbatim}
%
-\arrayrulecolor{blue}
-$\begin{NiceArray}{CCCC}[hvlines,first-row,first-col]
- & e & a & b & c \\
-e & e & a & b & c \\
-a & a & e & c & b \\
-b & b & c & e & a \\
-c & c & b & a & e
-\end{NiceArray}$
-\arrayrulecolor{black}
+$\begin{NiceArrayWithDelims}
+ {\downarrow}{\uparrow}{CCC}[margin]
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9
+\end{NiceArrayWithDelims}$
+
+
+\section{Utilisation de Tikz avec nicematrix}
+
+\label{name}
+
+\subsection{Les nœuds correspondant aux contenus des cases}
+
+L'extension \pkg{nicematrix} crée un nœud PGF-Tikz pour chaque case (non vide) du tableau considéré. Ces nœuds sont
+utilisés, entre autres, pour tracer les lignes en pointillés entre les cases du tableau.
+
+\smallskip
+Tous les nœuds du document doivent avoir des noms deux à deux distincts et le nom de ces nœuds doit donc faire
+intervenir le numéro de l'environnement courant. Les environnements créés par \pkg{nicematrix} sont en effet
+numérotés par un compteur global interne.
+
+\smallskip
+Si l'environnement concerné a le numéro $n$, alors le nœud de la rangée~$i$ et de la colonne~$j$ a pour nom
+|nm-|$n$|-|$i$|-|$j$.
+
+\smallskip
+La commande |\NiceMatrixLastEnv| donne le numéro du dernier de ces environnements (pour LaTeX, il s'agit d'une
+commande — complètement développable — et non d'un compteur).
+
+\smallskip
+Il est néanmoins recommandé de passer plutôt par la clé |name|. Celle-ci permet de donner un nom à l'environnement.
+Une fois l'environnement nommé, les nœuds sont accessibles à travers les noms «\textsl{nom}-$i$-$j$» où
+\textsl{nom} est le nom donné au tableau et $i$ et $j$ les numéros de rangée et de colonne de la case considérée.
+On peut les utiliser avec \textsc{pgf} mais l'utilisateur final préférera sans doute utiliser Tikz (qui est une
+sur-couche de \textsc{pgf}). Il faut néanmoins se souvenir que \pkg{nicematrix} ne charge pas Tikz par défault.
\bigskip
-Il y a néanmoins une différence entre l'utilisation de l'option |vlines| et du spécificateur «\verb+|+» dans le
-préambule de l'environnement : les filets tracés par |vlines| traversent les double-filets horizontaux tracés par
-|\hline\hline|.
+\begin{BVerbatim}[baseline=c,boxwidth=11cm]
+$\begin{pNiceMatrix}[name=~emphase#ma-matrice@]
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9
+\end{pNiceMatrix}$
+\tikz[remember picture,overlay]
+ \draw ~emphase#(ma-matrice-2-2)@ circle (2mm) ;
+\end{BVerbatim}
+$\begin{pNiceMatrix}[name=ma-matrice]
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9
+\end{pNiceMatrix}$
+\tikz[remember picture,overlay]
+ \draw (ma-matrice-2-2) circle (2mm) ;
\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=11.5cm]
-$\begin{NiceArray}{CCCC}[vlines] \hline
-a & b & c & d \\ \hline \hline
-1 & 2 & 3 & 4 \\
-1 & 2 & 3 & 4 \\ \hline
-\end{NiceArray}$
-\end{BVerbatim}
-%
-$\begin{NiceArray}{CCCC}[vlines]
-\hline
-a & b & c & d \\
-\hline \hline
-1 & 2 & 3 & 4 \\
-1 & 2 & 3 & 4 \\
-\hline
-\end{NiceArray}$
+Ne pas oublier les options |remember picture| et |overlay|.
+
\bigskip
-Dans le cas d'un environnement avec délimiteurs (par exemple |{pNiceArray}| ou |{pNiceMatrix}|), l'option |vlines| ne
-trace pas de filets verticaux au niveau des deux délimiteurs (bien entendu).
+Dans le |code-after|, et si Tikz est chargé, les choses sont plus simples. On peut (et on doit) désigner les nœuds
+sous la forme $i$-$j$ : il n'y a pas besoin de préciser l'environnement qui est évidemment l'environnement courant.
+
\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
-\setlength{\arrayrulewidth}{0.2pt}
-$\begin{pNiceMatrix}[vlines]
-1 & 2 & 3 & 4 & 5 & 6 \\
-1 & 2 & 3 & 4 & 5 & 6 \\
-1 & 2 & 3 & 4 & 5 & 6 \\
+\begin{BVerbatim}[baseline=c,boxwidth=11cm]
+$\begin{pNiceMatrix}
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9
+\CodeAfter
+\tikz \draw ~emphase#(2-2)@ circle (2mm) ;
\end{pNiceMatrix}$
\end{BVerbatim}
-%
-\begin{scope}
-\setlength{\arrayrulewidth}{0.2pt}
-$\begin{pNiceMatrix}[vlines]
-1 & 2 & 3 & 4 & 5 & 6 \\
-1 & 2 & 3 & 4 & 5 & 6 \\
-1 & 2 & 3 & 4 & 5 & 6 \\
+$\begin{pNiceMatrix}
+1 & 2 & 3 \\
+4 & 5 & 6 \\
+7 & 8 & 9
+\CodeAfter
+\tikz \draw (2-2) circle (2mm) ;
\end{pNiceMatrix}$
-\end{scope}
+\bigskip
+Dans l'exemple suivant, nous avons surligné tous nœuds de la matrice (on explique plus loin la technique utilisée :
+cf. p. \pageref{highlight}).
-\subsection{L'option light-syntax}
+\[\begin{pNiceMatrix}
+a & a + b & a + b + c \\
+a & a & a + b \\
+a & a & a
+\CodeAfter
+\begin{tikzpicture}[
+ every node/.style =
+ {
+ blend mode = multiply,
+ inner sep = 0 pt ,
+ fill = red!15
+ }
+ ]
+\node [fit = (1-1)] {} ;
+\node [fit = (1-3)] {} ;
+\node [fit = (2-2)] {} ;
+\node [fit = (3-1)] {} ;
+\node [fit = (3-3)] {} ;
+\node [fit = (1-2)] {} ;
+\node [fit = (2-1)] {} ;
+\node [fit = (2-3)] {} ;
+\node [fit = (3-2)] {} ;
+\end{tikzpicture}
+\end{pNiceMatrix}\]
-\label{light-syntax}
-L'option |light-syntax|\footnote{Cette option est inspirée de l'extension \pkg{spalign} de Joseph Rabinoff.} permet
-d'alléger la saisie des matrices, ainsi que leur lisibilité dans le source TeX. Lorsque cette option est activée,
-on doit utiliser le point-virgule comme marqueur de fin de rangée et séparer les colonnes par des espaces ou des
-tabulations. On remarquera toutefois que, comme souvent dans le monde TeX, les espaces après les séquences de
-contrôle ne sont pas comptées et que les éléments entre accolades sont considérés comme un tout.
+\subsection{Les «nœuds moyens» et les «nœuds larges»}
+En fait, l'extension \pkg{nicematrix} peut créer deux séries de nœuds supplémentaires (\emph{extra nodes} en
+anglais) : les «nœuds moyens» (\emph{medium nodes} en anglais) et les «nœuds larges» (\emph{large nodes} en
+anglais). Les premiers sont créés avec l'option |create-medium-nodes| et les seconds avec l'option
+|create-large-nodes|.\footnote{Il existe aussi l'option |create-extra-nodes| qui est un alias pour la conjonction
+de |create-medium-nodes| et |create-large-nodes|.}
+
\medskip
-\begin{scope}
-\begin{BVerbatim}[baseline=c,boxwidth=10cm]
-$\begin{bNiceMatrix}[~emphase#light-syntax@,first-row,first-col]
-{} a b ;
-a 2\cos a {\cos a + \cos b} ;
-b \cos a+\cos b { 2 \cos b }
-\end{bNiceMatrix}$
-\end{BVerbatim}
-\end{scope}
-%
-$\begin{bNiceMatrix}[light-syntax,first-row,first-col]
-{} a b ;
-a 2\cos a {\cos a + \cos b} ;
-b \cos a+\cos b { 2 \cos b }
-\end{bNiceMatrix}$
+Ces nœuds ne sont pas utilisés par défault par \pkg{nicematrix}.
\medskip
-On peut changer le caractère utilisé pour indiquer les fins de rangées avec l'option |end-of-row|. Comme dit
-précédemment, la valeur initiale de ce paramètre est un point-virgule.
+Les noms des «nœuds moyens» s'obtiennent en ajoutant le suffixe «|-medium|» au nom des nœuds normaux. Dans
+l'exemple suivant, on a surligné tous les «nœuds moyens». Nous considérons que cet exemple se suffit à lui-même
+comme définition de ces nœuds.
+\[\begin{pNiceMatrix}[
+ create-medium-nodes,
+ code-after = {\begin{tikzpicture}
+ [every node/.style = {fill = red!15,
+ blend mode = multiply,
+ inner sep = 0 pt},
+ name suffix = -medium]
+ \node [fit = (1-1)] {} ;
+ \node [fit = (1-2)] {} ;
+ \node [fit = (1-3)] {} ;
+ \node [fit = (2-1)] {} ;
+ \node [fit = (2-2)] {} ;
+ \node [fit = (2-3)] {} ;
+ \node [fit = (3-1)] {} ;
+ \node [fit = (3-2)] {} ;
+ \node [fit = (3-3)] {} ;
+ \end{tikzpicture}}]
+a & a + b & a + b + c \\
+a & a & a + b \\
+a & a & a
+\end{pNiceMatrix}\]
+
\medskip
-Lorsque l'option |light-syntax| est utilisée, il n'est pas possible de mettre d'éléments en verbatim (avec par
-exemple la commande |\verb|) dans les cases du tableau.\footnote{La raison en est que lorsque l'option
- |light-syntax| est utilisée, le contenu complet de l'environnement est chargé comme un argument de commande TeX.
- L'environnement ne se comporte plus comme un «vrai» environnement de LaTeX qui se contente d'insérer des
- commandes avant et après.}
+Les noms des «nœuds larges» s'obtiennent en ajoutant le suffixe «|-large|» au nom des nœuds normaux. Dans l'exemple
+suivant, on a surligné tous les «nœuds larges». Nous considérons que cet exemple se suffit à lui-même comme
+définition de ces nœuds.\footnote{Il n'y a pas de «nœuds larges» créés dans les rangées et colonnes extérieures
+ (pour ces rangées et colonnes, voir p.~\pageref{exterior}).}
-\subsection{Utilisation du type de colonne S de siunitx}
+\[\begin{pNiceMatrix}[
+ create-large-nodes,
+ code-after = {\begin{tikzpicture}
+ [every node/.style = {blend mode = multiply,
+ inner sep = 0 pt},
+ name suffix = -large]
+ \node [fit = (1-1),fill = red!15] {} ;
+ \node [fit = (1-3),fill = red!15] {} ;
+ \node [fit = (2-2),fill = red!15] {} ;
+ \node [fit = (3-1),fill = red!15] {} ;
+ \node [fit = (3-3),fill = red!15] {} ;
+ \node [fit = (1-2),fill = blue!15] {} ;
+ \node [fit = (2-1),fill = blue!15] {} ;
+ \node [fit = (2-3),fill = blue!15] {} ;
+ \node [fit = (3-2),fill = blue!15] {} ;
+ \end{tikzpicture}}]
+a & a + b & a + b + c \\
+a & a & a + b \\
+a & a & a
+\end{pNiceMatrix}\]
-Si l'extension \pkg{siunitx} est chargée (avant ou après \pkg{nicematrix}), il est possible d'utiliser les colonnes
-de type |S| de \pkg{siunitx} dans les environnements de \pkg{nicematrix}. L'implémentation n'utilise explicitement
-aucune macro privée de \pkg{siunitx}.
\medskip
-\begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
-$\begin{pNiceArray}{~emphase#S@CWc{1cm}C}[nullify-dots,first-row]
-{C_1} & \Cdots & & C_n \\
-2.3 & 0 & \Cdots & 0 \\
-12.4 & \Vdots & & \Vdots \\
-1.45 \\
-7.2 & 0 & \Cdots & 0
-\end{pNiceArray}$
-\end{BVerbatim}
-$\begin{pNiceArray}{SCWc{1cm}C}[nullify-dots,first-row]
-{C_1} & \Cdots & & C_n \\
-2.3 & 0 & \Cdots & 0 \\
-12.4 & \Vdots & & \Vdots \\
-1.45 \\
-7.2 & 0 & \Cdots & 0
-\end{pNiceArray}$
+Les «nœuds larges» de la première colonne et de la dernière colonne peuvent apparaître trop petits pour certains
+usages. C'est pourquoi il est possible d'utiliser les options |left-margin| et |right-margin| pour ajouter de
+l'espace des deux côtés du tableau et aussi de l'espace dans les «nœuds larges» de la première colonne et de la
+dernière colonne. Dans l'exemple suivant, nous avons utilisé les options |left-margin| et
+|right-margin|.\footnote{Les options |left-margin| et |right-margin| prennent des dimensions comme valeurs mais, si
+ aucune valeur n'est donnée, c'est la valeur par défaut qui est utilisée et elle est égale à |\arraycolsep| (par
+ défaut, 5~pt). Il existe aussi une option |margin| pour fixer à la fois |left-margin| et |right-margin|.}
+\[\begin{pNiceMatrix}[
+ create-large-nodes,left-margin,right-margin,
+ code-after = {\begin{tikzpicture}
+ [every node/.style = {blend mode = multiply,
+ inner sep = 0 pt},
+ name suffix = -large]
+ \node [fit = (1-1),fill = red!15] {} ;
+ \node [fit = (1-3),fill = red!15] {} ;
+ \node [fit = (2-2),fill = red!15] {} ;
+ \node [fit = (3-1),fill = red!15] {} ;
+ \node [fit = (3-3),fill = red!15] {} ;
+ \node [fit = (1-2),fill = blue!15] {} ;
+ \node [fit = (2-1),fill = blue!15] {} ;
+ \node [fit = (2-3),fill = blue!15] {} ;
+ \node [fit = (3-2),fill = blue!15] {} ;
+ \end{tikzpicture}}]
+a & a + b & a + b + c \\
+a & a & a + b \\
+a & a & a
+\end{pNiceMatrix}\]
\medskip
-En revanche, les colonnes |d| de l'extension \pkg{dcolumn} ne sont pas prises en charge par \pkg{nicematrix}.
+Il est aussi possible d'ajouter de l'espace sur les côtés du tableau avec les options |extra-left-margin| et
+|extra-right-margin|. Ces marges ne sont pas incorporées dans les «nœuds larges». Dans l'exemple suivant, nous
+avons utilisé |extra-left-margin| et |extra-right-margin| avec la valeur $3$~pt.
+\[\begin{pNiceMatrix}[
+ create-large-nodes,left-margin,right-margin,extra-right-margin=3pt,extra-left-margin=3pt,
+ code-after = {\begin{tikzpicture}
+ [every node/.style = {blend mode = multiply,
+ inner sep = 0 pt},
+ name suffix = -large]
+ \node [fit = (1-1),fill = red!15] {} ;
+ \node [fit = (1-3),fill = red!15] {} ;
+ \node [fit = (2-2),fill = red!15] {} ;
+ \node [fit = (3-1),fill = red!15] {} ;
+ \node [fit = (3-3),fill = red!15] {} ;
+ \node [fit = (1-2),fill = blue!15] {} ;
+ \node [fit = (2-1),fill = blue!15] {} ;
+ \node [fit = (2-3),fill = blue!15] {} ;
+ \node [fit = (3-2),fill = blue!15] {} ;
+ \end{tikzpicture}}]
+a & a + b & a + b + c \\
+a & a & a + b \\
+a & a & a
+\end{pNiceMatrix}\]
+
+
+\bigskip
+\textbf{Attention} : Ces nœuds sont reconstruits à partir des contenus des cases et ne correspondent donc pas
+nécessairement aux cases délimitées par des filets.
+
+\bigskip
+\begin{minipage}[c]{7.5cm}
+Voici un tableau qui a été composé de la manière suivante :
+
+\medskip
+\begin{BVerbatim}
+\large
+\begin{NiceTabular}{wl{2cm}LL}[hvlines]
+fraise & amande & abricot \\
+prune & pêche & poire \\[1ex]
+noix & noisette & brugnon
+\end{NiceTabular}
+\end{BVerbatim}
+\end{minipage}
+\hspace{1cm}
+\begin{scope}
+\large
+\begin{NiceTabular}[c]{wl{2cm}LL}[hvlines]
+fraise & amande & abricot \\
+prune & pêche & poire \\[1ex]
+noix & noisette & brugnon
+\end{NiceTabular}
+\end{scope}
+
+\vspace{1cm}
+\begin{minipage}[c]{7cm}
+Ci-contre, on a colorié toutes les cases de ce tableau avec |\chessboardcolors|.
+\end{minipage}
+\hspace{1.5cm}
+\begin{scope}
+\large
+\begin{NiceTabular}[c]{wl{2cm}LL}[hvlines,code-before = \chessboardcolors{red!15}{blue!15}]
+fraise & amande & abricot \\
+prune & pêche & poire \\[1ex]
+noix & noisette & brugnon
+\end{NiceTabular}
+\end{scope}
+
+
+\vspace{1cm}
+\begin{minipage}[c]{7cm}
+Voici maintenant tous les «nœuds larges» de ce tableau (sans utilisation de |margin| ni de |extra-margin|).
+\end{minipage}
+\hspace{1.5cm}
+\begin{scope}
+\large
+\begin{NiceTabular}[c]{wl{2cm}LL}[hvlines,
+ create-large-nodes,
+ code-after = {\begin{tikzpicture}
+ [every node/.style = {blend mode = multiply,
+ inner sep = 0 pt},
+ name suffix = -large]
+ \node [fit = (1-1),fill = red!15] {} ;
+ \node [fit = (1-3),fill = red!15] {} ;
+ \node [fit = (2-2),fill = red!15] {} ;
+ \node [fit = (3-1),fill = red!15] {} ;
+ \node [fit = (3-3),fill = red!15] {} ;
+ \node [fit = (1-2),fill = blue!15] {} ;
+ \node [fit = (2-1),fill = blue!15] {} ;
+ \node [fit = (2-3),fill = blue!15] {} ;
+ \node [fit = (3-2),fill = blue!15] {} ;
+ \end{tikzpicture}}]
+fraise & amande & abricot \\
+prune & pêche & poire \\[1ex]
+noix & noisette & brugnon
+\end{NiceTabular}
+\end{scope}
+
+
+
+
+
+
+\subsection{Les nœuds «row» et «col»}
+
+L'extension \pkg{nicematrix} crée un nœud PGF-Tikz indiquant la position potentielle de chaque filet horizontal
+(avec les noms |row-|$i$) et de chaque filet vertical (avec les noms |col-|$j$), comme décrit sur la figure
+ci-dessous. Ces nœuds sont accessibles dans le |code-before| et dans le |code-after|.
+\begin{center}
+\begin{NiceTabular}{CCC}[hvlines,rules/width=1pt,rules/color=gray]
+rose & tulipe & lys \\
+arum & iris & violette \\
+muguet & dahlia & souci
+\CodeAfter
+\tiny
+\begin{tikzpicture}
+\foreach \i in {1,2,3,4}
+ {
+ \fill [red] (row-\i) circle (0.5mm) ;
+ \node [red,anchor=east] at (row-\i) {row-\i} ;
+ }
+\foreach \j in {1,2,3,4}
+ {
+ \fill [blue] (col-\j) circle (0.5mm) ;
+ \node [blue,anchor=north] at (col-\j) {col-\j} ;
+ }
+\end{tikzpicture}
+\end{NiceTabular}
+\end{center}
+
+
+\bigskip
+Si on utilise Tikz (on rappelle que \pkg{nicematrix} ne charge pas Tikz par défaut), on peut donc accéder (dans le
+|code-before| et le |code-after|) à l'intersection du filet horizontal~$i$ et du filet vertical~$j$ avec la syntaxe
+|(row-|$i$\verb+-|col-+$j$|)|.
+
+
+\medskip
+\begin{Verbatim}
+\[\begin{NiceMatrix}[
+ code-before =
+ {
+~emphase# \tikz \draw [fill = red!15] @
+~emphase# (row-7-|col-4) -- (row-8-|col-4) -- (row-8-|col-5) -- @
+~emphase# (row-9-|col-5) -- (row-9-|col-6) |- cycle ; @
+ }
+]
+1 \\
+1 & 1 \\
+1 & 2 & 1 \\
+1 & 3 & 3 & 1 \\
+1 & 4 & 6 & 4 & 1 \\
+1 & 5 & 10 & 10 & 5 & 1 \\
+1 & 6 & 15 & 20 & 15 & 6 & 1 \\
+1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \\
+1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1
+\end{NiceMatrix}\]
+\end{Verbatim}
+%
+\[\begin{NiceMatrix}[
+ code-before =
+ {
+ \tikz \draw [fill = red!15]
+ (row-7-|col-4) -- (row-8-|col-4) -- (row-8-|col-5) --
+ (row-9-|col-5) -- (row-9-|col-6) |- cycle ;
+ }
+]
+1 \\
+1 & 1 \\
+1 & 2 & 1 \\
+1 & 3 & 3 & 1 \\
+1 & 4 & 6 & 4 & 1 \\
+1 & 5 & 10 & 10 & 5 & 1 \\
+1 & 6 & 15 & 20 & 15 & 6 & 1 \\
+1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \\
+1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1
+\end{NiceMatrix}\]
+
+
\section{Remarques techniques}
Première remarque : l'extension \pkg{nicematrix} doit être chargée après l'extension \pkg{underscore}. Si ce n'est
@@ -2040,26 +2399,13 @@ C_1 & C_2 & C_3 & C_4
\end{scope}
\medskip
-Le spécificateur |?| ainsi créé est aussi utilisable dans les environnements |{array}| (de \pkg{array}) et, dans ce
-cas, |\OnlyMainNiceMatrix| est sans effet.
-
+Le spécificateur |?| ainsi créé est aussi utilisable dans les environnements |{tabular}| et |{array}| (de
+\pkg{array}) et, dans ce cas, |\OnlyMainNiceMatrix| est sans effet.
-\subsection{Le nom des nœuds PGF créés par nicematrix}
-Les nœuds PGF-Tikz créés par \pkg{nicematrix} peuvent être utilisés hors des environnements de \pkg{nicematrix}
-après avoir nommé l'environnement concerné avec l'option |name| (cf. p.~\pageref{name}). Il s'agit là de la méthode
-conseillée mais on décrit néanmoins maintenant le nom Tikz interne de ces nœuds.
-
-Les environnements créés par \pkg{nicematrix} sont numérotés par un compteur global interne. La commande
-|\NiceMatrixLastEnv| donne le numéro du dernier de ces environnements (pour LaTeX, il s'agit d'une commande —
-complètement développable — et non d'un compteur).
-
-Si l'environnement concerné a le numéro $n$, alors le nœud de la rangée~$i$ et de la colonne~$j$ a pour nom
-|nm-|$n$|-|$i$|-|$j$. Les noms des nœuds |medium| et |large| correspondants s'obtiennent en suffixant par |-medium|
-et |-large|.
\subsection{Lignes diagonales}
@@ -2185,91 +2531,14 @@ Avec cette option, des espaces extérieurs de longueur |\arraycolsep| seront ins
-\subsection{Un problème technique avec l'argument de \textbackslash\textbackslash}
-
-Pour des raisons techniques, si vous utilisez l'argument optionnel de la commande |\\|, l'espace vertical sera
-aussi ajouté au nœud («normal») correspondant à la case précédente.
+\subsection{Incompatibilités}
+L'extension \pkg{nicematrix} n'est pas compatible with \pkg{threeparttable}.
\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=11cm]
- \begin{pNiceMatrix}
- a & \frac AB \\~emphase#[2mm]@
- b & c
- \end{pNiceMatrix}
-\end{BVerbatim}
-$\begin{pNiceMatrix}[
- code-after = {\tikz \node [inner sep = 0pt,
- fill = red!15,
- blend mode = multiply,
- fit = (1-2) ] {} ; } ]
-a & \frac AB \\[2mm]
-b & c
-\end{pNiceMatrix}$
-
-\bigskip
-Il y a deux solutions pour résoudre ce problème. La première solution est d'utiliser une commande TeX pour insérer
-l'espace entre les deux rangées.
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=11cm]
- \begin{pNiceMatrix}
- a & \frac AB \\
- ~emphase#\noalign{\kern2mm}@
- b & c
- \end{pNiceMatrix}
-\end{BVerbatim}
-$\begin{pNiceMatrix}[
- code-after = {\tikz \node [inner sep = 0pt,
- fill = red!15,
- blend mode = multiply,
- fit = (1-2) ] {} ; } ]
-a & \frac AB \\
-\noalign{\kern2mm}
-b & c
-\end{pNiceMatrix}$
-
-
-\bigskip
-L'autre solution est d'utiliser la commande |\multicolumn| dans la case précédente :
-
-\medskip
-\begin{BVerbatim}[baseline=c,boxwidth=11cm]
- \begin{pNiceMatrix}
- a & ~emphase#\multicolumn1C{\frac AB}@ \\[2mm]
- b & c
- \end{pNiceMatrix}
-\end{BVerbatim}
-$\begin{pNiceMatrix}[
- code-after = {\tikz \node [inner sep = 0pt,
- fill = red!15,
- blend mode = multiply,
- fit = (1-2) ] {} ; } ]
-a & \multicolumn1C{\frac AB} \\[2mm]
-b & c
-\end{pNiceMatrix}$
-
-\subsection{Environnements obsolètes}
-
-La version 3.0 de \pkg{nicematrix} a introduit l'environnement |{pNiceArray}| (et ses variantes) avec les options
-|first-row|, |last-row|, |first-col| et |last-col|.
-
-Par conséquent, les environnements suivants, présents dans les versions précédentes de \pkg{nicematrix} ont été
-supprimés.
-%
-\begin{itemize}
-\item |{NiceArrayCwithDelims}| ;
-\item |{pNiceArrayC}|, |{bNiceArrayC}|, |{BNiceArrayC}|, |{vNiceArrayC}|,
-|{VNiceArrayC}| ;
-\item |{NiceArrayRCwithDelims}| ;
-\item |{pNiceArrayRC}|, |{bNiceArrayRC}|, |{BNiceArrayRC}|, |{vNiceArrayRC}|,
-|{VNiceArrayRC}|.
-\end{itemize}
-
-Le code correspondant est toutefois encore présent à la fin du fichier |nicematrix.sty|, après une
-commande |\file_input_stop:|.
-
+L'extension \pkg{nicematrix} n'est pas parfaitement compatible avec l'extension \pkg{arydshln} (parce que cette
+extension redéfinit de nombreuses commandes internes de \pkg{array}).
\section{Exemples}
@@ -2402,11 +2671,9 @@ a_p & &&a_0 & & &b_1 \\
\end{scope}
\vspace{2cm}
-Un exemple avec un système linéaire (le trait vertical a été tracé en bleu avec les outils de
-\pkg{colortbl}):\par\nobreak
+Un exemple avec un système linéaire:\par\nobreak
\begin{Verbatim}
-\arrayrulecolor{blue}
$\begin{pNiceArray}{*6C|C}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
1 & 1 & 1 &\Cdots & & 1 & 0 & \\
0 & 1 & 0 &\Cdots & & 0 & & L_2 \gets L_2-L_1 \\
@@ -2415,10 +2682,9 @@ $\begin{pNiceArray}{*6C|C}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
\Vdots & & &\Ddots & & 0 & \\
0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1
\end{pNiceArray}$
-\arrayrulecolor{black}
\end{Verbatim}
-\arrayrulecolor{blue}
+
\[\begin{pNiceArray}{*6C|C}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
1 & 1 & 1 &\Cdots & & 1 & 0 & \\
0 & 1 & 0 &\Cdots & & 0 & & L_2 \gets L_2-L_1 \\
@@ -2427,7 +2693,7 @@ $\begin{pNiceArray}{*6C|C}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
\Vdots & & &\Ddots & & 0 & \\
0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1
\end{pNiceArray}\]
-\arrayrulecolor{black}
+
\subsection{Des lignes pointillées qui ne sont plus pointillées}
@@ -2617,19 +2883,16 @@ a_{41} & a_{42} & a_{43} & a_{44}
On remarquera que les traits que l'on vient de tracer sont dessinés \emph{après} la matrice sans modifier la
position des composantes de celle-ci. En revanche, les traits tracés par |\hline|, le spécificateur «\verb+|+» ou
-les options |hlines| et |vlines| «écartent» les composantes de la matrice (quand l'extension \pkg{array} est
-chargée, ce qui est toujours le cas avec \pkg{nicematrix}).\footnote{En revanche les traits tracés par |\ncline|
- n'écartent pas les lignes de la matrice.}
+les options |hlines|, |vlines| et |hvlines| «écartent» les composantes de la matrice.\footnote{Pour la commande
+ |\cline|, voir la remarque p.~\pageref{remark-cline}.}
\vspace{1cm}
-
-L'extension \pkg{nicematrix} est construite au-dessus de l'environnement |{array}| et, par conséquent, il est
-possible d'utiliser l'extension \pkg{colortbl} dans les environnements de \pkg{nicematrix}. Les possibilités de
-réglage de \pkg{colortbl} sont néanmoins assez limitées. C'est pourquoi nous proposons une autre méthode pour
-surligner une rangée de la matrice. Nous créons un nœud Tikz rectangulaire qui englobe les nœuds de la deuxième
-rangée en utilisant les outils de la bibliothèque Tikz \pkg{fit}. Ce nœud est rempli après la construction de la
-matrice. Pour que l'on puisse voir le texte \emph{sous} le nœud, nous devons utiliser la transparence avec le
-|blend mode| égal à |multiply|.
+Il est possible de colorier une rangée avec |\rowcolor| dans le |code-before| (ou avec |\rowcolor| de
+\pkg{colortbl} dans la première case de la rangée ). Les possibilités de réglages sont néanmoins limitées. C'est
+pourquoi nous présentons ici une autre méthode pour surligner une rangée de la matrice. Nous créons un nœud Tikz
+rectangulaire qui englobe les nœuds de la deuxième rangée en utilisant les outils de la bibliothèque Tikz
+\pkg{fit}. Ce nœud est rempli après la construction de la matrice. Pour que l'on puisse voir le texte \emph{sous}
+le nœud, nous devons utiliser la transparence avec le |blend mode| égal à |multiply|.
\tikzset{highlight/.style={rectangle,
@@ -2941,3 +3204,8 @@ documentation ici présente, ainsi que le code source commenté et un historique
\end{document}
+
+
+
+
+
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index a78a94ee50..7e22066769 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{4.0}
-\def\myfiledate{2020/05/08}
+\def\myfileversion{4.1}
+\def\myfiledate{2020/05/27}
%
%
%<*batchfile>
@@ -123,38 +123,12 @@ version 2005/12/01 or later.
%
% \begin{abstract}
% The LaTeX package \pkg{nicematrix} provides new environments similar to the
-% classical environments |{tabular}|, |{array}| and |{matrix}| but with some
-% additional features. Among these features are the possibilities to fix the
-% width of the columns and to draw continuous ellipsis dots between the cells of
-% the array.
+% classical environments |{tabular}|, |{array}| and |{matrix}| of \pkg{array}
+% and \pkg{amsmath} but with extended features.
% \end{abstract}
%
% \vspace{1cm}
-% \section{Presentation}
-%
-%
-% This package can be used with |xelatex|, |lualatex|, |pdflatex| but also by
-% the classical workflow |latex|-|dvips|-|ps2pdf| (or Adobe Distiller). Two or
-% three compilations may be necessary. This package requires and \textbf{loads}
-% the packages \pkg{l3keys2e}, \pkg{xparse}, \pkg{array}, \pkg{amsmath},
-% \pkg{pgfcore} and the module \pkg{shapes} of \textsc{pgf} (\pkg{tikz} is
-% \emph{not} loaded). The final user only has to load the package with
-% |\usepackage{nicematrix}|.
-%
-%
-% \medskip
-% \begin{savenotes}
-% \begin{minipage}{0.6\linewidth}
-% This package provides some new tools to draw mathematical matrices. The main
-% features are the following:
-% \begin{itemize}\setlength{\itemsep}{0pt}
-% \item continuous dotted lines;
-% \item exterior rows and columns for labels;
-% \item a control of the width of the columns.
-% \end{itemize}
-% \end{minipage}
-% \end{savenotes}
-% \hspace{1.4cm}
+% \hspace{1cm}
% $\begin{bNiceArray}{CCCC}[first-row,first-col,
% code-for-first-col=\color{blue}\scriptstyle,
% code-for-first-row=\color{blue}\scriptstyle,
@@ -164,98 +138,1155 @@ version 2005/12/01 or later.
% L_2 & a_{21} & a_{22} & \Cdots & a_{2n} \\
% \Vdots & \Vdots & \Vdots & \Ddots & \Vdots\\
% L_n & a_{n1} & a_{n2} & \Cdots & a_{nn}
-% \end{bNiceArray}$
+% \end{bNiceArray}$\hspace{2cm}
+% \begin{NiceTabular}{LSSSS}[code-before = \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{}]
+% \toprule
+% \Block{2-1}{Product} & \multicolumn{3}{C}{dimensions (cm)} & \Block{2-1}{\rotate Price} \\
+% \cmidrule(rl){2-4}
+% & L & l & h \\
+% \midrule
+% small & 3 & 5.5 & 1 & 30 \\
+% standard & 5.5 & 8 & 1.5 & 50.5 \\
+% premium & 8.5 & 10.5 & 2 & 80 \\
+% extra & 8.5 & 10 & 1.5 & 85.5 \\
+% special & 12 & 12 & 0.5 & 70 \\
+% \bottomrule
+% \end{NiceTabular}
+%
+% \vspace{1cm}
+% The package \pkg{nicematrix} is entirely contained in the file
+% |nicematrix.sty|. This file may be put in the current directory or in a
+% |texmf| tree. However, the best is to install \pkg{nicematrix} with a TeX
+% distribution as MiKTeX or TeXlive.
+%
+% \bigskip
+% This package can be used with |xelatex|, |lualatex|, |pdflatex| but also by
+% the classical workflow |latex|-|dvips|-|ps2pdf| (or Adobe Distiller).
+%
+% \bigskip
+% This package requires and \textbf{loads} the packages \pkg{l3keys2e},
+% \pkg{xparse}, \pkg{array}, \pkg{amsmath}, \pkg{pgfcore} and the module
+% \pkg{shapes} of \textsc{pgf} (\pkg{tikz}, which is a layer over \textsc{pgf}
+% is \emph{not} loaded). The final user only has to load the package with
+% |\usepackage{nicematrix}|.
+%
+%
+% \bigskip
+% The idea of \pkg{nicematrix} is to create \textsc{pgf} nodes under the cells
+% and the positions of the rules of the tabular created by \pkg{array} and to
+% use these nodes to develop new features. As usual with \textsc{pgf}, the
+% coordinates of these nodes are written in the |.aux| to be used on the next
+% compilation and that's why \pkg{nicematrix} may need \textbf{several
+% compilations}.
%
-% \medskip
+% \bigskip
+% Most features of \pkg{nicematrix} may be used without explicit use of
+% \textsc{pgf} or Tikz (which, in fact, is not loaded by default).
+%
+% \bigskip
% A command |\NiceMatrixOptions| is provided to fix the options (the
-% scope of the options fixed by this command is the current TeX group).
+% scope of the options fixed by this command is the current TeX group: they are
+% semi-global).
+%
%
+% \newpage
+%
+% \section{The environments of this package}
+%
+% The package \pkg{nicematrix} defines the following new environments.
+%
+% \medskip
+% \begin{ttfamily}
+% \setlength{\tabcolsep}{3mm}
+% \begin{tabular}{llll}
+% \{NiceTabular\} & \{NiceArray\} & \{NiceMatrix\} \\
+% & \{pNiceArray\} & \{pNiceMatrix\} \\
+% & \{bNiceArray\} & \{bNiceMatrix\} \\
+% & \{BNiceArray\} & \{BNiceMatrix\} \\
+% & \{vNiceArray\} & \{vNiceMatrix\} \\
+% & \{VNiceArray\} & \{VNiceMatrix\}
+% \end{tabular}
+% \end{ttfamily}
+%
+%
+%
+%
+% \medskip
+% The environments |{NiceArray}| and |{NiceTabular}| are similar to the
+% environments |{array}| and |{tabular}| of the package \pkg{array} (which is
+% loaded by \pkg{nicematrix} ).
+%
+% \medskip
+% However, there are some small differences:
+% \begin{itemize}
+% \item For technical reasons, in the preamble of these environments, the user
+% must use the letters |L|, |C| and~|R|\footnote{The column types |L|, |C| and
+% |R| are defined locally inside |{NiceTabular}| or |{NiceArray}| with
+% |\newcolumntype| of \pkg{array}. This definition overrides an eventual
+% previous definition.} instead of |l|, |c| and |r|, included in the commands
+% |\multicolumn| and in the types of columns defined by |\newcolumntype|.
+%
+% * In |{NiceArray}| (and its variants), the columns of type |w| (ex. :
+% |wc{1cm}|) are composed in math mode whereas, in |{array}| of \pkg{array},
+% they are composed in text mode.
+% \end{itemize}
+%
+% \medskip
+% The environments |{pNiceArray}|, |{bNiceArray}|, etc. have no equivalent in
+% \pkg{array}.
+%
+% \medskip
+% The environments |{NiceMatrix}|, |{pNiceMatrix}|, etc. are similar to the
+% corresponding environments of \pkg{amsmath} (which is loaded by
+% \pkg{nicematrix}): |{matrix}|, |{pmatrix}|, etc.
+%
+% \medskip
+% All the environments of the package \pkg{nicematrix} accept, between square
+% brackets, an optional list of \textsl{key=value} pairs. \textbf{There must be
+% no space before the opening bracket (|[|) of this list of options.}
+%
+% \section{The vertical space between the rows}
+%
+% It's well known that some rows of the arrays created by default with LaTeX
+% are, by default, too close to each other. Here is a classical example.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% $\begin{pmatrix}
+% \frac12 & -\frac12 \\
+% \frac13 & \frac14 \\
+% \end{pmatrix}$
+% \end{BVerbatim}
+% $\begin{pmatrix}
+% \frac12 & -\frac12 \\
+% \frac13 & \frac14 \\
+% \end{pmatrix}$
%
% \bigskip
-% \textbf{An example for the continuous dotted lines}
+% Inspired by the package \pkg{cellspace} which deals with that problem, the
+% package \pkg{nicematrix} provides two keys |cell-space-top-limit| and
+% |cell-space-bottom-limit| similar to the parameters |\cellspacetoplimit| and
+% |\cellspacebottomlimit| of \pkg{cellspace}. The initial value of these
+% parameters is $0$~pt in order to have for the environments of \pkg{nicematrix}
+% the same behaviour as those of \pkg{array} and \pkg{amsmath}. However, a value
+% of $1$~pt would probably be a good choice and we suggest to set them with
+% |\NiceMatrixOptions|.
%
% \medskip
-% \begin{minipage}{10cm}
-% For example, consider the following code which uses an environment |{pmatrix}|
-% of \pkg{amsmath}.
+% \begin{Verbatim}
+% \NiceMatrixOptions{~emphase#cell-space-top-limit = 1pt,cell-space-bottom-limit = 1pt@}
+% \end{Verbatim}
%
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% $\begin{pNiceMatrix}
+% \frac12 & -\frac12 \\
+% \frac13 & \frac14 \\
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% \begin{scope}
+% \NiceMatrixOptions{
+% cell-space-top-limit = 1pt ,
+% cell-space-bottom-limit = 1pt ,
+% }
+% $\begin{pNiceMatrix}
+% \frac12 & -\frac12 \\
+% \frac13 & \frac14 \\
+% \end{pNiceMatrix}$
+% \end{scope}
+%
+%
+%
+%
+%
+% \bigskip
+% \section{The vertical position of the arrays}
+%
+% The package \pkg{nicematrix} provides a option |baseline| for the vertical
+% position of the arrays. This option takes as value an integer which is the
+% number of the row on which the array will be aligned.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% $A = \begin{pNiceMatrix}[~emphase#baseline=2@]
+% \frac{1}{\sqrt{1+p^2}} & p & 1-p \\
+% 1 & 1 & 1 \\
+% 1 & p & 1+p
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% $A = \begin{pNiceMatrix}[baseline=2]
+% \frac{1}{\sqrt{1+p^2}} & p & 1-p \\
+% 1 & 1 & 1 \\
+% 1 & p & 1+p
+% \end{pNiceMatrix}$
+%
+%
+% \medskip
+% It's also possible to use the option |baseline| with one of the special values
+% |t|, |c| or |b|. These letters may also be used absolutely like the option of
+% the environments |{tabular}| and |{array}| of \pkg{array}. The initial value
+% of |baseline| is~|c|.
+%
+%
+% \medskip
+% In the following example, we use the option |t| (equivalent to |baseline=t|)
+% immediately after an |\item| of list. One should remark that the presence of a
+% |\hline| at the beginning of the array doesn't prevent the alignment of the
+% baseline with the baseline of the first row (with |{tabular}| or |{array}| of
+% \pkg{array}, one must use |\firsthline|\footnote{It's also possible to use
+% |\firsthline| in the environments of \pkg{nicematrix}.}).
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% \begin{enumerate}
+% \item an item
+% \smallskip
+% \item \renewcommand{\arraystretch}{1.2}
+% $\begin{NiceArray}~emphase#[t]@{LCCCCCC}
+% \hline
+% n & 0 & 1 & 2 & 3 & 4 & 5 \\
+% u_n & 1 & 2 & 4 & 8 & 16 & 32
+% \hline
+% \end{NiceArray}$
+% \end{enumerate}
+% \end{BVerbatim}
+% \begin{minipage}{5cm}
+% \begin{enumerate}
+% \item an item
+% \smallskip
+% \item \renewcommand{\arraystretch}{1.2}
+% $\begin{NiceArray}[t]{LCCCCCC}
+% \hline
+% n & 0 & 1 & 2 & 3 & 4 & 5 \\
+% u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
+% \hline
+% \end{NiceArray}$
+% \end{enumerate}
+% \end{minipage}
+%
+% \medskip
+% However, it's also possible to use the tools of \pkg{booktabs}: |\toprule|,
+% |\bottomrule|, |\midrule|, etc.\par\nobreak
+%
+% \smallskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% \begin{enumerate}
+% \item an item
+% \smallskip
+% \item
+% $\begin{NiceArray}[t]{LCCCCCC}
+% ~emphase#\toprule@
+% n & 0 & 1 & 2 & 3 & 4 & 5 \\
+% ~emphase#\midrule@
+% u_n & 1 & 2 & 4 & 8 & 16 & 32
+% ~emphase#\bottomrule@
+% \end{NiceArray}$
+% \end{enumerate}
+% \end{BVerbatim}
+% \begin{minipage}{5cm}
+% \begin{enumerate}
+% \item an item
% \smallskip
+% \item
+% $\begin{NiceArray}[t]{LCCCCCC}
+% \toprule
+% n & 0 & 1 & 2 & 3 & 4 & 5 \\
+% \midrule
+% u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
+% \bottomrule
+% \end{NiceArray}$
+% \end{enumerate}
+% \end{minipage}
+%
+%
+% \section{The blocks}
+% \label{Block}
+%
+% In the environments of \pkg{nicematrix}, it's possible to use the command
+% |\Block| in order to place an element in the center of a rectangle of merged
+% cells of the array. The command |\Block| don't create space by itself.
+%
+% The command |\Block| must be used in the upper leftmost cell of the array with
+% two arguments. The first argument is the size of the block with the syntax
+% $i$\verb|-|$j$ where $i$ is the number of rows of the block and $j$ its number
+% of columns. The second argument is the content of the block.
+%
+% In |{NiceTabular}| the content of the block is composed in text mode. In the
+% other environments, it is composed in math mode.
+%
+% \medskip
% \begin{BVerbatim}
-% $A = \begin{pmatrix}
-% 1 & \cdots & \cdots & 1 \\
-% 0 & \ddots & & \vdots \\
-% \vdots & \ddots & \ddots & \vdots \\
-% 0 & \cdots & 0 & 1
-% \end{pmatrix}$
+% \begin{NiceTabular}{CCCC}
+% rose & tulipe & marguerite & dahlia \\
+% violette & ~emphase#\Block{2-2}{\LARGE\color{blue} fleurs}@ & & souci \\
+% pervenche & & & lys \\
+% arum & iris & jacinthe & muguet
+% \end{NiceTabular}
% \end{BVerbatim}
%
+%
+% \medskip
+% \begin{center}
+% \begin{NiceTabular}{CCCC}
+% rose & tulipe & marguerite & dahlia \\
+% violette & \Block{2-2}{\LARGE\color{blue} fleurs} & & souci \\
+% pervenche & & & lys \\
+% arum & iris & jacinthe & muguet
+% \end{NiceTabular}
+% \end{center}
+%
+%
+%
+% \medskip
+% It's also possible to use the command |\Block| in mathematical matrices.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
+% $\begin{bNiceArray}{CCC|C}[margin]
+% ~emphase#\Block{3-3}{A}@ & & & 0 \\
+% & \hspace*{1cm} & & \Vdots \\
+% & & & 0 \\
+% \hline
+% 0 & \Cdots& 0 & 0
+% \end{bNiceArray}$
+% \end{BVerbatim}
+% $\begin{bNiceArray}{CCC|C}[margin]
+% \Block{3-3}{A} & & & 0 \\
+% & \hspace*{1cm} & & \Vdots \\
+% & & & 0 \\
+% \hline
+% 0 & \Cdots& 0 & 0
+% \end{bNiceArray}$
+%
+% \bigskip
+% One may wish to raise the size of the ``$A$'' placed in the block of the
+% previous example. Since this element is composed in math mode, it's not
+% possible to use directly a command like |\large|, |\Large| and |\LARGE|.
+% That's why the command |\Block| provides an option between angle brackets to
+% specify some TeX code which will be inserted before the beginning of the
+% math mode.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
+% $\begin{bNiceArray}{CCC|C}[margin]
+% \Block{3-3}~emphase#<\Large>@{A} & & & 0 \\
+% & \hspace*{1cm} & & \Vdots \\
+% & & & 0 \\
+% \hline
+% 0 & \Cdots& 0 & 0
+% \end{bNiceArray}$
+% \end{BVerbatim}
+% \begin{scope}
+% $\begin{bNiceArray}{CCC|C}[margin]
+% \Block{3-3}<\Large>{A} & & & 0 \\
+% & \hspace*{1cm} & & \Vdots \\
+% & & & 0 \\
+% \hline
+% 0 & \Cdots& 0 & 0
+% \end{bNiceArray}$
+% \end{scope}
+%
+% \section{The rules}
+%
+% The usual techniques for the rules may be used in the environments of
+% \pkg{nicematrix} (excepted |\vline|).
+%
+%
+% \subsection{The thickness and the color of the rules}
+%
+% The environments of \pkg{nicematrix} provide a key |rules/width| to set the
+% width (in fact the thickness) of the rules in the current environment. In
+% fact, this key merely sets the value of the length |\arrayrulewidth|.
+%
% \smallskip
-% This code composes the matrix $A$ on the right.
-% \end{minipage}\hspace{1cm}
-% $A = \begin{pmatrix}
-% 1 &\cdots &\cdots &1 \\
-% 0 &\ddots & &\vdots \\
-% \vdots &\ddots &\ddots &\vdots \\
-% 0 &\cdots &0 &1
-% \end{pmatrix}$
+% It's well known that \pkg{colortbl} provides the command |\arrayrulecolor| in
+% order to specify the color of the rules.
+%
+% \smallskip
+% With \pkg{nicematrix}, it's possible to specify the color of the rules even
+% when \pkg{colortbl} is not loaded. For sake of compatibility, the command is
+% also named |\arrayrulecolor|. The environments of \pkg{nicematrix} also
+% provide a key |rules/color| to fix the color of the rules in the current
+% environment.
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=10cm
+% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
+% \begin{NiceTabular}{|CCC|}[~emphase#rules/color=[gray]{0.9},rules/width=1pt@]
+% \hline
+% rose & tulipe & lys \\
+% arum & iris & violette \\
+% muguet & dahlia & souci \\
+% \hline
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{|CCC|}[rules/color=[gray]{0.9},rules/width=1pt]
+% \hline
+% rose & tulipe & lys \\
+% arum & iris & violette \\
+% muguet & dahlia & souci \\
+% \hline
+% \end{NiceTabular}
+% \end{scope}
+%
+% \medskip
+% If one wishes to define new specifiers for columns in order to draw vertical
+% rules (for example with a specific color or thicker than the standard rules),
+% he should consider the command |\OnlyMainNiceMatrix| described on
+% page~\pageref{OnlyMainNiceMatrix}.
%
%
% \bigskip
+% \subsection{A remark about \textbackslash cline}
+%
+%\label{remark-cline}
+%
+% The horizontal and vertical rules drawn by |\hline| and the specifier
+% ``\verb+|+'' make the array larger or wider by a quantity equal to the width of the rule.
+%
+% \smallskip
+% For historical reasons, this is not the case with the command |\cline|, as
+% shown by the following example.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
+% \setlength{\arrayrulewidth}{2pt}
+% \begin{tabular}{cccc} \hline
+% A&B&C&D \\ ~emphase#\cline{2-2}@
+% A&B&C&D \\ \hline
+% \end{tabular}
+% \end{BVerbatim}
% \begin{scope}
-% \NiceMatrixOptions{transparent}
-% \begin{minipage}{10cm}
-% Now, if we use the package \pkg{nicematrix} with the option \\
-% |transparent|, the same code will give the result on the right.
-% \end{minipage}\hspace{1cm}
-% $A = \begin{pmatrix}
-% 1 & \cdots & \cdots & 1 \\
-% 0 & \ddots & & \vdots \\
-% \vdots & \ddots & \ddots & \vdots \\
-% 0 & \cdots & 0 & 1
-% \end{pmatrix}$
+% \setlength{\arrayrulewidth}{2pt}
+% \begin{tabular}[c]{cccc}
+% \hline
+% A&B&C&D \\
+% \cline{2-2}
+% A&B&C&D \\
+% \hline
+% \end{tabular}
% \end{scope}
%
+% \medskip
+% In the environments of \pkg{nicematrix}, this situation is corrected (it's
+% still possible to go to the standard behaviour of |\cline| with the key |standard-cline|).
%
-% \section{The environments of this package}
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
+% \setlength{\arrayrulewidth}{2pt}
+% \begin{NiceTabular}{CCCC} \hline
+% A&B&C&D \\ ~emphase#\cline{2-2}@
+% A&B&C&D \\ \hline
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{scope}
+% \setlength{\arrayrulewidth}{2pt}
+% \begin{NiceTabular}[c]{CCCC}
+% \hline
+% A&B&C&D \\
+% \cline{2-2}
+% A&B&C&D \\
+% \hline
+% \end{NiceTabular}
+% \end{scope}
%
-% The package \pkg{nicematrix} defines the following new environments.
+% \subsection{The keys hlines and vlines}
+%
+% The key |hlines| draws all the horizontal rules and the key |vlines| draws all
+% the vertical rules. In fact, in the environments with delimiters (as
+% |{pNiceMatrix}| or |{bNiceArray}|) the exteriors rules are not drawn (as
+% expected).
%
% \medskip
-% \begin{ttfamily}
-% \setlength{\tabcolsep}{3mm}
-% \begin{tabular}{llll}
-% \{NiceMatrix\} & \{NiceArray\} & \{NiceTabular\} \\
-% \{pNiceMatrix\} & \{pNiceArray\} \\
-% \{bNiceMatrix\} & \{bNiceArray\} \\
-% \{BNiceMatrix\} & \{BNiceArray\} \\
-% \{vNiceMatrix\} & \{vNiceArray\} \\
-% \{VNiceMatrix\} & \{VNiceArray\} \\
-% & \{NiceArrayWithDelims\}
-% \end{tabular}
-% \end{ttfamily}
+% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
+% $\begin{pNiceMatrix}[~emphase#vlines@,rules/width=0.2pt]
+% 1 & 2 & 3 & 4 & 5 & 6 \\
+% 1 & 2 & 3 & 4 & 5 & 6 \\
+% 1 & 2 & 3 & 4 & 5 & 6
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% $\begin{pNiceMatrix}[vlines,rules/width=0.2pt]
+% 1 & 2 & 3 & 4 & 5 & 6 \\
+% 1 & 2 & 3 & 4 & 5 & 6 \\
+% 1 & 2 & 3 & 4 & 5 & 6
+% \end{pNiceMatrix}$
%
+% \bigskip
+% However, there is a difference between the key |vlines| and the use of
+% the specifier ``"|"'' in the preamble of the environment: the rules drawn by
+% |vlines| completely cross the double-rules drawn by |\hline\hline| (you don't
+% need \pkg{hhline}).
%
% \medskip
-% By default, the environments |{NiceMatrix}|, |{pNiceMatrix}|, |{bNiceMatrix}|,
-% |{BNiceMatrix}|, |{vNiceMatrix}| and |{VNiceMatrix}| behave almost exactly as
-% the corresponding environments of \pkg{amsmath}: |{matrix}|, |{pmatrix}|,
-% |{bmatrix}|, |{Bmatrix}|, |{vmatrix}| and |{Vmatrix}|.
+% \begin{BVerbatim}[baseline=c,boxwidth=11.5cm]
+% $\begin{NiceMatrix}[~emphase#vlines@] \hline
+% a & b & c & d \\ \hline \hline
+% 1 & 2 & 3 & 4 \\
+% 1 & 2 & 3 & 4 \\ \hline
+% \end{NiceMatrix}$
+% \end{BVerbatim}
+% $\begin{NiceMatrix}[vlines]
+% \hline
+% a & b & c & d \\
+% \hline \hline
+% 1 & 2 & 3 & 4 \\
+% 1 & 2 & 3 & 4 \\
+% \hline
+% \end{NiceMatrix}$
+%
+%
+% \bigskip
+% If you use \pkg{booktabs} (which provides |\toprule|, |midrule|, |bottomrule|,
+% etc.) and you really want to draw vertical rules (something opposed to the
+% spirit of \pkg{booktabs}), you should remark that the key |vlines| in
+% compatible with \pkg{booktabs}.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=11.5cm]
+% $\begin{NiceMatrix}[~emphase#vlines@] \toprule
+% a & b & c & d \\ \midrule
+% 1 & 2 & 3 & 4 \\
+% 1 & 2 & 3 & 4 \\ \bottomrule
+% \end{NiceMatrix}$
+% \end{BVerbatim}
+% $\begin{NiceMatrix}[vlines]
+% \toprule
+% a & b & c & d \\
+% \midrule
+% 1 & 2 & 3 & 4 \\
+% 1 & 2 & 3 & 4 \\
+% \bottomrule
+% \end{NiceMatrix}$
+%
+%
+% \subsection{The key hvlines}
+% \label{hvlines}
+%
+% The key |hvlines| draws all the vertical and horizontal rules \emph{excepted
+% in the blocks}.\footnote{In fact, when the key |hvlines| is in force, the
+% rules are also not drawn in the virtual blocks delimited by cells relied par
+% dotted lines (cf. p. \pageref{dotted-and-hvlines}).}
+%
+% \medskip
+% \begin{Verbatim}
+% \setlength{\arrayrulewidth}{1pt}
+% \begin{NiceTabular}{CCCC}[~emphase#hvlines@,rules/color=blue]
+% rose & tulipe & marguerite & dahlia \\
+% violette & \Block{2-2}{\LARGE\color{blue} fleurs} & & souci \\
+% pervenche & & & lys \\
+% arum & iris & jacinthe & muguet
+% \end{NiceTabular}
+% \end{Verbatim}
+%
+% \begin{center}
+% \setlength{\arrayrulewidth}{1pt}
+% \begin{NiceTabular}{CCCC}[hvlines,rules/color=blue]
+% rose & tulipe & marguerite & dahlia \\
+% violette & \Block{2-2}{\LARGE\color{blue} fleurs} & & souci \\
+% pervenche & & & lys \\
+% arum & iris & jacinthe & muguet
+% \end{NiceTabular}
+% \end{center}
+%
+%
%
+% \subsection{La commande \textbackslash diagbox}
+%
+% The command |\diagbox| (inspired by the package \pkg{diagbox}), allows, when
+% it is used in a cell, to slash that cell diagonally downwards.\footnote{The
+% author of this document considers that type of construction as graphically
+% poor.}.
%
% \medskip
-% The environments |{NiceArray}| and |{NiceTabular}| are similar to the
-% environments |{array}| and |{tabular}| of the
-% package |{array}|. However, for technical reasons, in the preamble of these
-% environments, the user must use the letters |L|, |C| and~|R|
-% instead of |l|, |c| and |r|. It's possible to use the constructions
-% |w{...}{...}|, |W{...}{...}|, "|", |>{...}|, |<{...}|, |@{...}|, |!{...}| and
-% |*{n}{...}| but the letters |p|, |m| and |b| should not be used.
+% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
+% $\begin{NiceArray}{*{5}{C}}[hvlines]
+% ~emphase#\diagbox{x}{y}@ & e & a & b & c \\
+% e & e & a & b & c \\
+% a & a & e & c & b \\
+% b & b & c & e & a \\
+% c & c & b & a & e
+% \end{NiceArray}$
+% \end{BVerbatim}
+% $\begin{NiceArray}{*{5}{C}}[hvlines]
+% \diagbox{x}{y} & e & a & b & c \\
+% e & e & a & b & c \\
+% a & a & e & c & b \\
+% b & b & c & e & a \\
+% c & c & b & a & e
+% \end{NiceArray}$
+%
+%
+%
+% \subsection{Dotted rules}
+%
+%
+% In the environments of the package \pkg{nicematrix}, it's possible to use
+% the command |\hdottedline| (provided by \pkg{nicematrix}) which is a
+% counterpart of the classical commands |\hline| and |\hdashline| (the latter is
+% a command of \pkg{arydshln}).
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
+% \begin{pNiceMatrix}
+% 1 & 2 & 3 & 4 & 5 \\
+% ~emphase#\hdottedline@
+% 6 & 7 & 8 & 9 & 10 \\
+% 11 & 12 & 13 & 14 & 15
+% \end{pNiceMatrix}
+% \end{BVerbatim}
+% $\begin{pNiceMatrix}
+% 1 & 2 & 3 & 4 & 5 \\
+% \hdottedline
+% 6 & 7 & 8 & 9 & 10 \\
+% 11 & 12 & 13 & 14 & 15
+% \end{pNiceMatrix}$
+%
+%
+% \bigskip
+% In the environments with an explicit preamble (like |{NiceTabular}|,
+% |{NiceArray}|, etc.), it's possible to draw a vertical dotted line with the
+% specifier ``|:|''.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
+% \left(\begin{NiceArray}{CCCC~emphase#:@C}
+% 1 & 2 & 3 & 4 & 5 \\
+% 6 & 7 & 8 & 9 & 10 \\
+% 11 & 12 & 13 & 14 & 15
+% \end{NiceArray}\right)
+% \end{BVerbatim}
+% $\left(\begin{NiceArray}{CCCC:C}
+% 1 & 2 & 3 & 4 & 5 \\
+% 6 & 7 & 8 & 9 & 10 \\
+% 11 & 12 & 13 & 14 & 15
+% \end{NiceArray}\right)$
+%
+% \bigskip
+% It's possible to change in \pkg{nicematrix} the letter used to specify a
+% vertical dotted line with the option |letter-for-dotted-lines| available in
+% |\NiceMatrixOptions|.
+%
+% \bigskip
+% \emph{Remark} : In the package \pkg{array} (on which the package
+% \pkg{nicematrix} relies), horizontal and vertical rules make the array larger
+% or wider by a quantity equal to the width of the rule\footnote{In fact, this
+% is true only for |\hline| and ``"|"'' but not for |\cline|.}. In
+% \pkg{nicematrix}, the dotted lines drawn by |\hdottedline| and ``|:|'' do
+% likewise.
+%
+%
+%
+%\section{The color of the rows and columns}
+%
+% With the classical package \pkg{colortbl}, it's possible to color the cells,
+% rows and columns of a tabular. However, the resulting \textsc{pdf} is not
+% always perfectly displayed by the \textsc{pdf} viewers, in particular in
+% conjonction with rules. With some \textsc{pdf} viewers, some vertical rules
+% seem to vanish. On the other side, some thin horizontal white lines may appear
+% in some circonstances.
+%
+%
+% \medskip
+% The package \pkg{nicematrix} provides similar tools which do not present these
+% drawbacks. It provides a key |code-before|\footnote{There is also a key
+% |code-after| : see p.~\pageref{code-after}.} for some code which will be
+% executed \emph{before} the drawing of the tabular. In this |code-before|, new
+% commands are available: |\cellcolor|, |\rectanglecolor|, |\rowcolor|,
+% |\columncolor|, |\rowcolors| and |\chessboardcolors|.
+% \label{code-before}
+%
+% \medskip
+% These commands are independent of \pkg{colortbl}.\footnote{Thus, it's possible
+% to coloror the rules, the cells, the rows, the columns, etc. without loading \pkg{colortbl}.}
+%
+% \medskip
+% All these commands accept an optional argument (between square brackets and
+% in first position) which is the color model for the specification of the colors.
+%
+% \medskip
+% \begin{itemize}
+% \item The command |\cellcolor| takes its name from the command |\cellcolor| of
+% \pkg{colortbl}.
+%
+% This command takes in mandatory arguments a color and a list of cells, each of
+% which with the format $i$-$j$ where $i$ is the number of row and $j$ the
+% number of colummn of the cell.
+%
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=10cm
+% \begin{BVerbatim}[boxwidth=10cm,baseline=c]
+% \begin{NiceTabular}{|C|C|C|}[code-before =
+% ~emphase#\cellcolor{red!15}{3-1,2-2,1-3}@]
+% \hline
+% a & b & c \\ \hline
+% e & f & g \\ \hline
+% h & i & j \\ \hline
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{|C|C|C|}[hvlines, code-before =
+% \cellcolor{red!15}{3-1,2-2,1-3}]
+% \hline
+% a & b & c \\ \hline
+% e & f & g \\ \hline
+% h & i & j \\ \hline
+% \end{NiceTabular}
+% \end{scope}
+%
+% \bigskip
+% \item The command |\rectanglecolor| takes three mandatory arguments. The first
+% is the color. The second is the upper-left cell of the rectangle and the third
+% is the lower-right cell of the rectangle.
%
-% See p.~\pageref{NiceArray} the section relating to |{NiceArray}| and |{NiceTabular}|.
+% \medskip
+% \begin{scope}
+% \hfuzz=10cm
+% \begin{BVerbatim}[boxwidth=10cm,baseline=c]
+% \begin{NiceTabular}{|C|C|C|}[code-before =
+% ~emphase#\rectanglecolor{blue!15}{2-2}{3-3}@]
+% \hline
+% a & b & c \\ \hline
+% e & f & g \\ \hline
+% h & i & j \\ \hline
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{|C|C|C|}[hvlines, code-before =
+% \rectanglecolor{blue!15}{2-2}{3-3}]
+% \hline
+% a & b & c \\ \hline
+% e & f & g \\ \hline
+% h & i & j \\ \hline
+% \end{NiceTabular}
+% \end{scope}
%
+%
+%
+% \bigskip
+% \item The command |\rowcolor| takes its name from the command |\rowcolor| of
+% \pkg{colortbl}. Its first mandatory argument is the color and the second is a
+% comma-separated list of rows or interval of rows with the form $a$-$b$ (an
+% interval of the form $a$- represent all the rows from the row $a$ until the end).
+%
+% \medskip
+% \begin{scope}
+% \hfuzz = 10cm
+% \begin{BVerbatim}[boxwidth=9cm,baseline=c]
+% $\begin{NiceArray}{LLL}[hvlines, ~emphase#code-before = \rowcolor{red!15}{1,3-5,8-}@]
+% a_1 & b_1 & c_1 \\
+% a_2 & b_2 & c_2 \\
+% a_3 & b_3 & c_3 \\
+% a_4 & b_4 & c_4 \\
+% a_5 & b_5 & c_5 \\
+% a_6 & b_6 & c_6 \\
+% a_7 & b_7 & c_7 \\
+% a_8 & b_8 & c_8 \\
+% a_9 & b_9 & c_9 \\
+% a_{10} & b_{10} & c_{10} \\
+% \end{NiceArray}$
+% \end{BVerbatim}
+% $\begin{NiceArray}{LLL}[baseline=4,hvlines, code-before = \rowcolor{red!15}{1,3-5,8-}]
+% a_1 & b_1 & c_1 \\
+% a_2 & b_2 & c_2 \\
+% a_3 & b_3 & c_3 \\
+% a_4 & b_4 & c_4 \\
+% a_5 & b_5 & c_5 \\
+% a_6 & b_6 & c_6 \\
+% a_7 & b_7 & c_7 \\
+% a_8 & b_8 & c_8 \\
+% a_9 & b_9 & c_9 \\
+% a_{10} & b_{10} & c_{10} \\
+% \end{NiceArray}$
+% \end{scope}
+%
+%
+% \bigskip
+% \item The command |\columncolor| takes its name from the command
+% |\columncolor| of \pkg{colortbl}. Its syntax is similar to the syntaxe of
+% |\rowcolor|.
+%
+% \bigskip
+% \item The command |\rowcolors| (with a \emph{s}) takes its name from the
+% command |\rowcolors| of \pkg{xcolor}\footnote{The command |\rowcolors| of
+% \pkg{color} is available when \pkg{xcolor} is loaded with the
+% option~|table|.}. The \emph{s} emphasizes the fact that there is \emph{two}
+% colors. This command colors alternately the rows of the tabular, beginning
+% with the row whose number is given in first (mandatory) argument. The two
+% other (mandatory) arguments are the colors.
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=10cm
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% \begin{NiceTabular}{LR}[hlines,code-before = ~emphase#\rowcolors{1}{blue!10}{}@]
+% John & 12 \\
+% Stephen & 8 \\
+% Sarah & 18 \\
+% Ashley & 20 \\
+% Henry & 14 \\
+% Madison & 15
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{LR}[hlines,code-before = \rowcolors{1}{blue!10}{},baseline=3]
+% John & 12 \\
+% Stephen & 8 \\
+% Sarah & 18 \\
+% Ashley & 20 \\
+% Henry & 14 \\
+% Madison & 15
+% \end{NiceTabular}
+% \end{scope}
+%
+% \bigskip
+% \item The command |\chessboardcolors| takes in mandatory arguments two colors
+% and colors the cells of the tabular in quincunx with these colors.
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=10cm
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% $\begin{pNiceMatrix}[R,margin, ~emphase#code-before=\chessboardcolors{red!15}{blue!15}@]
+% 1 & -1 & 1 \\
+% -1 & 1 & -1 \\
+% 1 & -1 & 1
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% $\begin{pNiceMatrix}[R,baseline=1, margin, code-before = \chessboardcolors{red!15}{blue!15}]
+% 1 & -1 & 1 \\
+% -1 & 1 & -1 \\
+% 1 & -1 & 1
+% \end{pNiceMatrix}$
+% \end{scope}
+%
+% \medskip
+% We have used the key |R| which aligns all the columns rightwards (cf. p.~\pageref{key-R}).
+% \end{itemize}
+%
+%
+%
+% \bigskip
+% One should remark that these commands are compatible with the commands de
+% \pkg{booktabs} (|\toprule|, |\midrule|, |\bottomrule|, etc).
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=10cm
+% \begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
+% \begin{NiceTabular}[c]{LSSSS}%
+% [code-before = \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{}]
+% ~emphase#\toprule@
+% \Block{2-1}{Product} \\
+% \Block{1-3}{dimensions (cm)} & & &
+% \Block{2-1}{\rotate Price} \\
+% ~emphase#\cmidrule(rl){2-4}@
+% & L & l & h \\
+% ~emphase#\midrule@
+% small & 3 & 5.5 & 1 & 30 \\
+% standard & 5.5 & 8 & 1.5 & 50.5 \\
+% premium & 8.5 & 10.5 & 2 & 80 \\
+% extra & 8.5 & 10 & 1.5 & 85.5 \\
+% special & 12 & 12 & 0.5 & 70 \\
+% ~emphase#\bottomrule@
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}[c]{LSSSS}[code-before = \rowcolor{red!15}{1-2}
+% \rowcolors{3}{blue!15}{}]
+% \toprule
+% \Block{2-1}{Product} &
+% \Block{1-3}{dimensions (cm)} & & &
+% \Block{2-1}{\rotate Price} \\
+% \cmidrule(rl){2-4}
+% & L & l & h \\
+% \midrule
+% small & 3 & 5.5 & 1 & 30 \\
+% standard & 5.5 & 8 & 1.5 & 50.5 \\
+% premium & 8.5 & 10.5 & 2 & 80 \\
+% extra & 8.5 & 10 & 1.5 & 85.5 \\
+% special & 12 & 12 & 0.5 & 70 \\
+% \bottomrule
+% \end{NiceTabular}
+% \end{scope}
+%
+% \medskip
+% We have used the type of column |S| of \pkg{siunitx}.
+%
+% \section{The width of the columns}
+% \label{width}
+%
+% In the environments with an explicit preamble (like |{NiceTabular}|,
+% |{NiceArray}|, etc.), it's possible to fix the width of a given column with
+% the standard letters |w| and |W| of the package \pkg{array}. In
+% |{NiceTabular}|, the cells of such columns are composed in texte mode but, in
+% |{NiceArray}|, |{pNiceArray}|, etc., they are composed in math mode (whereas,
+% in |{array}| of \pkg{array}, they are composed in text mode).
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
+% \begin{NiceTabular}{~emphase#Wc{2cm}@CC}[hvlines]
+% Paris & New York & Madrid \\
+% Berlin & London & Roma \\
+% Rio & Tokyo & Oslo
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{Wc{2cm}CC}[hvlines]
+% Paris & New York & Madrid \\
+% Berlin & London & Roma \\
+% Rio & Tokyo & Oslo
+% \end{NiceTabular}
+%
+%
+% \bigskip
+% In the environments of \pkg{nicematrix}, it's also possible to fix the \emph{minimal}
+% width of all the columns of an array directly with the key |columns-width|.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
+% $\begin{pNiceMatrix}[~emphase#columns-width = 1cm@]
+% 1 & 12 & -123 \\
+% 12 & 0 & 0 \\
+% 4 & 1 & 2
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% $\begin{pNiceMatrix}[columns-width = 1cm]
+% 1 & 12 & -123 \\
+% 12 & 0 & 0 \\
+% 4 & 1 & 2
+% \end{pNiceMatrix}$
+%
+% \medskip
+% Note that the space inserted between two columns (equal to 2 |\tabcolsep| in
+% |{NiceTabular}| and to 2 |\arraycolsep| in the other environments)
+% is not suppressed (of course, it's possible to suppress this space by setting
+% |\tabcolsep| or |\arraycolsep| equal to $0$~pt before the environment).
+%
+% \bigskip
+% It's possible to give the special value |auto| to the option |columns-width|:
+% all the columns of the array will have a width equal to the widest cell of
+% the array.\footnote{The result is achieved with only one compilation (but Tikz
+% will have written informations in the |.aux| file and a message requiring a
+% second compilation will appear).}\par\nobreak
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
+% $\begin{pNiceMatrix}[~emphase#columns-width = auto@]
+% 1 & 12 & -123 \\
+% 12 & 0 & 0 \\
+% 4 & 1 & 2
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% $\begin{pNiceMatrix}[columns-width = auto]
+% 1 & 12 & -123 \\
+% 12 & 0 & 0 \\
+% 4 & 1 & 2
+% \end{pNiceMatrix}$
+%
+% \bigskip
+% Without surprise, it's possible to fix the minimal width of the columns of all
+% the matrices of a current scope with the command
+% |\NiceMatrixOptions|.\par\nobreak
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
+% ~emphase#\NiceMatrixOptions{columns-width=10mm}@
+% $\begin{pNiceMatrix}
+% a & b \\ c & d
+% \end{pNiceMatrix}
+% =
+% \begin{pNiceMatrix}
+% 1 & 1245 \\ 345 & 2
+% \end{pNiceMatrix}$
+% \end{BVerbatim}
+% \begin{scope}
+% \NiceMatrixOptions{columns-width=10mm}
+% $\begin{pNiceMatrix}
+% a & b \\
+% c & d
+% \end{pNiceMatrix}
+% =
+% \begin{pNiceMatrix}
+% 1 & 1245 \\
+% 345 & 2
+% \end{pNiceMatrix}$
+% \end{scope}
+%
+%
+% \bigskip
+% But it's also possible to fix a zone where all the matrices will have their
+% columns of the same width, equal to the widest cell of all the matrices. This
+% construction uses the environment |{NiceMatrixBlock}| with the option
+% |auto-columns-width|\footnote{At this time, this is the only usage of the
+% environment |{NiceMatrixBlock}| but it may have other usages in the future.}.
+% The environment |{NiceMatrixBlock}| has no direct link with the command
+% |\Block| presented previously in this document (cf.~p.~\pageref{Block}).
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
+% ~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@
+% $\begin{array}{c}
+% \begin{bNiceMatrix}
+% 9 & 17 \\ -2 & 5
+% \end{bNiceMatrix} \\ \\
+% \begin{bNiceMatrix}
+% 1 & 1245345 \\ 345 & 2
+% \end{bNiceMatrix}
+% \end{array}$
+% ~emphase#\end{NiceMatrixBlock}@
+% \end{BVerbatim}
+% \begin{NiceMatrixBlock}[auto-columns-width]
+% $\begin{array}{c}
+% \begin{bNiceMatrix}
+% 9 & 17 \\ -2 & 5
+% \end{bNiceMatrix} \\ \\
+% \begin{bNiceMatrix}
+% 1 & 1245345 \\ 345 & 2
+% \end{bNiceMatrix}
+% \end{array}$
+% \end{NiceMatrixBlock}
+%
+% \medskip
+% \textbf{Several compilations may be necessary to achieve the job.}
+%
+%
+%
+% \bigskip
+% \section{The exterior rows and columns}
+%
+% The options |first-row|, |last-row|, |first-col| and |last-col| allow the
+% composition of exterior rows and columns in the environments of
+% \pkg{nicematrix}.
+% \label{exterior}
+%
+% A potential ``first row'' (exterior) has the number $0$ (and not $1$). Idem
+% for the potential ``first column''.
+%
+% \begin{Verbatim}
+% $\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@]
+% $\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@,nullify-dots]
+% & C_1 & \Cdots & & C_4 & \\
+% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+% & a_{31} & a_{32} & a_{33} & a_{34} & \\
+% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+% & C_1 & \Cdots & & C_4 &
+% \end{pNiceMatrix}$
+% \end{pNiceMatrix}$
+% \end{Verbatim}
+%
+% \[\begin{pNiceMatrix}[first-row,last-row,first-col,last-col,nullify-dots]
+% & C_1 & \Cdots & & C_4 & \\
+% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+% & a_{31} & a_{32} & a_{33} & a_{34} & \\
+% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+% & C_1 & \Cdots & & C_4 &
+% \end{pNiceMatrix}\]
+%
+% \medskip
+% The dotted lines have been drawn with the tools presented p.~\pageref{Cdots}.
+%
+% \bigskip
+% We have several remarks to do.
+% \begin{itemize}
+% \item For the environments with an explicit preamble (i.e. |{NiceArray}| and
+% its variants), no letter must be given in that preamble for the potential
+% first column and the potential last column: they will automatically (and
+% necessarily) be of type |R| for the first column and |L| for the last one.
+% \item One may wonder how \pkg{nicematrix} determines the number of rows and
+% columns which are needed for the composition of the ``last row'' and ``last
+% column''.
+% \begin{itemize}
+% \item For the environments with explicit preamble, like |{NiceTabular}| and
+% |{pNiceArray}|, the number of columns can obviously be computed from the
+% preamble.
+%
+% \item When the option |light-syntax| (cf. p. \pageref{light-syntax}) is used,
+% \pkg{nicematrix} has, in any case, to load the whole body of the environment
+% (and that's why it's not possible to put verbatim material in the array with
+% the option |light-syntax|). The analysis of this whole body gives the number
+% of rows (but not the number of columns).
+%
+% \item In the other cases, \pkg{nicematrix} compute the number of rows and
+% columns during the first compilation and write the result in the |aux| file
+% for the next run.
+%
+% \textsl{However, it's possible to provide the number of the last row and the
+% number of the last column as values of the options |last-row| and |last-col|,
+% tending to an acceleration of the whole compilation of the document.} That's
+% what we will do throughout the rest of the document.
+% \end{itemize}
+% \end{itemize}
+%
+% \bigskip
+% It's possible to control the appearance of these rows and columns with options
+% |code-for-first-row|, |code-for-last-row|, |code-for-first-col| and
+% |code-for-last-col|. These options
+% specify tokens that will be inserted before each cell of the corresponding row
+% or column.
+%
+%
+% \begin{Verbatim}
+% \NiceMatrixOptions{~emphase#code-for-first-row@ = \color{red},
+% ~emphase#code-for-first-col@ = \color{blue},
+% ~emphase#code-for-last-row@ = \color{green},
+% ~emphase#code-for-last-col@ = \color{magenta}}
+% $\begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
+% & C_1 & \Cdots & & C_4 & \\
+% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+% \hline
+% & a_{31} & a_{32} & a_{33} & a_{34} & \\
+% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+% & C_1 & \Cdots & & C_4 &
+% \end{pNiceArray}$
+% \end{Verbatim}
+%
+% \begin{scope}
+% \NiceMatrixOptions{code-for-first-row = \color{red},
+% code-for-first-col = \color{blue},
+% code-for-last-row = \color{green},
+% code-for-last-col = \color{magenta}}
+% \begin{displaymath}
+% \begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
+% & C_1 & \multicolumn1C{\Cdots} & & C_4 & \\
+% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
+% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
+% \hline
+% & a_{31} & a_{32} & a_{33} & a_{34} & \\
+% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
+% & C_1 & \multicolumn1C{\Cdots} & & C_4 &
+% \end{pNiceArray}
+% \end{displaymath}
+% \end{scope}
+%
+%
+% \emph{Remarks}
+% \begin{itemize}[beginpenalty=10000]
+% \item As shown in the previous example, the horizontal and rules doesn't
+% extend in the exterior rows and columns.
+%
+% However, if one wishes to define new specifiers for columns in order to draw
+% vertical rules (for example thicker than the standard rules), he should
+% consider the command |\OnlyMainNiceMatrix| described on
+% page~\pageref{OnlyMainNiceMatrix}.
+%
+% \item A specification of color present in |code-for-first-row| also applies to
+% a dotted line draw in this exterior ``first row'' (excepted if a value has
+% been given to |xdots/color|). Idem for the other exterior rows and columns.
+%
+% \item Logically, the potential option |columns-width| (described
+% p.~\pageref{width}) doesn't apply to the ``first column'' and ``last column''.
+% \item For technical reasons, it's not possible to use the option of the
+% command |\\| after the ``first row'' or before the ``last row'' (the placement
+% of the delimiters would be wrong).
+% \end{itemize}
+%
+%
+%
+%
%
% \section{The continuous dotted lines}
%
+% \label{Cdots}
% Inside the environments of the package \pkg{nicematrix}, new commands are
% defined: |\Ldots|, |\Cdots|, |\Vdots|, |\Ddots|, and |\Iddots|. These commands
% are intended to be used in place of |\dots|, |\cdots|, |\vdots|, |\ddots| and
@@ -275,7 +1306,8 @@ version 2005/12/01 or later.
% |\Iddots| diagonal ones. It's possible to change the color of these lines
% with the option |color|.\footnote{It's also possible to change the color of
% all theses dotted lines with the option |xdots/color| (\textsl{xdots} to
-% remind that it works for |\Cdots|, |\Ldots|, |\Vdots|, etc.): cf. p. \pageref{customization}.}\par\nobreak
+% remind that it works for |\Cdots|, |\Ldots|, |\Vdots|, etc.): cf. p.
+% \pageref{customization}.}\par\nobreak
%
% \bigskip
% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
@@ -463,9 +1495,6 @@ version 2005/12/01 or later.
% The option |nullify-dots| smashes the instructions |\Ldots| (and the variants)
% horizontally but also vertically.
%
-% \medskip
-% \textbf{There must be no space before the opening bracket (|[|) of the options
-% of the environment.}
%
%
% \subsection{The command \textbackslash Hdotsfor}
@@ -692,234 +1721,52 @@ version 2005/12/01 or later.
% \end{pNiceMatrix}\]
%
%
-%
-% \section{The PGF/Tikz nodes created by nicematrix}
-%
-% \label{name}
+% \subsection{The dotted lines and the key hvlines}
%
-% The package \pkg{nicematrix} creates a PGF/Tikz node for each (non-empty) cell
-% of the considered array. These nodes are used to draw the dotted lines between
-% the cells of the matrix. However, the user may wish to use directly these
-% nodes. It's possible (if Tikz has been loaded\footnote{We remind that, since
-% the version 3.13, \pkg{nicematrix} doesn't load Tikz by default by only
-% \textsc{pgf} (Tikz is a layer over \textsc{pfg}).}). First, the user have to
-% give a name to the array (with the key called |name|). Then, the nodes are
-% accessible through the names ``\textsl{name}-$i$-$j$'' where \textsl{name} is
-% the name given to the array and $i$ and $j$ the numbers of the row and the
-% column of the considered cell.
+% \label{dotted-and-hvlines}
%
+% We have said (cf. p. \pageref{hvlines}) that the key |hvlines| draws all the
+% horizontal and vertical rules, excepted in the blocks. In fact, when this key
+% is in force, the rules are also not drawn in the virtual blocks delimited by
+% cells relied par dotted lines.
+%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% $\begin{pNiceMatrix}[name=~emphase#mymatrix@]
-% 1 & 2 & 3 \\
-% 4 & 5 & 6 \\
-% 7 & 8 & 9
+% \NiceMatrixOptions{nullify-dots}
+% $\begin{pNiceMatrix}[rules/color=gray,~emphase#hvlines@,margin]
+% 0 & \Cdots & & & & 0 \\
+% 1 & \Cdots & & & 1 & 2 \\
+% 0 & \Ddots & & & \Vdots & \Vdots \\
+% \Vdots & \Ddots & & & & \\
+% & & & & & \\
+% 0 & \Cdots & & 0 & 1 & 2 \\
% \end{pNiceMatrix}$
-% \tikz[remember picture,overlay]
-% \draw ~emphase#(mymatrix-2-2)@ circle (2mm) ;
% \end{BVerbatim}
-% $\begin{pNiceMatrix}[name=mymatrix]
-% 1 & 2 & 3 \\
-% 4 & 5 & 6 \\
-% 7 & 8 & 9
+% \begin{scope}
+% \NiceMatrixOptions{nullify-dots}
+% $\begin{pNiceMatrix}[rules/color=gray,hvlines,margin]
+% 0 & \Cdots & & & & 0 \\
+% 1 & \Cdots & & & 1 & 2 \\
+% 0 & \Ddots & & & \Vdots & \Vdots \\
+% \Vdots & \Ddots & & & & \\
+% & & & & & \\
+% 0 & \Cdots & & 0 & 1 & 2 \\
% \end{pNiceMatrix}$
-% \tikz[remember picture,overlay]
-% \draw (mymatrix-2-2) circle (2mm) ;
-%
-% \medskip
-% Don't forget the options |remember picture| and |overlay|.
-%
-% \bigskip
-% In the following example, we have underlined all the nodes of the matrix.
-% \[\begin{pNiceMatrix}[
-% code-after = {\begin{tikzpicture}
-% [every node/.style = {blend mode = multiply,
-% fill = red!15,
-% inner sep = 0 pt }]
-% \node [fit = (1-1)] {} ;
-% \node [fit = (1-3)] {} ;
-% \node [fit = (2-2)] {} ;
-% \node [fit = (3-1)] {} ;
-% \node [fit = (3-3)] {} ;
-% \node [fit = (1-2)] {} ;
-% \node [fit = (2-1)] {} ;
-% \node [fit = (2-3)] {} ;
-% \node [fit = (3-2)] {} ;
-% \end{tikzpicture}}]
-% a & a + b & a + b + c \\
-% a & a & a + b \\
-% a & a & a
-% \end{pNiceMatrix}\]
-%
-%
-% \bigskip
-% In fact, the package \pkg{nicematrix} can create ``extra nodes'': the ``medium
-% nodes'' and the ``large nodes''. The first ones
-% are created with the option |create-medium-nodes| and the second ones with the
-% option |create-large-nodes|.\footnote{There is also an option
-% |create-extra-nodes| which is an alias for the conjonction of
-% |create-medium-nodes| and |create-large-nodes|.}
-%
-% \medskip
-% The names of the ``medium nodes'' are constructed by adding the suffix
-% ``|-medium|'' to the names of the ``normal nodes''. In the following example,
-% we have underlined the ``medium nodes''. We consider that this example is
-% self-explanatory.
-% \[\begin{pNiceMatrix}[
-% create-medium-nodes,
-% code-after = {\begin{tikzpicture}
-% [every node/.style = {fill = red!15,
-% blend mode = multiply,
-% inner sep = 0pt},
-% name suffix = -medium]
-% \node [fit = (1-1)] {} ;
-% \node [fit = (1-2)] {} ;
-% \node [fit = (1-3)] {} ;
-% \node [fit = (2-1)] {} ;
-% \node [fit = (2-2)] {} ;
-% \node [fit = (2-3)] {} ;
-% \node [fit = (3-1)] {} ;
-% \node [fit = (3-2)] {} ;
-% \node [fit = (3-3)] {} ;
-% \end{tikzpicture}}]
-% a & a + b & a + b + c \\
-% a & a & a + b \\
-% a & a & a
-% \end{pNiceMatrix}\]
-%
-%
-% \medskip
-% The names of the ``large nodes'' are constructed by adding the suffix
-% ``|-large|'' to the names of the ``normal nodes''. In the following example,
-% we have underlined the ``large nodes''. We consider that this example is
-% self-explanatory.\footnote{There is no ``large nodes'' created in the exterior
-% rows and columns (for these rows and columns, cf. p.~\pageref{exterior}).}
-%
-% \[\begin{pNiceMatrix}[
-% create-large-nodes,
-% code-after = {\begin{tikzpicture}
-% [every node/.style = {blend mode = multiply,
-% inner sep = 0pt},
-% name suffix = -large]
-% \node [fit = (1-1),fill = red!15] {} ;
-% \node [fit = (1-3),fill = red!15] {} ;
-% \node [fit = (2-2),fill = red!15] {} ;
-% \node [fit = (3-1),fill = red!15] {} ;
-% \node [fit = (3-3),fill = red!15] {} ;
-% \node [fit = (1-2),fill = blue!15] {} ;
-% \node [fit = (2-1),fill = blue!15] {} ;
-% \node [fit = (2-3),fill = blue!15] {} ;
-% \node [fit = (3-2),fill = blue!15] {} ;
-% \end{tikzpicture}}]
-% a & a + b & a + b + c \\
-% a & a & a + b \\
-% a & a & a
-% \end{pNiceMatrix}\]
+% \end{scope}
%
%
-% \medskip
-% The ``large nodes'' of the first column and last column may appear too small
-% for some usage. That's why it's possible to use the options |left-margin| and
-% |right-margin| to add space on both sides of the array and also space in the
-% ``large nodes'' of the first column and last column. In the following example,
-% we have used the options |left-margin| and |right-margin|.\footnote{The
-% options |left-margin| and |right-margin| take dimensions as values but, if no
-% value is given, the default value is used, which is |\arraycolsep| (by
-% default: 5~pt). There is also an option |margin| to fix both |left-margin| and
-% |right-margin| to the same value.}
-% \[\begin{pNiceMatrix}[
-% create-large-nodes,left-margin,right-margin,
-% code-after = {\begin{tikzpicture}
-% [every node/.style = {blend mode = multiply,
-% inner sep = 0pt},
-% name suffix = -large]
-% \node [fit = (1-1),fill = red!15] {} ;
-% \node [fit = (1-3),fill = red!15] {} ;
-% \node [fit = (2-2),fill = red!15] {} ;
-% \node [fit = (3-1),fill = red!15] {} ;
-% \node [fit = (3-3),fill = red!15] {} ;
-% \node [fit = (1-2),fill = blue!15] {} ;
-% \node [fit = (2-1),fill = blue!15] {} ;
-% \node [fit = (2-3),fill = blue!15] {} ;
-% \node [fit = (3-2),fill = blue!15] {} ;
-% \end{tikzpicture}}]
-% a & a + b & a + b + c \\
-% a & a & a + b \\
-% a & a & a
-% \end{pNiceMatrix}\]
-%
-% \medskip
-% It's also possible to add more space on both side of the array with the
-% options |extra-left-margin| and |extra-right-margin|. These margins are not
-% incorporated in the ``large nodes''. It's possible to fix both values with the
-% option |extra-margin| and, in the following example, we use |extra-margin|
-% with the value $3$~pt.
-% \[\begin{pNiceMatrix}[
-% create-large-nodes,margin,extra-margin=3pt,
-% code-after = {\begin{tikzpicture}
-% [every node/.style = {blend mode = multiply,
-% inner sep = 0 pt},
-% name suffix = -large]
-% \node [fit = (1-1),fill = red!15] {} ;
-% \node [fit = (1-3),fill = red!15] {} ;
-% \node [fit = (2-2),fill = red!15] {} ;
-% \node [fit = (3-1),fill = red!15] {} ;
-% \node [fit = (3-3),fill = red!15] {} ;
-% \node [fit = (1-2),fill = blue!15] {} ;
-% \node [fit = (2-1),fill = blue!15] {} ;
-% \node [fit = (2-3),fill = blue!15] {} ;
-% \node [fit = (3-2),fill = blue!15] {} ;
-% \end{tikzpicture}}]
-% a & a + b & a + b + c \\
-% a & a & a + b \\
-% a & a & a
-% \end{pNiceMatrix}\]
-%
-% \medskip
-% In this case, if we want a control over the height of the rows, we can add a
-% |\strut| in each row of the array.
-% \[\begin{pNiceMatrix}[
-% create-large-nodes,left-margin,right-margin,extra-right-margin=3pt,
-% extra-left-margin=3pt,
-% code-after = {\begin{tikzpicture}
-% [every node/.style = {blend mode = multiply,
-% inner sep = 0 pt},
-% name suffix = -large]
-% \node [fit = (1-1),fill = red!15] {} ;
-% \node [fit = (1-3),fill = red!15] {} ;
-% \node [fit = (2-2),fill = red!15] {} ;
-% \node [fit = (3-1),fill = red!15] {} ;
-% \node [fit = (3-3),fill = red!15] {} ;
-% \node [fit = (1-2),fill = blue!15] {} ;
-% \node [fit = (2-1),fill = blue!15] {} ;
-% \node [fit = (2-3),fill = blue!15] {} ;
-% \node [fit = (3-2),fill = blue!15] {} ;
-% \end{tikzpicture}}]
-% \strut a & a + b & a + b + c \\
-% \strut a & a & a + b \\
-% \strut a & a & a
-% \end{pNiceMatrix}\]
-%
-% \bigskip
-% We explain below how to fill the nodes created by \pkg{nicematrix} (cf. p.
-% \pageref{highlight}).
%
% \section{The code-after}
%
% \label{code-after}
% The option |code-after| may be used to give some code that will be excuted
-% after the construction of the matrix (and thus after the construction of
-% all the nodes).
+% after the construction of the matrix.\footnote{There is also a key
+% |code-before| described p.~\pageref{code-before}.}
%
-% \smallskip
-% \textbf{If Tikz is loaded}\footnote{We remind that, since the version 3.13,
-% \pkg{nicematrix} doesn't load Tikz by default but only \textsc{pgf} (Tikz is a
-% layer over \textsc{pfg}).}, one may access to that nodes with classical Tikz
-% instructions. The nodes should be designed as $i$-$j$ (without the prefix
-% corresponding to the name of the environment).
-%
-% Moreover, a special command, called |\line|, is available to draw directly
-% dotted lines between nodes. It may be used, for example, to draw a dotted line
+% A special command, called |\line|, is available to draw directly
+% dotted lines between nodes. It takes two arguments for the two cells to rely,
+% both of the form $i$-$j$ where is the number of row and $j$ is the number of
+% column. It may be used, for example, to draw a dotted line
% between two adjacents cells. \label{line-in-code-after}
%
% \medskip
@@ -949,823 +1796,49 @@ version 2005/12/01 or later.
% p.~\pageref{example-CodeAfter}.
%
%
-% \section{The environments \{NiceArray\} and \{NiceTabular\}}
-% \label{NiceArray}
-%
-% The environments |{NiceArray}| and |{NiceTabular}| are similar to the
-% environments |{array}| and |{tabular}|. The mandatory argument is the preamble
-% of the array. However, for technical reasons, in this preamble, the user must
-% use the letters |L|, |C| and~|R|\footnote{The column types |L|, |C| and |R|
-% are defined locally inside |{NiceArray}| with |\newcolumntype| of \pkg{array}.
-% This definition overrides an eventual previous definition.} instead of |l|,
-% |c| and |r|. In a command |\multicolumn|, one should also use the letters |L|,
-% |C|, |R|.
-%
-% It's possible to use the constructions |p{...}|, |m{...}|, |b{...}|,
-% |w{...}{...}|, |W{...}{...}|, "|", |>{...}|, |<{...}|, |@{...}|, |!{...}| and
-% |*{n}{...}|. However, in the environment |{NiceArray}| (and its variants), the
-% content of the columns of type |w| or |W| is composed in math mode (in
-% |{array}| of \pkg{array}, they are composed in text mode).
-%
-% \bigskip
-% The package \pkg{nicematrix} provides also the variants |{pNiceArray}|,
-%|{vNiceArray}|, |{VNiceArray}|, |{bNiceArray}| and |{BNiceArray}|.
-%
-% \bigskip
-% Of course, one of the benefits of |{pNiceArray}| over |{pNiceMatrix}| is the
-% possibility of drawing vertical rules:
-%
-%\bigskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
-% $\left[\begin{NiceArray}{CCCC|C}
-% a_1 & ? & \Cdots & ? & ? \\
-% 0 & & \Ddots & \Vdots & \Vdots\\
-% \Vdots & \Ddots & \Ddots & ? \\
-% 0 & \Cdots & 0 & a_n & ?
-% \end{NiceArray}\right]$
-% \end{BVerbatim}
-% $\left[\begin{NiceArray}{CCCC|C}
-% a_1 & ? & \Cdots & ? & ? \\
-% 0 & & \Ddots & \Vdots & \Vdots\\
-% \Vdots & \Ddots & \Ddots & ? \\
-% 0 & \Cdots & 0 & a_n & ?
-% \end{NiceArray}\right]$
-%
-% \bigskip
-% Another benefit is the possibility of using different alignments of columns.
-%
-% \bigskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
-% $\begin{pNiceArray}{LCR}
-% a_{11} & \Cdots & a_{1n} \\
-% a_{21} & & a_{2n} \\
-% \Vdots & & \Vdots \\
-% a_{n-1,1} & \Cdots & a_{n-1,n}
-% \end{pNiceArray}$
-% \end{BVerbatim}
-% $\begin{pNiceArray}{LCR}
-% a_{11} & \Cdots & a_{1n} \\
-% a_{21} & & a_{2n} \\
-% \Vdots & & \Vdots \\
-% a_{n-1,1} & \Cdots & a_{n-1,n}
-% \end{pNiceArray}$
-%
-%
-% \bigskip
-% In fact, the environment |{pNiceArray}| and its variants are based upon a
-% more general environment, called |{NiceArrayWithDelims}|. The first two
-% mandatory arguments of this environment are the left and right delimiters used
-% in the construction of the matrix. It's possible to use
-% |{NiceArrayWithDelims}| if we want to use atypical or asymetrical delimiters.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% $\begin{~emphase#NiceArrayWithDelims@}
-% {\downarrow}{\uparrow}{CCC}[margin]
-% 1 & 2 & 3 \\
-% 4 & 5 & 6 \\
-% 7 & 8 & 9
-% \end{~emphase#NiceArrayWithDelims@}$
-% \end{BVerbatim}
-% $\begin{NiceArrayWithDelims}
-% {\downarrow}{\uparrow}{CCC}[margin]
-% 1 & 2 & 3 \\
-% 4 & 5 & 6 \\
-% 7 & 8 & 9
-% \end{NiceArrayWithDelims}$
-%
-%
-% \bigskip
-% \section{The vertical position of the arrays}
-%
-% The package \pkg{nicematrix} provides a option |baseline| for the vertical
-% position of the arrays. This option takes as value an integer which is the
-% number of the row on which the array will be aligned.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
-% $A = \begin{pNiceMatrix}[~emphase#baseline=2@]
-% \frac{1}{\sqrt{1+p^2}} & p & 1-p \\
-% 1 & 1 & 1 \\
-% 1 & p & 1+p
-% \end{pNiceMatrix}$
-% \end{BVerbatim}
-% $A = \begin{pNiceMatrix}[baseline=2]
-% \frac{1}{\sqrt{1+p^2}} & p & 1-p \\
-% 1 & 1 & 1 \\
-% 1 & p & 1+p
-% \end{pNiceMatrix}$
-%
-%
-% \medskip
-% It's also possible to use the option |baseline| with one of the special values
-% |t|, |c| or |b|. These letters may also be used absolutely like the option of
-% the environment |{array}| of \pkg{array}. The initial value of |baseline| is~|c|.
-%
-%
-% \medskip
-% In the following example, we use the option |t| (equivalent to |baseline=t|)
-% immediately after an |\item| of list. One should remark that the presence of
-% a |\hline| at the beginning of the array doesn't prevent the alignment of the
-% baseline with the baseline of the first row (with |{array}| of \pkg{array},
-% one must use |\firsthline|\footnote{It's also possible to use |\firsthline|
-% with |{NiceArray}|.}).
-%
-% \smallskip
-% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
-% \begin{enumerate}
-% \item an item
-% \smallskip
-% \item \renewcommand{\arraystretch}{1.2}
-% $\begin{NiceArray}~emphase#[t]@{LCCCCCC}
-% \hline
-% n & 0 & 1 & 2 & 3 & 4 & 5 \\
-% u_n & 1 & 2 & 4 & 8 & 16 & 32
-% \hline
-% \end{NiceArray}$
-% \end{enumerate}
-% \end{BVerbatim}
-% \begin{minipage}{5cm}
-% \begin{enumerate}
-% \item an item
-% \smallskip
-% \item \renewcommand{\arraystretch}{1.2}
-% $\begin{NiceArray}[t]{LCCCCCC}
-% \hline
-% n & 0 & 1 & 2 & 3 & 4 & 5 \\
-% u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
-% \hline
-% \end{NiceArray}$
-% \end{enumerate}
-% \end{minipage}
-%
-% \medskip
-% However, it's also possible to use the tools of \pkg{booktabs}: |\toprule|,
-% |\bottomrule| and |\midrule|.\par\nobreak
-%
-% \smallskip
-% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
-% \begin{enumerate}
-% \item an item
-% \smallskip
-% \item
-% $\begin{NiceArray}[t]{LCCCCCC}
-% ~emphase#\toprule@
-% n & 0 & 1 & 2 & 3 & 4 & 5 \\
-% ~emphase#\midrule@
-% u_n & 1 & 2 & 4 & 8 & 16 & 32
-% ~emphase#\bottomrule@
-% \end{NiceArray}$
-% \end{enumerate}
-% \end{BVerbatim}
-% \begin{minipage}{5cm}
-% \begin{enumerate}
-% \item an item
-% \smallskip
-% \item
-% $\begin{NiceArray}[t]{LCCCCCC}
-% \toprule
-% n & 0 & 1 & 2 & 3 & 4 & 5 \\
-% \midrule
-% u_n & 1 & 2 & 4 & 8 & 16 & 32 \\
-% \bottomrule
-% \end{NiceArray}$
-% \end{enumerate}
-% \end{minipage}
-%
-%
-% \bigskip
-% \section{The exterior rows and columns}
-% The options |first-row|, |last-row|, |first-col| and |last-col| allow the
-% composition of exterior rows and columns in the environments of
-% \pkg{nicematrix}.
-% \label{exterior}
-%
-% A potential ``first row'' (exterior) has the number $0$ (and not $1$). Idem
-% for the potential ``first column''.
-%
-% \begin{Verbatim}
-% $\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@]
-% $\begin{pNiceMatrix}[~emphase#first-row,last-row,first-col,last-col@,nullify-dots]
-% & C_1 & \Cdots & & C_4 & \\
-% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
-% & a_{31} & a_{32} & a_{33} & a_{34} & \\
-% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
-% & C_1 & \Cdots & & C_4 &
-% \end{pNiceMatrix}$
-% \end{pNiceMatrix}$
-% \end{Verbatim}
-%
-% \[\begin{pNiceMatrix}[first-row,last-row,first-col,last-col,nullify-dots]
-% & C_1 & \Cdots & & C_4 & \\
-% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
-% & a_{31} & a_{32} & a_{33} & a_{34} & \\
-% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
-% & C_1 & \Cdots & & C_4 &
-% \end{pNiceMatrix}\]
-%
-%
-% \bigskip
-% We have several remarks to do.
-% \begin{itemize}
-% \item For the environments with an explicit preamble (i.e. |{NiceArray}| and
-% its variants), no letter must be given in that preamble for the potential
-% first column and the potential last column: they will automatically (and
-% necessarily) be of type |R| for the first column and |L| for the last one.
-% \item One may wonder how \pkg{nicematrix} determines the number of rows and
-% columns which are needed for the composition of the ``last row'' and ``last
-% column''.
-% \begin{itemize}
-% \item For the environments with explicit preamble, like |{NiceTabular}| and
-% |{pNiceArray}|, the number of columns can obviously be computed from the
-% preamble.
-%
-% \item When the option |light-syntax| (cf. p. \pageref{light-syntax}) is used,
-% \pkg{nicematrix} has, in any case, to load the whole body of the environment
-% (and that's why it's not possible to put verbatim material in the array with
-% the option |light-syntax|). The analysis of this whole body gives the number
-% of rows (but not the number of columns).
-%
-% \item In the other cases, \pkg{nicematrix} compute the number of rows and
-% columns during the first compilation and write the result in the |aux| file
-% for the next run.
-%
-% \textsl{However, it's possible to provide the number of the last row and the
-% number of the last column as values of the options |last-row| and |last-col|,
-% tending to an acceleration of the whole compilation of the document.} That's
-% what we will do throughout the rest of the document.
-% \end{itemize}
-% \end{itemize}
-%
-% \bigskip
-% It's possible to control the appearance of these rows and columns with options
-% |code-for-first-row|, |code-for-last-row|, |code-for-first-col| and
-% |code-for-last-col|. These options
-% specify tokens that will be inserted before each cell of the corresponding row
-% or column.
-%
-%
-% \begin{Verbatim}
-% \NiceMatrixOptions{~emphase#code-for-first-row@ = \color{red},
-% ~emphase#code-for-first-col@ = \color{blue},
-% ~emphase#code-for-last-row@ = \color{green},
-% ~emphase#code-for-last-col@ = \color{magenta}}
-% $\begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
-% & C_1 & \Cdots & & C_4 & \\
-% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
-% \hline
-% & a_{31} & a_{32} & a_{33} & a_{34} & \\
-% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
-% & C_1 & \Cdots & & C_4 &
-% \end{pNiceArray}$
-% \end{Verbatim}
-%
-% \begin{scope}
-% \NiceMatrixOptions{code-for-first-row = \color{red},
-% code-for-first-col = \color{blue},
-% code-for-last-row = \color{green},
-% code-for-last-col = \color{magenta}}
-% \begin{displaymath}
-% \begin{pNiceArray}{CC|CC}[first-row,last-row=5,first-col,last-col,nullify-dots]
-% & C_1 & \multicolumn1C{\Cdots} & & C_4 & \\
-% L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\
-% \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\
-% \hline
-% & a_{31} & a_{32} & a_{33} & a_{34} & \\
-% L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\
-% & C_1 & \multicolumn1C{\Cdots} & & C_4 &
-% \end{pNiceArray}
-% \end{displaymath}
-% \end{scope}
-%
-%
-% \emph{Remarks}
-% \begin{itemize}[beginpenalty=10000]
-% \item As shown in the previous example, an horizontal rule (drawn by |\hline|)
-% doesn't extend in the exterior columns and a vertical rule (specified by a
-% ``\verb+|+'' in the preamble of the array) doesn't extend in the exterior
-% rows.\footnote{The latter is not true when the package \pkg{arydshln} is
-% loaded besides \pkg{nicematrix}. In fact, \pkg{nicematrix} and \pkg{arydhsln}
-% are not totally compatible because \pkg{arydshln} redefines many internals of
-% \pkg{array}. On another hand, if one really wants a vertical rule running in
-% the first and in the last row, he should use |!{\vline}| instead of \verb+|+
-% in the preamble of the array.}
-%
-% If one wishes to define new specifiers for columns in order to draw vertical
-% rules (for example thicker than the standard rules), he should consider the
-% command |\OnlyMainNiceMatrix| described on page~\pageref{OnlyMainNiceMatrix}.
-%
-% \item A specification of color present in |code-for-first-row| also applies to
-% a dotted line draw in this exterior ``first row'' (excepted if a value has
-% been given to |xdots/color|). Idem for the other exterior rows and columns.
-%
-% \item Logically, the potential option |columns-width| (described
-% p.~\pageref{width}) doesn't apply to the ``first column'' and ``last column''.
-% \item For technical reasons, it's not possible to use the option of the
-% command |\\| after the ``first row'' or before the ``last row'' (the placement
-% of the delimiters would be wrong).
-% \end{itemize}
-%
%
%
+% \section{Other features}
%
+% \subsection{Use of the column type S of siunitx}
%
-% \section{The dotted lines to separate rows or columns}
-%
-%
-% In the environments of the package \pkg{nicematrix}, it's possible to use
-% the command |\hdottedline| (provided by \pkg{nicematrix}) which is a
-% counterpart of the classical commands |\hline| and |\hdashline| (the latter is
-% a command of \pkg{arydshln}).
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
-% \begin{pNiceMatrix}
-% 1 & 2 & 3 & 4 & 5 \\
-% ~emphase#\hdottedline@
-% 6 & 7 & 8 & 9 & 10 \\
-% 11 & 12 & 13 & 14 & 15
-% \end{pNiceMatrix}
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}
-% 1 & 2 & 3 & 4 & 5 \\
-% \hdottedline
-% 6 & 7 & 8 & 9 & 10 \\
-% 11 & 12 & 13 & 14 & 15
-% \end{pNiceMatrix}$
-%
-%
-% \bigskip
-% In the environments with an explicit preamble (like |{NiceArray}|, etc.), it's
-% possible to draw a vertical dotted line with the specifier ``|:|''.
+% If the package \pkg{siunitx} is loaded (before or after \pkg{nicematrix}),
+% it's possible to use the |S| column type of \pkg{siunitx} in the environments
+% of \pkg{nicematrix}. The implementation doesn't use explicitly any private
+% macro of \pkg{siunitx}.
%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
-% \left(\begin{NiceArray}{CCCC~emphase#:@C}
-% 1 & 2 & 3 & 4 & 5 \\
-% 6 & 7 & 8 & 9 & 10 \\
-% 11 & 12 & 13 & 14 & 15
-% \end{NiceArray}\right)
-% \end{BVerbatim}
-% $\left(\begin{NiceArray}{CCCC:C}
-% 1 & 2 & 3 & 4 & 5 \\
-% 6 & 7 & 8 & 9 & 10 \\
-% 11 & 12 & 13 & 14 & 15
-% \end{NiceArray}\right)$
-%
-%
-% \bigskip
-% These dotted lines do \emph{not} extend in the potential exterior rows and
-% columns.
-%
%
% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=9.5cm]
-% $\begin{pNiceArray}{CCC:C}[
-% first-row,last-col,
-% code-for-first-row = \color{blue}\scriptstyle,
-% code-for-last-col = \color{blue}\scriptstyle ]
-% C_1 & C_2 & C_3 & C_4 \\
-% 1 & 2 & 3 & 4 & L_1 \\
-% 5 & 6 & 7 & 8 & L_2 \\
-% 9 & 10 & 11 & 12 & L_3 \\
-% \hdottedline
-% 13 & 14 & 15 & 16 & L_4
+% \begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
+% $\begin{pNiceArray}{~emphase#S@CWc{1cm}C}[nullify-dots,first-row]
+% {C_1} & \Cdots & & C_n \\
+% 2.3 & 0 & \Cdots & 0 \\
+% 12.4 & \Vdots & & \Vdots \\
+% 1.45 \\
+% 7.2 & 0 & \Cdots & 0
% \end{pNiceArray}$
% \end{BVerbatim}
-% $\begin{pNiceArray}{CCC:C}[
-% first-row,last-col,
-% code-for-first-row = \color{blue}\scriptstyle,
-% code-for-last-col = \color{blue}\scriptstyle ]
-% C_1 & C_2 & C_3 & C_4 \\
-% 1 & 2 & 3 & 4 & L_1 \\
-% 5 & 6 & 7 & 8 & L_2 \\
-% 9 & 10 & 11 & 12 & L_3 \\
-% \hdottedline
-% 13 & 14 & 15 & 16 & L_4
+% $\begin{pNiceArray}{SCWc{1cm}C}[nullify-dots,first-row]
+% {C_1} & \Cdots & & C_n \\
+% 2.3 & 0 & \Cdots & 0 \\
+% 12.4 & \Vdots & & \Vdots \\
+% 1.45 \\
+% 7.2 & 0 & \Cdots & 0
% \end{pNiceArray}$
%
-% \bigskip
-% It's possible to change in \pkg{nicematrix} the letter used to specify a
-% vertical dotted line with the option |letter-for-dotted-lines| available in
-% |\NiceMatrixOptions|.
-%
-% \bigskip
-% \emph{Remark} : In the package \pkg{array} (on which the package
-% \pkg{nicematrix} relies), horizontal and vertical rules make the array larger
-% or wider by a quantity equal to the width of the rule\footnote{In fact, this
-% is true only for |\hline| and ``"|"'' but not for |\cline|.}. In
-% \pkg{nicematrix}, the dotted lines drawn by |\hdottedline| and ``|:|'' do
-% likewise.
-%
-%
-%
-% \section{The width of the columns}
-% \label{width}
-%
-% In the environments with an explicit preamble (like |{NiceArray}|,
-% |{pNiceArray}|, etc.), it's possible to fix the width of a given column with
-% the standard letters |w| and |W| of the package \pkg{array}. In the
-% environments of \pkg{nicematrix}, the cells of such columns are composed in
-% mathematical mode, whereas, in |{array}| of \pkg{array}, they are composed in
-% text mode.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
-% $\left(\begin{NiceArray}{~emphase#wc{1cm}@CC}
-% 1 & 12 & -123 \\
-% 12 & 0 & 0 \\
-% 4 & 1 & 2
-% \end{NiceArray}\right)$
-% \end{BVerbatim}
-% $\left(\begin{NiceArray}{wc{1cm}CC}
-% 1 & 12 & -123 \\
-% 12 & 0 & 0 \\
-% 4 & 1 & 2
-% \end{NiceArray}\right)$
-%
-%
-% \bigskip
-% In the environments of \pkg{nicematrix}, it's also possible to fix the \emph{minimal}
-% width of all the columns of a matrix directly with the option |columns-width|.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
-% $\begin{pNiceMatrix}[~emphase#columns-width = 1cm@]
-% 1 & 12 & -123 \\
-% 12 & 0 & 0 \\
-% 4 & 1 & 2
-% \end{pNiceMatrix}$
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}[columns-width = 1cm]
-% 1 & 12 & -123 \\
-% 12 & 0 & 0 \\
-% 4 & 1 & 2
-% \end{pNiceMatrix}$
-%
-% \medskip
-% Note that the space inserted between two columns (equal to 2 |\arraycolsep|)
-% is not suppressed (of course, it's possible to suppress this space by setting
-% |\arraycolsep| equal to $0$~pt).
-%
-% \bigskip
-% It's possible to give the special value |auto| to the option |columns-width|:
-% all the columns of the array will have a width equal to the widest cell of
-% the array.\footnote{The result is achieved with only one compilation (but Tikz
-% will have written informations in the |.aux| file and a message requiring a
-% second compilation will appear).}\par\nobreak
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10cm]
-% $\begin{pNiceMatrix}[~emphase#columns-width = auto@]
-% 1 & 12 & -123 \\
-% 12 & 0 & 0 \\
-% 4 & 1 & 2
-% \end{pNiceMatrix}$
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}[columns-width = auto]
-% 1 & 12 & -123 \\
-% 12 & 0 & 0 \\
-% 4 & 1 & 2
-% \end{pNiceMatrix}$
-%
-% \bigskip
-% Without surprise, it's possible to fix the minimal width of the columns of all
-% the matrices of a current scope with the command
-% |\NiceMatrixOptions|.\par\nobreak
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
-% ~emphase#\NiceMatrixOptions{columns-width=10mm}@
-% $\begin{pNiceMatrix}
-% a & b \\ c & d
-% \end{pNiceMatrix}
-% =
-% \begin{pNiceMatrix}
-% 1 & 1245 \\ 345 & 2
-% \end{pNiceMatrix}$
-% \end{BVerbatim}
-% \begin{scope}
-% \NiceMatrixOptions{columns-width=10mm}
-% $\begin{pNiceMatrix}
-% a & b \\
-% c & d
-% \end{pNiceMatrix}
-% =
-% \begin{pNiceMatrix}
-% 1 & 1245 \\
-% 345 & 2
-% \end{pNiceMatrix}$
-% \end{scope}
-%
-%
-% \bigskip
-% But it's also possible to fix a zone where all the matrices will have their
-% columns of the same width, equal to the widest cell of all the matrices. This
-% construction uses the environment |{NiceMatrixBlock}| with the option
-% |auto-columns-width|\footnote{At this time, this is the only usage of the
-% environment |{NiceMatrixBlock}| but it may have other usages in the future.}.
-% The environment |{NiceMatrixBlock}| has no direct link with the command
-% |\Block| presented just below (cf.~p.~\pageref{Block}).
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=8.5cm]
-% ~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@
-% $\begin{pNiceMatrix}
-% a & b \\ c & d
-% \end{pNiceMatrix}
-% =
-% \begin{pNiceMatrix}
-% 1 & 1245 \\ 345 & 2
-% \end{pNiceMatrix}$
-% ~emphase#\end{NiceMatrixBlock}@
-% \end{BVerbatim}
-% \begin{NiceMatrixBlock}[auto-columns-width]
-% $\begin{pNiceMatrix}
-% a & b \\ c & d
-% \end{pNiceMatrix}
-% =
-% \begin{pNiceMatrix}
-% 1 & 1245 \\ 345 & 2
-% \end{pNiceMatrix}$
-% \end{NiceMatrixBlock}
-%
-% \medskip
-% \textbf{Several compilations may be necessary to achieve the job.}
-%
-%
-% \section{Block matrices}
-% \label{Block}
-%
-% This section has no direct link with the previous one where an environment
-% |{NiceMatrixBlock}| was introduced.
-%
-% In the environments of \pkg{nicematrix}, it's possible to use the command
-% |\Block| in order to place an element in the center of a rectangle of merged
-% cells of the array.
-%
-% The command |\Block| must be used in the upper leftmost cell of the array with
-% two arguments. The first argument is the size of the block with the syntax
-% $i$\verb|-|$j$ where $i$ is the number of rows of the block and $j$ its number
-% of columns. The second argument is the content of the block (composed in math
-% mode). A Tikz node corresponding to the merged cells is created with the name
-% ``$i$-$j$-block''. If the user has required the creation of the ``medium
-% nodes'', a node of this type is also created with a name suffixed by
-% |-medium|.
-%
-% \medskip
-% In the following examples, we use the command |\arrayrulecolor| of
-% \pkg{colortbl}.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
-% \arrayrulecolor{blue}
-% $\begin{bNiceArray}{CCC|C}[margin]
-% ~emphase#\Block{3-3}{A}@ & & & 0 \\
-% & \hspace*{1cm} & & \Vdots \\
-% & & & 0 \\
-% \hline
-% 0 & \Cdots& 0 & 0
-% \end{bNiceArray}$
-% \arrayrulecolor{black}
-% \end{BVerbatim}
-% \begin{scope}
-% \arrayrulecolor{blue}
-% $\begin{bNiceArray}{CCC|C}[margin]
-% \Block{3-3}{A} & & & 0 \\
-% & \hspace*{1cm} & & \Vdots \\
-% & & & 0 \\
-% \hline
-% 0 & \Cdots& 0 & 0
-% \end{bNiceArray}$
-% \arrayrulecolor{black}
-% \end{scope}
-%
-% \bigskip
-% One may wish to raise the size of the ``$A$'' placed in the block of the
-% previous example. Since this element is composed in math mode, it's not
-% possible to use directly a command like |\large|, |\Large| and |\LARGE|.
-% That's why the command |\Block| provides an option between angle brackets to
-% specify some TeX code which will be inserted before the beginning of the
-% math mode.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
-% \arrayrulecolor{blue}
-% $\begin{bNiceArray}{CCC|C}[margin]
-% \Block{3-3}~emphase#<\Large>@{A} & & & 0 \\
-% & \hspace*{1cm} & & \Vdots \\
-% & & & 0 \\
-% \hline
-% 0 & \Cdots& 0 & 0
-% \end{bNiceArray}$
-% \arrayrulecolor{black}
-% \end{BVerbatim}
-% \begin{scope}
-% \arrayrulecolor{blue}
-% $\begin{bNiceArray}{CCC|C}[margin]
-% \Block{3-3}<\Large>{A} & & & 0 \\
-% & \hspace*{1cm} & & \Vdots \\
-% & & & 0 \\
-% \hline
-% 0 & \Cdots& 0 & 0
-% \end{bNiceArray}$
-% \arrayrulecolor{black}
-% \end{scope}
-%
-% \medskip
-% For technical reasons, you can't write |\Block{|$i$|-|$j$|}{<}|. But you can
-% write |\Block{|$i$|-|$j$|}<>{<}| with the expected result.
-%
-%
-% \section{The color of the rows and columns}
-%
-% With the classical package \pkg{colortbl}, it's possible to color the cells,
-% rows and columns of a tabular. However, the resulting \textsc{pdf} is not
-% always perfectly displayed by the \textsc{pdf} viewers, in particular in
-% conjonction with rules. With some \textsc{pdf} viewers, some vertical rules
-% seem to vanish. On the other side, some thin horizontal white lines may appear
-% in some circonstances.
-%
-%
-% \medskip
-% The version 4.0 of \pkg{nicematrix} provide similar tools which do not
-% present these drawbacks. This version provides a key |code-before| for some
-% code which will be executed \emph{before} the drawing of the tabular. In this
-% |code-before|, new commands are available: |\cellcolor|, |\rectanglecolor|,
-% |\rowcolor|, |\columncolor|, |\rowcolors| and |\chessboardcolors|.
-%
% \medskip
-% \begin{itemize}
-% \item The command |\cellcolor| takes its name from the command |\cellcolor| of
-% \pkg{colortbl}.
-%
-% This command takes in arguments a color and a list of cells, each of which
-% with the format $i$-$j$ where $i$ is the number of row and $j$ the number of
-% colummn of the cell.
-%
-%
-% \medskip
-% \begin{scope}
-% \hfuzz=10cm
-% \begin{BVerbatim}[boxwidth=10cm,baseline=c]
-% \begin{NiceTabular}{|C|C|C|}[code-before = ~emphase#\cellcolor{red!15}{3-1,2-2,1-3}@]
-% \hline
-% a & b & c \\ \hline
-% e & f & g \\ \hline
-% h & i & j \\ \hline
-% \end{NiceTabular}
-% \end{BVerbatim}
-% \begin{NiceTabular}{|C|C|C|}[code-before = \cellcolor{red!15}{3-1,2-2,1-3}]
-% \hline
-% a & b & c \\ \hline
-% e & f & g \\ \hline
-% h & i & j \\ \hline
-% \end{NiceTabular}
-% \end{scope}
-%
-% \bigskip
-% \item The command |\rectanglecolor| takes three arguments. The first is the
-% color. The second is the upper-left cell of the rectangle and the third is
-% the lower-right cell of the rectangle.
-%
-% \medskip
-% \begin{scope}
-% \hfuzz=10cm
-% \begin{BVerbatim}[boxwidth=10cm,baseline=c]
-% \begin{NiceTabular}{|C|C|C|}[code-before = ~emphase#\rectanglecolor{red!15}{2-2}{3-3}@]
-% \hline
-% a & b & c \\ \hline
-% e & f & g \\ \hline
-% h & i & j \\ \hline
-% \end{NiceTabular}
-% \end{BVerbatim}
-% \begin{NiceTabular}{|C|C|C|}[code-before = \rectanglecolor{red!15}{2-2}{3-3}]
-% \hline
-% a & b & c \\ \hline
-% e & f & g \\ \hline
-% h & i & j \\ \hline
-% \end{NiceTabular}
-% \end{scope}
-%
-%
-%
-% \bigskip
-% \item The command |\rowcolor| takes its name from the command |\rowcolor| of
-% \pkg{colortbl}. Its first argument is the color and the second is a
-% comma-separated list of rows or interval of rows with the form $a$-$b$ (an
-% interval of the form $a$- represent all the rows from the row $a$ until the end).
-%
-% \medskip
-% \begin{scope}
-% \hfuzz = 10cm
-% \begin{BVerbatim}[boxwidth=9cm,baseline=c]
-% $\begin{NiceArray}{LLL}[hvlines, ~emphase#code-before = \rowcolor{red!15}{1,3-5,8-}@]
-% a_1 & b_1 & c_1 \\
-% a_2 & b_2 & c_2 \\
-% a_3 & b_3 & c_3 \\
-% a_4 & b_4 & c_4 \\
-% a_5 & b_5 & c_5 \\
-% a_6 & b_6 & c_6 \\
-% a_7 & b_7 & c_7 \\
-% a_8 & b_8 & c_8 \\
-% a_9 & b_9 & c_9 \\
-% a_{10} & b_{10} & c_{10} \\
-% \end{NiceArray}$
-% \end{BVerbatim}
-% $\begin{NiceArray}{LLL}[baseline=4,hvlines, code-before = \rowcolor{red!15}{1,3-5,8-}]
-% a_1 & b_1 & c_1 \\
-% a_2 & b_2 & c_2 \\
-% a_3 & b_3 & c_3 \\
-% a_4 & b_4 & c_4 \\
-% a_5 & b_5 & c_5 \\
-% a_6 & b_6 & c_6 \\
-% a_7 & b_7 & c_7 \\
-% a_8 & b_8 & c_8 \\
-% a_9 & b_9 & c_9 \\
-% a_{10} & b_{10} & c_{10} \\
-% \end{NiceArray}$
-% \end{scope}
-%
-%
-% \bigskip
-% \item The command |\columncolor| takes its name from the command
-% |\columncolor| of \pkg{colortbl}. Its syntax is similar to the syntaxe of
-% |\rowcolor|.
-%
-% \bigskip
-% \item The command |\rowcolors| (with a \emph{s}) takes its name from the
-% command |\rowcolors| of \pkg{xcolor}. The \emph{s} emphasizes the fact that
-% there is \emph{two} colors. This command colors alternately the rows of the
-% tabular, beginning with the row whose number is given in first argument. The
-% two other arguments are the colors.
-%
-% \medskip
-% \begin{scope}
-% \hfuzz=10cm
-% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
-% \begin{NiceTabular}{LR}%
-% [~emphase#code-before = \rowcolor{red!15}{1} \rowcolors{3}{blue!10}{}@]
-% \toprule
-% Town & Habitants \\
-% \midrule
-% Pau & 80000 \\
-% Paris & 2000000 \\
-% Toulouse & 700000 \\
-% Reims & 40000 \\
-% \bottomrule
-% \end{NiceTabular}
-% \end{BVerbatim}
-% \begin{NiceTabular}{LR}[code-before =\rowcolor{red!15}{1} \rowcolors{3}{blue!10}{}]
-% \toprule
-% Ville & habitants \\
-% \midrule
-% Pau & 80000 \\
-% Paris & 2000000 \\
-% Toulouse & 700000 \\
-% Reims & 40000 \\
-% \bottomrule
-% \end{NiceTabular}
-% \end{scope}
-%
-% \bigskip
-% \item The command |\chessboardcolors| take in arguments two colors and colors
-% the cells of the tabular in quincunx with these colors.
-%
-% \medskip
-% \begin{scope}
-% \hfuzz=10cm
-% \begin{BVerbatim}[baseline=c,boxwidth=9cm]
-% $\begin{pNiceMatrix}[R,margin, ~emphase#code-before=\chessboardcolors{red!15}{blue!15}@]
-% 1 & -1 & 1 \\
-% -1 & 1 & -1 \\
-% 1 & -1 & 1
-% \end{pNiceMatrix}$
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}[R,baseline=1, margin, code-before = \chessboardcolors{red!15}{blue!15}]
-% 1 & -1 & 1 \\
-% -1 & 1 & -1 \\
-% 1 & -1 & 1
-% \end{pNiceMatrix}$
-% \end{scope}
-%
-% \end{itemize}
-%
+% On the other hand, the |d| columns of the package \pkg{dcolumn} are not
+% supported by \pkg{nicematrix}.
%
-%
-% \section{Advanced features}
%
+% \subsection{Alignement option in \{NiceMatrix\}}
%
-% \subsection{Alignement option in NiceMatrix}
+% \label{key-R}
%
% The environments without preamble (|{NiceMatrix}|, |{pNiceMatrix}|,
% |{bNiceMatrix}|, etc.) provide two options |l| and |r| (equivalent at |L| and
% |R|) which generate all the columns aligned leftwards (or
-% rightwards).\footnote{This is a part of the functionality provided by the
-% environments |{pmatrix*}|, |{bmatrix*}|, etc. of \pkg{mathtools}.}
+% rightwards).
%
%
% \medskip
@@ -1780,6 +1853,11 @@ version 2005/12/01 or later.
% \sin x & \cos x
% \end{bNiceMatrix}$
%
+% \medskip
+% There is also a key |S| which sets all the columns all type |S| of
+% \pkg{siunitx} (if this package is loaded).\footnote{This is a part of the
+% functionality provided by the environments |{pmatrix*}|, |{bmatrix*}|, etc. of
+% \pkg{mathtools}.}
%
% \subsection{The command \textbackslash rotate}
%
@@ -1900,9 +1978,10 @@ version 2005/12/01 or later.
% exists) has also the number~$0$.}. Of course, the user must not change the
% value of these counters which are used internally by \pkg{nicematrix}.
%
-% In the |code-after| (cf. p. \pageref{code-after}), |iRow| represents the total
-% number of rows (excepted the potential exterior rows) and |jCol| represents
-% the total number of columns (excepted the potential exterior columns).
+% In the |code-before| (cf. p. \pageref{code-before}) and in the |code-after|
+% (cf. p. \pageref{code-after}), |iRow| represents the total number of rows
+% (excepted the potential exterior rows) and |jCol| represents the total number
+% of columns (excepted the potential exterior columns).
%
% \medskip
% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
@@ -1929,8 +2008,8 @@ version 2005/12/01 or later.
%
% \medskip
% If LaTeX counters called |iRow| and |jCol| are defined in the document by
-% packages other than \pkg{nicematrix} (or by the user), they are shadowed in
-% the environments of \pkg{nicematrix}.
+% packages other than \pkg{nicematrix} (or by the final user), they are shadowed
+% in the environments of \pkg{nicematrix}.
%
% \bigskip
% The package \pkg{nicematrix} also provides commands in order to compose
@@ -1950,98 +2029,15 @@ version 2005/12/01 or later.
% \end{Verbatim}
%
%
-% $C = \pAutoNiceMatrix{3-3}{C_{\arabic{iRow},\arabic{jCol}}}$
-%
-% \subsection{The options hlines, vlines and hvlines}
-%
-% \label{hvlines}
-% You can add horizontal rules between rows in the environments of
-% \pkg{nicematrix} with the usual command |\hline| and you can use the specifier
-% ``"|"'' to add vertical rules. However, by convenience, the package
-% \pkg{nicematrix} also provides the option |hlines| (resp. |vlines|) which will
-% draw all the horizontal (resp. vertical) rules (excepted, of course, the
-% exterior rules corresponding to the exterior rows and columns). The key
-% |hvlines| is an alias for the conjonction for the keys |hlines| et |vlines|.
-%
-% % \medskip
-% In the following example, we use the command |\arrayrulecolor| of
-% \pkg{colortbl}.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% \arrayrulecolor{blue}
-% $\begin{NiceArray}{CCCC}%
-% [~emphase#hvlines@,first-row,first-col]
-% & e & a & b & c \\
-% e & e & a & b & c \\
-% a & a & e & c & b \\
-% b & b & c & e & a \\
-% c & c & b & a & e
-% \end{NiceArray}$
-% \arrayrulecolor{black}
-% \end{BVerbatim}
-% \arrayrulecolor{blue}
-% $\begin{NiceArray}{CCCC}[hvlines,first-row,first-col]
-% & e & a & b & c \\
-% e & e & a & b & c \\
-% a & a & e & c & b \\
-% b & b & c & e & a \\
-% c & c & b & a & e
-% \end{NiceArray}$
-% \arrayrulecolor{black}
-%
-% \bigskip
-% However, there is a difference between the key |vlines| and the use of
-% the specifier ``"|"'' in the preamble of the environment: the rules drawn by
-% |vlines| completely cross the double-rules drawn by |\hline\hline|.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=11.5cm]
-% $\begin{NiceArray}{CCCC}[vlines] \hline
-% a & b & c & d \\ \hline \hline
-% 1 & 2 & 3 & 4 \\
-% 1 & 2 & 3 & 4 \\ \hline
-% \end{NiceArray}$
-% \end{BVerbatim}
-% $\begin{NiceArray}{CCCC}[vlines]
-% \hline
-% a & b & c & d \\
-% \hline \hline
-% 1 & 2 & 3 & 4 \\
-% 1 & 2 & 3 & 4 \\
-% \hline
-% \end{NiceArray}$
-%
-% \bigskip
-% For the environments with delimiters (for example |{pNiceArray}| or
-% |{pNiceMatrix}|), the option |vlines| don't draw vertical rules on both sides,
-% where are the delimiters (fortunately).
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
-% \setlength{\arrayrulewidth}{0.2pt}
-% $\begin{pNiceMatrix}[vlines]
-% 1 & 2 & 3 & 4 & 5 & 6 \\
-% 1 & 2 & 3 & 4 & 5 & 6 \\
-% 1 & 2 & 3 & 4 & 5 & 6
-% \end{pNiceMatrix}$
-% \end{BVerbatim}
-% \begin{scope}
-% \setlength{\arrayrulewidth}{0.2pt}
-% $\begin{pNiceMatrix}[vlines]
-% 1 & 2 & 3 & 4 & 5 & 6 \\
-% 1 & 2 & 3 & 4 & 5 & 6 \\
-% 1 & 2 & 3 & 4 & 5 & 6
-% \end{pNiceMatrix}$
-% \end{scope}
+% \[C = \pAutoNiceMatrix{3-3}{C_{\arabic{iRow},\arabic{jCol}}}\]
%
%
% \subsection{The option light-syntax}
%
% \label{light-syntax}
-% The option |light-syntax|\footnote{This option is inspired by the package
-% \pkg{spalign} of Joseph Rabinoff.} allows the user to compose the arrays with a
-% lighter syntax, which gives a more readable TeX source.
+% The option |light-syntax| (inpired by the package \pkg{spalign}) allows the
+% user to compose the arrays with a lighter syntax, which gives a better
+% legibility of the TeX source.
%
% When this option is used, one should use the semicolon for the end of a row
% and spaces or tabulations to separate the columns. However, as usual in the
@@ -2080,36 +2076,419 @@ version 2005/12/01 or later.
% analyzed. The environment doesn't behave in that case as a standard
% environment of LaTeX which only put TeX commands before and after the content.}
%
-% \subsection{Use of the column type S of siunitx}
%
-% If the package \pkg{siunitx} is loaded (before or after \pkg{nicematrix}),
-% it's possible to use the |S| column type of \pkg{siunitx} in the environments
-% of \pkg{nicematrix}. The implementation doesn't use explicitly any private
-% macro of \pkg{siunitx}.
+%
+% \subsection{The environment \{NiceArrayWithDelims\}}
+%
+% In fact, the environment |{pNiceArray}| and its variants are based upon a
+% more general environment, called |{NiceArrayWithDelims}|. The first two
+% mandatory arguments of this environment are the left and right delimiters used
+% in the construction of the matrix. It's possible to use
+% |{NiceArrayWithDelims}| if we want to use atypical or asymetrical delimiters.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
+% $\begin{~emphase#NiceArrayWithDelims@}
+% {\downarrow}{\uparrow}{CCC}[margin]
+% 1 & 2 & 3 \\
+% 4 & 5 & 6 \\
+% 7 & 8 & 9
+% \end{~emphase#NiceArrayWithDelims@}$
+% \end{BVerbatim}
+% $\begin{NiceArrayWithDelims}
+% {\downarrow}{\uparrow}{CCC}[margin]
+% 1 & 2 & 3 \\
+% 4 & 5 & 6 \\
+% 7 & 8 & 9
+% \end{NiceArrayWithDelims}$
+%
+%
+%
+% \section{Utilisation of Tikz with nicematrix}
%
+% \label{name}
+% \subsection{The nodes corresponding to the contents of the cells}
+%
+% The package \pkg{nicematrix} creates a PGF/Tikz node for each (non-empty) cell
+% of the considered array. These nodes are used to draw the dotted lines between
+% the cells of the matrix (inter alia).
+%
+% \smallskip
+% The nodes of a document must have distinct names. That's why the names of the
+% nodes created by \pkg{nicematrix} contains the number of the current
+% environment. Indeed, the environments of \pkg{nicematrix} are numbered by a
+% internal global counter.
+%
+% \smallskip
+% In the environment with the number $n$, the node of the row $i$ and
+% column~$j$ has for name |nm-|$n$|-|$i$|-|$j$.
+%
+% \smallskip
+% The command |\NiceMatrixLastEnv| provides the number of the last environment
+% of \pkg{nicematrix} (for LaTeX, it's a ``fully expandable'' command and not a
+% counter).
+%
+% \smallskip
+% However, it's advisable to use instead the key |name|. This key gives a name
+% to the current environment. When the environment has a name, the nodes are
+% accessible with the name ``\textsl{name}-$i$-$j$'' where \textsl{name} is the
+% name given to the array and $i$ and $j$ the numbers of row and column. It's
+% possible to use these nodes with \textsc{pgf} but the final user will
+% probably prefer to use Tikz (which is a convenient layer upon \textsc{pgf}).
+% However, one should remind that \pkg{nicematrix} doesn't load Tikz by default.
%
+% \bigskip
+% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
+% $\begin{pNiceMatrix}[name=~emphase#mymatrix@]
+% 1 & 2 & 3 \\
+% 4 & 5 & 6 \\
+% 7 & 8 & 9
+% \end{pNiceMatrix}$
+% \tikz[remember picture,overlay]
+% \draw ~emphase#(mymatrix-2-2)@ circle (2mm) ;
+% \end{BVerbatim}
+% $\begin{pNiceMatrix}[name=mymatrix]
+% 1 & 2 & 3 \\
+% 4 & 5 & 6 \\
+% 7 & 8 & 9
+% \end{pNiceMatrix}$
+% \tikz[remember picture,overlay]
+% \draw (mymatrix-2-2) circle (2mm) ;
+%
% \medskip
-% \begin{BVerbatim}[baseline = c, boxwidth = 10.5cm]
-% $\begin{pNiceArray}{~emphase#S@CWc{1cm}C}[nullify-dots,first-row]
-% {C_1} & \Cdots & & C_n \\
-% 2.3 & 0 & \Cdots & 0 \\
-% 12.4 & \Vdots & & \Vdots \\
-% 1.45 \\
-% 7.2 & 0 & \Cdots & 0
-% \end{pNiceArray}$
+% Don't forget the options |remember picture| and |overlay|.
+%
+% \bigskip
+% In the |code-after|, and if Tikz is loaded, the things are easier. One may
+% design the nodes with the form $i$-$j$: there is no need to indicate the
+% environment which is of course the current environment.
+%
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
+% $\begin{pNiceMatrix}
+% 1 & 2 & 3 \\
+% 4 & 5 & 6 \\
+% 7 & 8 & 9
+% \CodeAfter
+% \tikz \draw ~emphase#(2-2)@ circle (2mm) ;
+% \end{pNiceMatrix}$
% \end{BVerbatim}
-% $\begin{pNiceArray}{SCWc{1cm}C}[nullify-dots,first-row]
-% {C_1} & \Cdots & & C_n \\
-% 2.3 & 0 & \Cdots & 0 \\
-% 12.4 & \Vdots & & \Vdots \\
-% 1.45 \\
-% 7.2 & 0 & \Cdots & 0
-% \end{pNiceArray}$
+% $\begin{pNiceMatrix}
+% 1 & 2 & 3 \\
+% 4 & 5 & 6 \\
+% 7 & 8 & 9
+% \CodeAfter
+% \tikz \draw (2-2) circle (2mm) ;
+% \end{pNiceMatrix}$
+%
+%
+% \bigskip
+% In the following example, we have underlined all the nodes of the matrix (we
+% explain below the technic used : cf. p. \pageref{highlight}).
+%
+% \[\begin{pNiceMatrix}[
+% code-after = {\begin{tikzpicture}
+% [every node/.style = {blend mode = multiply,
+% fill = red!15,
+% inner sep = 0 pt }]
+% \node [fit = (1-1)] {} ;
+% \node [fit = (1-3)] {} ;
+% \node [fit = (2-2)] {} ;
+% \node [fit = (3-1)] {} ;
+% \node [fit = (3-3)] {} ;
+% \node [fit = (1-2)] {} ;
+% \node [fit = (2-1)] {} ;
+% \node [fit = (2-3)] {} ;
+% \node [fit = (3-2)] {} ;
+% \end{tikzpicture}}]
+% a & a + b & a + b + c \\
+% a & a & a + b \\
+% a & a & a
+% \end{pNiceMatrix}\]
+%
+%
%
+% \subsection{The ``medium nodes'' and the ``large nodes''}
+%
+% In fact, the package \pkg{nicematrix} can create ``extra nodes'': the ``medium
+% nodes'' and the ``large nodes''. The first ones
+% are created with the option |create-medium-nodes| and the second ones with the
+% option |create-large-nodes|.\footnote{There is also an option
+% |create-extra-nodes| which is an alias for the conjonction of
+% |create-medium-nodes| and |create-large-nodes|.}
+%
% \medskip
-% On the other hand, the |d| columns of the package \pkg{dcolumn} are not
-% supported by \pkg{nicematrix}.
+% These nodes are not used by \pkg{nicematrix} by default, and that's why they
+% are not created by default.
+%
+% \medskip
+% The names of the ``medium nodes'' are constructed by adding the suffix
+% ``|-medium|'' to the names of the ``normal nodes''. In the following example,
+% we have underlined the ``medium nodes''. We consider that this example is
+% self-explanatory.
+% \[\begin{pNiceMatrix}[
+% create-medium-nodes,
+% code-after = {\begin{tikzpicture}
+% [every node/.style = {fill = red!15,
+% blend mode = multiply,
+% inner sep = 0pt},
+% name suffix = -medium]
+% \node [fit = (1-1)] {} ;
+% \node [fit = (1-2)] {} ;
+% \node [fit = (1-3)] {} ;
+% \node [fit = (2-1)] {} ;
+% \node [fit = (2-2)] {} ;
+% \node [fit = (2-3)] {} ;
+% \node [fit = (3-1)] {} ;
+% \node [fit = (3-2)] {} ;
+% \node [fit = (3-3)] {} ;
+% \end{tikzpicture}}]
+% a & a + b & a + b + c \\
+% a & a & a + b \\
+% a & a & a
+% \end{pNiceMatrix}\]
+%
+%
+% \medskip
+% The names of the ``large nodes'' are constructed by adding the suffix
+% ``|-large|'' to the names of the ``normal nodes''. In the following example,
+% we have underlined the ``large nodes''. We consider that this example is
+% self-explanatory.\footnote{There is no ``large nodes'' created in the exterior
+% rows and columns (for these rows and columns, cf. p.~\pageref{exterior}).}
+%
+% \[\begin{pNiceMatrix}[
+% create-large-nodes,
+% code-after = {\begin{tikzpicture}
+% [every node/.style = {blend mode = multiply,
+% inner sep = 0pt},
+% name suffix = -large]
+% \node [fit = (1-1),fill = red!15] {} ;
+% \node [fit = (1-3),fill = red!15] {} ;
+% \node [fit = (2-2),fill = red!15] {} ;
+% \node [fit = (3-1),fill = red!15] {} ;
+% \node [fit = (3-3),fill = red!15] {} ;
+% \node [fit = (1-2),fill = blue!15] {} ;
+% \node [fit = (2-1),fill = blue!15] {} ;
+% \node [fit = (2-3),fill = blue!15] {} ;
+% \node [fit = (3-2),fill = blue!15] {} ;
+% \end{tikzpicture}}]
+% a & a + b & a + b + c \\
+% a & a & a + b \\
+% a & a & a
+% \end{pNiceMatrix}\]
+%
+%
+% \medskip
+% The ``large nodes'' of the first column and last column may appear too small
+% for some usage. That's why it's possible to use the options |left-margin| and
+% |right-margin| to add space on both sides of the array and also space in the
+% ``large nodes'' of the first column and last column. In the following example,
+% we have used the options |left-margin| and |right-margin|.\footnote{The
+% options |left-margin| and |right-margin| take dimensions as values but, if no
+% value is given, the default value is used, which is |\arraycolsep| (by
+% default: 5~pt). There is also an option |margin| to fix both |left-margin| and
+% |right-margin| to the same value.}
+% \[\begin{pNiceMatrix}[
+% create-large-nodes,left-margin,right-margin,
+% code-after = {\begin{tikzpicture}
+% [every node/.style = {blend mode = multiply,
+% inner sep = 0pt},
+% name suffix = -large]
+% \node [fit = (1-1),fill = red!15] {} ;
+% \node [fit = (1-3),fill = red!15] {} ;
+% \node [fit = (2-2),fill = red!15] {} ;
+% \node [fit = (3-1),fill = red!15] {} ;
+% \node [fit = (3-3),fill = red!15] {} ;
+% \node [fit = (1-2),fill = blue!15] {} ;
+% \node [fit = (2-1),fill = blue!15] {} ;
+% \node [fit = (2-3),fill = blue!15] {} ;
+% \node [fit = (3-2),fill = blue!15] {} ;
+% \end{tikzpicture}}]
+% a & a + b & a + b + c \\
+% a & a & a + b \\
+% a & a & a
+% \end{pNiceMatrix}\]
+%
+% \medskip
+% It's also possible to add more space on both side of the array with the
+% options |extra-left-margin| and |extra-right-margin|. These margins are not
+% incorporated in the ``large nodes''. It's possible to fix both values with the
+% option |extra-margin| and, in the following example, we use |extra-margin|
+% with the value $3$~pt.
+% \[\begin{pNiceMatrix}[
+% create-large-nodes,margin,extra-margin=3pt,
+% code-after = {\begin{tikzpicture}
+% [every node/.style = {blend mode = multiply,
+% inner sep = 0 pt},
+% name suffix = -large]
+% \node [fit = (1-1),fill = red!15] {} ;
+% \node [fit = (1-3),fill = red!15] {} ;
+% \node [fit = (2-2),fill = red!15] {} ;
+% \node [fit = (3-1),fill = red!15] {} ;
+% \node [fit = (3-3),fill = red!15] {} ;
+% \node [fit = (1-2),fill = blue!15] {} ;
+% \node [fit = (2-1),fill = blue!15] {} ;
+% \node [fit = (2-3),fill = blue!15] {} ;
+% \node [fit = (3-2),fill = blue!15] {} ;
+% \end{tikzpicture}}]
+% a & a + b & a + b + c \\
+% a & a & a + b \\
+% a & a & a
+% \end{pNiceMatrix}\]
+%
+%
+%
+% \bigskip
+% \textbf{Be careful} : These nodes are reconstructed from the contents of the
+% contents cells of the array. Usually, they do not correspond to the cells
+% delimited by the rules (if we consider that these rules are drawn).
+%
+% \bigskip
+% \begin{minipage}[c]{7.6cm}
+% Here is a array composed with the following code:
+%
+% \medskip
+% \begin{BVerbatim}
+% \large
+% \begin{NiceTabular}{wl{2cm}LL}[hvlines]
+% fraise & amande & abricot \\
+% prune & pêche & poire \\[1ex]
+% noix & noisette & brugnon
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \end{minipage}
+% \hspace{0.9cm}
+% \begin{scope}
+% \large
+% \begin{NiceTabular}[c]{wl{2cm}LL}[hvlines]
+% fraise & amande & abricot \\
+% prune & pêche & poire \\[1ex]
+% noix & noisette & brugnon
+% \end{NiceTabular}
+% \end{scope}
%
+% \vspace{1cm}
+% \begin{minipage}[c]{7cm}
+% Here, we have colored all the cells of the array with |\chessboardcolors|.
+% \end{minipage}
+% \hspace{1.5cm}
+% \begin{scope}
+% \large
+% \begin{NiceTabular}[c]{wl{2cm}LL}[hvlines,code-before = \chessboardcolors{red!15}{blue!15}]
+% fraise & amande & abricot \\
+% prune & pêche & poire \\[1ex]
+% noix & noisette & brugnon
+% \end{NiceTabular}
+% \end{scope}
+%
+%
+% \vspace{1cm}
+% \begin{minipage}[c]{7cm}
+% Here are the ``large nodes'' of this array (without utilisation of |margin|
+% nor |extra-margin|).
+% \end{minipage}
+% \hspace{1.5cm}
+% \begin{scope}
+% \large
+% \begin{NiceTabular}[c]{wl{2cm}LL}[hvlines,
+% create-large-nodes,
+% code-after = {\begin{tikzpicture}
+% [every node/.style = {blend mode = multiply,
+% inner sep = 0 pt},
+% name suffix = -large]
+% \node [fit = (1-1),fill = red!15] {} ;
+% \node [fit = (1-3),fill = red!15] {} ;
+% \node [fit = (2-2),fill = red!15] {} ;
+% \node [fit = (3-1),fill = red!15] {} ;
+% \node [fit = (3-3),fill = red!15] {} ;
+% \node [fit = (1-2),fill = blue!15] {} ;
+% \node [fit = (2-1),fill = blue!15] {} ;
+% \node [fit = (2-3),fill = blue!15] {} ;
+% \node [fit = (3-2),fill = blue!15] {} ;
+% \end{tikzpicture}}]
+% fraise & amande & abricot \\
+% prune & pêche & poire \\[1ex]
+% noix & noisette & brugnon
+% \end{NiceTabular}
+% \end{scope}
+%
+%
+%
+%
+% \subsection{The ``row-nodes'' and the ``col-nodes''}
+%
+% The package \pkg{nicematrix} creates a PGF/Tikz node indicating the potential
+% position of each horizontal rule (with the names |row-|$i$) and each vertical
+% rule (with the names |col-|$j$), as described in the following figure. These
+% nodes are available in the |code-before| and the |code-after|.
+% \begin{center}
+% \begin{NiceTabular}{CCC}[hvlines,rules/width=1pt,rules/color=gray]
+% rose & tulipe & lys \\
+% arum & iris & violette \\
+% muguet & dahlia & souci
+% \CodeAfter
+% \tiny
+% \begin{tikzpicture}
+% \foreach \i in {1,2,3,4}
+% {
+% \fill [red] (row-\i) circle (0.5mm) ;
+% \node [red,anchor=east] at (row-\i) {row-\i} ;
+% }
+% \foreach \j in {1,2,3,4}
+% {
+% \fill [blue] (col-\j) circle (0.5mm) ;
+% \node [blue,anchor=north] at (col-\j) {col-\j} ;
+% }
+% \end{tikzpicture}
+% \end{NiceTabular}
+% \end{center}
+%
+% \bigskip
+% If we use Tikz (we remind that \pkg{nicematrix} does not load Tikz by
+% default), we can access (in the |code-before| and the |code-after|) to the
+% intersection of the horizontal rule~$i$ and the vertical rule~$j$ with the
+% syntax |(row-|$i$\verb+-|col-+$j$|)|.
+%
+% \medskip
+% \begin{Verbatim}
+% \[\begin{NiceMatrix}[
+% code-before =
+% {
+% ~emphase# \tikz \draw [fill = red!15] @
+% ~emphase# (row-7-|col-4) -- (row-8-|col-4) -- (row-8-|col-5) -- @
+% ~emphase# (row-9-|col-5) -- (row-9-|col-6) |- cycle ; @
+% }
+% ]
+% 1 \\
+% 1 & 1 \\
+% 1 & 2 & 1 \\
+% 1 & 3 & 3 & 1 \\
+% 1 & 4 & 6 & 4 & 1 \\
+% 1 & 5 & 10 & 10 & 5 & 1 \\
+% 1 & 6 & 15 & 20 & 15 & 6 & 1 \\
+% 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \\
+% 1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1
+% \end{NiceMatrix}\]
+% \end{Verbatim}
+% \[\begin{NiceMatrix}[
+% code-before =
+% {
+% \tikz \draw [fill = red!15]
+% (row-7-|col-4) -- (row-8-|col-4) -- (row-8-|col-5) --
+% (row-9-|col-5) -- (row-9-|col-6) |- cycle ;
+% }
+% ]
+% 1 \\
+% 1 & 1 \\
+% 1 & 2 & 1 \\
+% 1 & 3 & 3 & 1 \\
+% 1 & 4 & 6 & 4 & 1 \\
+% 1 & 5 & 10 & 10 & 5 & 1 \\
+% 1 & 6 & 15 & 20 & 15 & 6 & 1 \\
+% 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \\
+% 1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1
+% \end{NiceMatrix}\]
%
%
% \section{Technical remarks}
@@ -2153,28 +2532,10 @@ version 2005/12/01 or later.
% \end{scope}
%
% \medskip
-% The specifier |?| may be used in a standard environment |{array}| (of the
-% package \pkg{array}) and, in this case, the command |\OnlyMainNiceMatrix| is
-% no-op.
-%
-%
-% \subsection{The names of the PGF nodes created by nicematrix}
-%
-% We have said that, when a name is given to an environment of \pkg{nicematrix},
-% it's possible to access the PGF/Tikz nodes through this name (cf.
-% p.~\pageref{name}).
+% This specifier |?| may be used in the standard environments |{tabular}| and
+% |{array}| (of the package \pkg{array}) and, in this case, the command
+% |\OnlyMainNiceMatrix| is no-op.
%
-% That's the recommended way to access these nodes. However, we describe now the
-% internal names of these nodes.
-%
-% The environments created by \pkg{nicematrix} are numbered by an internal
-% global counter. The command |\NiceMatrixLastEnv| provides the number of the
-% last environment of \pkg{nicematrix} (for LaTeX, it's a ``fully expandable''
-% command and not a counter).
-%
-% For the environment of number~$n$, the node in row~$i$ and column~$j$ has the
-% name |nm-|$n$|-|$i$|-|$j$. The |medium| and |large| nodes have the same name,
-% suffixed by |-medium| and |-large|.
%
%
% \subsection{Diagonal lines}
@@ -2310,95 +2671,16 @@ version 2005/12/01 or later.
% environments of \pkg{nicematrix} are not affected).
%
%
-%
-% \subsection{A technical problem with the argument of
-% \textbackslash\textbackslash}
-%
-%
-% For technical, reasons, if you use the optional argument of the command |\\|,
-% the vertical space added will also be added to the ``normal'' node
-% corresponding at the previous node.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% \begin{pNiceMatrix}
-% a & \frac AB \\~emphase#[2mm]@
-% b & c
-% \end{pNiceMatrix}
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}[
-% code-after = {\tikz \node [inner sep = 0pt,
-% fill = red!15,
-% blend mode = multiply,
-% fit = (1-2) ] {} ; } ]
-% a & \frac AB \\[2mm]
-% b & c
-% \end{pNiceMatrix}$
%
-% \bigskip
-% There are two solutions to solve this problem. The first solution is to use a
-% TeX command to insert space between the rows.
-%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% \begin{pNiceMatrix}
-% a & \frac AB \\
-% ~emphase#\noalign{\kern2mm}@
-% b & c
-% \end{pNiceMatrix}
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}[
-% code-after = {\tikz \node [inner sep = 0pt,
-% fill = red!15,
-% blend mode = multiply,
-% fit = (1-2) ] {} ; } ]
-% a & \frac AB \\
-% \noalign{\kern2mm}
-% b & c
-% \end{pNiceMatrix}$
-%
-%
-% \bigskip
-% The other solution is to use the command |\multicolumn| in the previous cell.
+% \subsection{Incompatibilities}
%
-% \medskip
-% \begin{BVerbatim}[baseline=c,boxwidth=11cm]
-% \begin{pNiceMatrix}
-% a & ~emphase#\multicolumn1C{\frac AB}@ \\[2mm]
-% b & c
-% \end{pNiceMatrix}
-% \end{BVerbatim}
-% $\begin{pNiceMatrix}[
-% code-after = {\tikz \node [inner sep = 0pt,
-% fill = red!15,
-% blend mode = multiply,
-% fit = (1-2) ] {} ; } ]
-% a & \multicolumn1C{\frac AB} \\[2mm]
-% b & c
-% \end{pNiceMatrix}$
-%
-%
-% \subsection{Obsolete environments which have been deleted}
+% The package \pkg{nicematrix} is not compatible with \pkg{threeparttable}.
%
-% The version 3.0 of \pkg{nicematrix} has introduced the environment
-% |{pNiceArray}| (and its variants) with the options |first-row|, |last-row|,
-% |first-col| and |last-col|.
+% \medskip
+% The package \pkg{nicematrix} is not fully compatible with the package
+% \pkg{arydshln} (because this package redefines many internal of \pkg{array}).
%
-% Consequently the following environments present in previous versions of
-% have been deleted from \pkg{nicematrix}.
-% %
-% \begin{itemize}
-% \item |{NiceArrayCwithDelims}| ;
-% \item |{pNiceArrayC}|, |{bNiceArrayC}|, |{BNiceArrayC}|, |{vNiceArrayC}|,
-% |{VNiceArrayC}| ;
-% \item |{NiceArrayRCwithDelims}| ;
-% \item |{pNiceArrayRC}|, |{bNiceArrayRC}|, |{BNiceArrayRC}|, |{vNiceArrayRC}|,
-% |{VNiceArrayRC}|.
-% \end{itemize}
%
-% However, the definition of those environments is still available (temporarily)
-% at the end of the file |nicematrix.sty| after a command |\file_input_stop:|.
-%
% \section{Examples}
%
% \subsection{Dotted lines}
@@ -2531,11 +2813,9 @@ version 2005/12/01 or later.
% \end{scope}
%
% \vspace{2cm}
-% An example for a linear system (the vertical rule has been drawn in blue with
-% the tools of \pkg{colortbl}):\par\nobreak
+% An example for a linear system:\par\nobreak
%
% \begin{Verbatim}
-% \arrayrulecolor{blue}
% $\begin{pNiceArray}{*6C|C}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
% 1 & 1 & 1 &\Cdots & & 1 & 0 & \\
% 0 & 1 & 0 &\Cdots & & 0 & & L_2 \gets L_2-L_1 \\
@@ -2544,10 +2824,9 @@ version 2005/12/01 or later.
% \Vdots & & &\Ddots & & 0 & \\
% 0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1
% \end{pNiceArray}$
-% \arrayrulecolor{black}
% \end{Verbatim}
%
-% \arrayrulecolor{blue}
+%
% \[\begin{pNiceArray}{*6C|C}[nullify-dots,last-col,code-for-last-col=\scriptstyle]
% 1 & 1 & 1 &\Cdots & & 1 & 0 & \\
% 0 & 1 & 0 &\Cdots & & 0 & & L_2 \gets L_2-L_1 \\
@@ -2556,7 +2835,6 @@ version 2005/12/01 or later.
% \Vdots & & &\Ddots & & 0 & \\
% 0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1
% \end{pNiceArray}\]
-% \arrayrulecolor{black}
%
%
%
@@ -2746,24 +3024,22 @@ version 2005/12/01 or later.
%
%
% We should remark that the rules we have drawn are drawn \emph{after} the
-% construction of the array and thus, they don't spread the cells of the
-% array. We recall that, on the other side, the command |\hline|, the specifier
-% ``"|"'' and the options |hlines| and |vlines| spread the cells (when the
-% package \pkg{array} is loaded but, when the package \pkg{nicematrix} is
-% loaded, \pkg{array} is always loaded).\footnote{On the other side, the command
-% |\cline| doesn't spread the rows of the array.}
+% construction of the array and thus, they don't spread the cells of the array.
+% We recall that, on the other side, the command |\hline|, the specifier ``"|"''
+% and the options |hlines|, |vlines| and |hvlines| spread the
+% cells.\footnote{For the command |\cline|, see the remark
+% p.~\pageref{remark-cline}.}
%
%
% \vspace{1cm}
-% The package \pkg{nicematrix} is constructed upon the environment |{array}|
-% and, therefore, it's possible to use the package \pkg{colortbl} in the
-% environments of \pkg{nicematrix}. However, it's not always easy to do a fine
-% tuning of \pkg{colortbl}. That's why we propose another method to highlight a
+% It's possible to color a row with |\rowcolor| in the |code-before| (or with
+% |\rowcolor| of \pkg{colortbl} in the first cell of the row). However, it's not
+% possible to do a fine tuning. That's why we describe now method to highlight a
% row of the matrix. We create a rectangular Tikz node which encompasses the
% nodes of the second row with the Tikz library \pkg{fit}. This Tikz node is
% filled after the construction of the matrix. In order to see the text
% \emph{under} this node, we have to use transparency with the |blend mode|
-% equal to |multiply|.
+% equal to |multiply|.
%
% \tikzset{highlight/.style={rectangle,
% fill=red!15,
@@ -3318,28 +3594,91 @@ version 2005/12/01 or later.
% the rules even if \pkg{colortbl} is not loaded.
% \begin{macrocode}
\cs_set_protected:Npn \CT@arc@ { }
- \NewDocumentCommand { \arrayrulecolor } { m }
- { \tl_gset:Nn \CT@arc@ { \color { #1 } } }
-% \end{macrocode}
-% The following line are from the redefinition of |\hline| of standard LaTeX by
-% \pkg{colortbl} (\pkg{array} does not redefine |\hline|).
-% \begin{macrocode}
+ \cs_set:Npn \arrayrulecolor #1 # { \CT@arc { #1 } }
+ \cs_set:Npn \CT@arc #1 #2
+ {
+ \dim_compare:nNnT \baselineskip = \c_zero_dim \noalign
+ { \cs_gset:Npn \CT@arc@ { \color #1 { #2 } } }
+ }
\cs_set:Npn \hline
{
\noalign { \ifnum 0 = `} \fi
- \let \hskip \vskip
- \let \vrule \hrule
- \let \@width \@height
+ \cs_set_eq:NN \hskip \vskip
+ \cs_set_eq:NN \vrule \hrule
+ \cs_set_eq:NN \@width \@height
{ \CT@arc@ \vline }
\futurelet \reserved@a
\@xhline
}
}
+ }
+% \end{macrocode}
+%
+% \bigskip
+% We have to redefine |\cline| for several reasons. The command |\@@_cline| will
+% be linked to |\cline| in the beginning of |{NiceArrayWithDelims}|. The
+% following commands must \emph{not} be protected.
+% \begin{macrocode}
+\cs_set:Npn \@@_standard_cline #1 { \@@_standard_cline:w #1 \q_stop }
+\cs_set:Npn \@@_standard_cline:w #1-#2 \q_stop
+ {
+ \int_compare:nNnT \l_@@_first_col_int = 0 { \omit & }
+ \int_compare:nNnT { #1 } > 1 { \multispan { \@@_pred:n { #1 } } & }
+ \multispan { \int_eval:n { #2 - #1 + 1 } }
+ { \CT@arc@ \leaders \hrule \@height \arrayrulewidth \hfill }
+% \end{macrocode}
+% Our |\everycr| has been modified. In particular, the creation of the |row|
+% node is in the |\everycr| (maybe we should put it with the incrementation of
+% |\c@iRow|). Since the following |\cr| correspond to a ``false row'', we have
+% to nullify |\everycr|.
+% \begin{macrocode}
+ \everycr { }
+ \cr
+ \noalign { \skip_vertical:N -\arrayrulewidth }
}
% \end{macrocode}
%
% \bigskip
-% The following command are only for efficiency. It must \emph{not} be protected
+% The following version of |\cline| spreads the array of a quantity equal
+% to |\arrayrulewidth| as does |\hline|. It will be loaded except if the key
+% |standard-cline| has been used.
+% \begin{macrocode}
+\cs_set:Npn \@@_cline
+% \end{macrocode}
+% We have to act in a fully expandable way since there may be |\noalign| (in the
+% |\multispan|) to detect. That's why we use |\exp_arg:Ne| and not |\exp_arg:Nx|.
+% \begin{macrocode}
+ { \exp_args:Ne \@@_cline_i:nn \l_@@_first_col_int }
+% \end{macrocode}
+% The command |\cline_i:nn| has two arguments. The first is the number of the
+% current column (it \emph{must} be used in that column). The second is a
+% standard argument of |\cline| of the form \textsl{i}-\textsl{j}.
+% \begin{macrocode}
+\cs_set:Npn \@@_cline_i:nn #1 #2 { \@@_cline_i:w #1-#2 \q_stop }
+\cs_set:Npn \@@_cline_i:w #1-#2-#3 \q_stop
+ {
+% \end{macrocode}
+% Now, |#1| is the number of the current column and we have to draw a line from
+% the column |#2| to the column |#3| (both included).
+% \begin{macrocode}
+ \int_compare:nNnT { #1 } < { #2 }
+ { \multispan { \int_eval:n { #2 - #1 } } & }
+ \multispan { \int_eval:n { #3 - #2 + 1 } }
+ { \CT@arc@ \leaders \hrule \@height \arrayrulewidth \hfill }
+% \end{macrocode}
+% You look whether there is another |\cline| to draw (the final user may put
+% several |\cline|).
+% \begin{macrocode}
+ \peek_meaning_remove_ignore_spaces:NTF \cline
+ { & \exp_args:Ne \@@_cline_i:nn { \@@_succ:n { #3 } } }
+ { \everycr { } \cr }
+ }
+
+
+% \end{macrocode}
+%
+% \bigskip
+% The following commands are only for efficiency. It must \emph{not} be protected
% because it will be used (for instance) in names of \textsc{pgf} nodes.
% \begin{macrocode}
\cs_new:Npn \@@_succ:n #1 { \the \numexpr #1 + 1 \relax }
@@ -3347,6 +3686,23 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
+% The following command is a small shortcut.
+% \begin{macrocode}
+\cs_new:Npn \@@_math_toggle_token:
+ { \bool_if:NF \l_@@_NiceTabular_bool \c_math_toggle_token }
+% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_set_CT@arc@:
+ { \peek_meaning:NTF [ \@@_set_CT@arc@_i: \@@_set_CT@arc@_ii: }
+\cs_new_protected:Npn \@@_set_CT@arc@_i: [ #1 ] #2 \q_stop
+ { \cs_set:Npn \CT@arc@ { \color [ #1 ] { #2 } } }
+\cs_new_protected:Npn \@@_set_CT@arc@_ii: #1 \q_stop
+ { \cs_set:Npn \CT@arc@ { \color { #1 } } }
+% \end{macrocode}
+%
+% \bigskip
% \textbf{The column S of siunitx}\par\nobreak
%
% \medskip
@@ -3486,6 +3842,20 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
+% The command |\NiceMatrixLastEnv| is not used by the package \pkg{nicematrix}.
+% It's only a facility given to the final user. It gives the number of the last
+% environment (in fact the number of the current environment but it's meant to
+% be used after the environment in order to refer to that environment --- and
+% its nodes --- without having to give it a name). This command \emph{must} be
+% expandable since it will be used in \pkg{pgf} nodes.
+% \begin{macrocode}
+\NewExpandableDocumentCommand \NiceMatrixLastEnv { }
+ { \int_use:N \g_@@_env_int }
+% \end{macrocode}
+%
+%
+%
+% \bigskip
% The following command is only a syntaxic shortcut. The |q| in |qpoint| means
% \emph{quick}.
% \begin{macrocode}
@@ -3525,11 +3895,8 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% If the user uses |{NiceArray}| (and not another environment relying upon
-% |{NiceArrayWithDelims}| like |{pNiceArray}|), we will raise the flag
-% |\l_@@_NiceArray_bool|. We have to know that, because, in |{NiceArray}|, we
-% won't use a structure with |\left| and |\right| and we will use the option of
-% position (|t|, |b| or |c|).
+% If the user uses |{NiceArray}| or |{NiceTabular}| the flag
+% |\l_@@_NiceArray_bool| will be raised.
% \begin{macrocode}
\bool_new:N \l_@@_NiceArray_bool
% \end{macrocode}
@@ -3615,7 +3982,14 @@ version 2005/12/01 or later.
%
% The TeX counters |\c@iRow| and |\c@jCol| will be created in the beginning of
% |{NiceArrayWithDelims}| (if they don't exist previously).
-%
+%
+% \bigskip
+% The following token list corresponds to the key |rules/color| available
+% in the environments.
+% \begin{macrocode}
+\tl_new:N \l_@@_rules_color_tl
+% \end{macrocode}
+%
% \bigskip
% A kind of false row will be inserted at the end of the array for the
% construction of the |col| nodes (and also to fix the width of the columns when
@@ -3676,6 +4050,42 @@ version 2005/12/01 or later.
\dim_new:N \g_@@_width_first_col_dim
% \end{macrocode}
%
+% \bigskip
+% The following sequence will contain the caracteristics of the blocks of the
+% array, specified by the command |\Block|. Each block is represented by 6
+% components surrounded by braces:
+%
+% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}{|\textsl{options}|}{|\textsl{contents}|}|.
+%
+% The variable is global because it will be modified in the cells of the array.
+% \begin{macrocode}
+\seq_new:N \g_@@_blocks_seq
+% \end{macrocode}
+% We also manage a sequence of the \emph{positions} of the blocks. Of course,
+% it's redundant with the previous sequence, but it's for efficiency. In that
+% sequence, each block is represented by only the four first components:
+% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}|.
+% \begin{macrocode}
+\seq_new:N \g_@@_pos_of_blocks_seq
+% \end{macrocode}
+% The sequence |\g_@@_pos_of_blocks_seq| will be used by the test of
+% non-overlapping of two blocks and when we will draw the rules required by the
+% key |hvlines| (these rules won't be drawn within the blocks).
+%
+% \bigskip
+% We will also manage a sequence for the positions of the dotted lines. These
+% dotted lines are created in the array by |\Cdots|, |\Vdots|, |\Ddots|, etc.
+% However, their positions, that is to say, their extremities, will be
+% determined only after the construction of the array. In this sequence, each
+% item contains four components:
+% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}|.
+% \begin{macrocode}
+\seq_new:N \g_@@_pos_of_xdots_seq
+% \end{macrocode}
+% The sequence |\g_@@_pos_of_xdots_seq| will be used when we will draw the rules
+% required by the key |hvlines| (these rules won't be drawn within the virtual
+% blocks corresponding to the dotted lines).
+%
%
% \bigskip
% \textbf{Variables for the exterior rows and columns}\par\nobreak
@@ -3841,7 +4251,15 @@ version 2005/12/01 or later.
% \bigskip
% \subsection*{The options}
%
+% By default, the behaviour of |\cline| is changed in the environments of
+% \pkg{nicematrix}: a |\cline| spreads the array by an amount equal to
+% |\arrayrulewidht|. It's possible to disable this feature with the key
+% |\l_@@_standard_line_bool|.
+% \begin{macrocode}
+\bool_new:N \l_@@_standard_cline_bool
+% \end{macrocode}
%
+% \bigskip
% The following dimensions correspond to the options |cell-space-top-limit| and co
% (these parameters are inspired by the package \pkg{cellspace}).
% \begin{macrocode}
@@ -3922,11 +4340,15 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% The flag |\l_@@_hlines_bool| corresponds to the option |\hlines| and the flag
-% |\l_@@_vlines_bool| to the option |\vlines|.
+% The flag |\l_@@_hlines_bool| corresponds to the key |hlines|, the flag
+% |\l_@@_vlines_bool| to the key |vlines| and the flag |hvlines| to the key
+% |hvlines|. Since version 4.1, the key |hvlines| is no longer a mere alias for
+% the conjonction of |hlines| and |vlines|. Indeed, with |hvlines|, the vertical
+% and horizontal rules are \emph{not} drawn within the blocks (created by |\Block|).
% \begin{macrocode}
\bool_new:N \l_@@_hlines_bool
\bool_new:N \l_@@_vlines_bool
+\bool_new:N \l_@@_hvlines_bool
% \end{macrocode}
%
% \bigskip
@@ -4052,8 +4474,20 @@ version 2005/12/01 or later.
%
%
% \begin{macrocode}
+\keys_define:nn { NiceMatrix / rules }
+ {
+ color .tl_set:N = \l_@@_rules_color_tl ,
+ color .value_required:n = true ,
+ width .dim_set:N = \arrayrulewidth ,
+ width .value_required:n = true
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
\keys_define:nn { NiceMatrix / Global }
{
+ standard-cline .bool_set:N = \l_@@_standard_cline_bool ,
+ standard-cline .default:n = true ,
cell-space-top-limit .dim_set:N = \l_@@_cell_space_top_limit_dim ,
cell-space-top-limit .value_required:n = true ,
cell-space-bottom-limit .dim_set:N = \l_@@_cell_space_bottom_limit_dim ,
@@ -4078,7 +4512,12 @@ version 2005/12/01 or later.
code-for-last-row .value_required:n = true ,
hlines .bool_set:N = \l_@@_hlines_bool ,
vlines .bool_set:N = \l_@@_vlines_bool ,
- hvlines .meta:n = { hlines , vlines } ,
+ hvlines .code:n =
+ {
+ \bool_set_true:N \l_@@_hvlines_bool
+ \bool_set_true:N \l_@@_vlines_bool
+ \bool_set_true:N \l_@@_hlines_bool
+ } ,
parallelize-diags .bool_set:N = \l_@@_parallelize_diags_bool ,
% \end{macrocode}
%
@@ -4175,24 +4614,28 @@ version 2005/12/01 or later.
NiceMatrix / Env ,
} ,
NiceMatrix / xdots .inherit:n = NiceMatrix / xdots ,
+ NiceMatrix / rules .inherit:n = NiceMatrix / rules ,
NiceTabular .inherit:n =
{
NiceMatrix / Global ,
NiceMatrix / Env
} ,
NiceTabular / xdots .inherit:n = NiceMatrix / xdots ,
+ NiceTabular / rules .inherit:n = NiceMatrix / rules ,
NiceArray .inherit:n =
{
NiceMatrix / Global ,
NiceMatrix / Env ,
} ,
NiceArray / xdots .inherit:n = NiceMatrix / xdots ,
+ NiceArray / rules .inherit:n = NiceMatrix / rules ,
pNiceArray .inherit:n =
{
NiceMatrix / Global ,
NiceMatrix / Env ,
} ,
- pNiceArray / xdots .inherit:n = NiceMatrix / xdots
+ pNiceArray / xdots .inherit:n = NiceMatrix / xdots ,
+ pNiceArray / rules .inherit:n = NiceMatrix / rules ,
}
% \end{macrocode}
%
@@ -4358,6 +4801,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / NiceTabular }
{
+ last-col .code:n = \tl_if_empty:nF {#1}
+ { \@@_error:n { last-col~non~empty~for~NiceArray } }
+ \int_zero:N \l_@@_last_col_int ,
unknown .code:n = \@@_error:n { Unknown~option~for~NiceTabular }
}
% \end{macrocode}
@@ -4480,7 +4926,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_end_Cell:
{
- \bool_if:NF \l_@@_NiceTabular_bool \c_math_toggle_token
+ \@@_math_toggle_token:
\hbox_set_end:
% \end{macrocode}
%
@@ -4712,7 +5158,8 @@ version 2005/12/01 or later.
{
\@@_create_row_node:
% \end{macrocode}
-% We add the potential horizontal lines specified by the option |hlines|.
+% We don't draw the rules of the key |hlines| (or |hvlines|) but we reserve the
+% vertical space for theses rules.
% \begin{macrocode}
\bool_if:NT \l_@@_hlines_bool
{
@@ -4730,7 +5177,7 @@ version 2005/12/01 or later.
% \pkg{colortbl} is not loaded. We use a TeX group in order to limit the scope
% of |\CT@arc@|.
% \begin{macrocode}
- { { \CT@arc@ \hrule height \arrayrulewidth } }
+ { \hrule height \arrayrulewidth width \c_zero_dim }
}
}
}
@@ -4895,6 +5342,9 @@ version 2005/12/01 or later.
\cs_set_eq:NN \@@_old_iddots \iddots
\cs_set_eq:NN \firsthline \hline
\cs_set_eq:NN \lasthline \hline
+ \bool_if:NTF \l_@@_standard_cline_bool
+ { \cs_set_eq:NN \cline \@@_standard_cline }
+ { \cs_set_eq:NN \cline \@@_cline }
\cs_set_eq:NN \Ldots \@@_Ldots
\cs_set_eq:NN \Cdots \@@_Cdots
\cs_set_eq:NN \Vdots \@@_Vdots
@@ -4910,7 +5360,7 @@ version 2005/12/01 or later.
\cs_set_eq:NN \OnlyMainNiceMatrix \@@_OnlyMainNiceMatrix:n
\cs_set_eq:NN \dotfill \@@_dotfill:
\cs_set_eq:NN \CodeAfter \@@_CodeAfter:n
- \cs_set_eq:NN \slashbox \@@_slashbox:nn
+ \cs_set_eq:NN \diagbox \@@_diagbox:nn
\bool_if:NT \l_@@_renew_dots_bool
{
\cs_set_eq:NN \ldots \@@_Ldots
@@ -5123,9 +5573,19 @@ version 2005/12/01 or later.
\bool_if:NT \l_@@_in_env_bool { \@@_fatal:n { Yet~in~env } }
\bool_set_true:N \l_@@_in_env_bool
% \end{macrocode}
+% The command |\CT@arc@| contains the instruction of color for the rules of the
+% array\footnote{e.g. |\color[rgb]{0.5,0.5,0}|)}. This command is used by |\CT@arc@| but
+% we use it also for compatibility with \pkg{colortbl}. But we want also to be
+% able to use color for the rules of the array when \pkg{colortbl} is \emph{not}
+% loaded. That's why we do the following instruction which is in the patch of
+% the beginning of arrays done by \pkg{colortbl}. Of course, we restore the
+% value of |\CT@arc@| at the end of our environment.
+% \begin{macrocode}
+ \cs_gset_eq:NN \@@_old_CT@arc@ \CT@arc@
+% \end{macrocode}
%
-% We deactivate Tikz externalization because we will use \textsc{pgf} pictures with the
-% options |overlay| and |remember picture| (or equivalent forms).
+% We deactivate Tikz externalization because we will use \textsc{pgf} pictures
+% with the options |overlay| and |remember picture| (or equivalent forms).
% \begin{macrocode}
\cs_if_exist:NT \tikz@library@external@loaded
{
@@ -5151,7 +5611,16 @@ version 2005/12/01 or later.
\cs_set_protected:Npn \@arrayrule { \@addtopreamble \@@_vline: }
% \end{macrocode}
%
-%
+% The sequence |\g_@@_blocks_seq| will contain the carateristics of the blocks
+% (specified by |\Block|) of the array. The sequence |\g_@@_pos_of_blocks_seq|
+% will contain only the position of the blocks. Of course, this is redundant but
+% it's for efficiency.
+% \begin{macrocode}
+ \seq_clear:N \g_@@_blocks_seq
+ \seq_clear:N \g_@@_pos_of_blocks_seq
+% \end{macrocode}
+%
+%
% The set of keys is not exactly the same for |{NiceArray}| and for the variants
% of |{NiceArray}| (|{pNiceArray}|, |{bNiceArray}|, etc.) because, for
% |{NiceArray}|, we have the options |t|, |c|, |b| and |baseline|.
@@ -5161,7 +5630,13 @@ version 2005/12/01 or later.
{ \keys_set:nn { NiceMatrix / pNiceArray } }
{ #3 , #5 }
% \end{macrocode}
-%
+%
+% \bigskip
+% \begin{macrocode}
+ \tl_if_empty:NF \l_@@_rules_color_tl
+ { \exp_after:wN \@@_set_CT@arc@: \l_@@_rules_color_tl \q_stop }
+% \end{macrocode}
+%
% \bigskip
% If the key |code-before| is used, we have to create the |col| nodes and the
% |row| nodes before the creation of the array. First, we have to test whether
@@ -5228,21 +5703,18 @@ version 2005/12/01 or later.
\group_begin:
\bool_if:NT \c_@@_tikz_loaded_bool
{
-% \end{macrocode}
-% Be careful: we must \emph{not} put ``|remember picture|'' in the |\pgfset|.
-% \begin{macrocode}
- \pgfset
+ \tikzset
{
every~picture / .style =
- { overlay , name~prefix = \@@_env: - }
+ { overlay , name~prefix = \@@_env: - }
}
- }
- \cs_set_eq:NN \cellcolor \@@_cellcolor:nn
- \cs_set_eq:NN \rectanglecolor \@@_rectanglecolor:nnn
- \cs_set_eq:NN \rowcolor \@@_rowcolor:nn
- \cs_set_eq:NN \rowcolors \@@_rowcolors:nnn
- \cs_set_eq:NN \columncolor \@@_columncolor:nn
- \cs_set_eq:NN \chessboardcolors \@@_chessboardcolors:nn
+ }
+ \cs_set_eq:NN \cellcolor \@@_cellcolor
+ \cs_set_eq:NN \rectanglecolor \@@_rectanglecolor
+ \cs_set_eq:NN \rowcolor \@@_rowcolor
+ \cs_set_eq:NN \rowcolors \@@_rowcolors
+ \cs_set_eq:NN \columncolor \@@_columncolor
+ \cs_set_eq:NN \chessboardcolors \@@_chessboardcolors
% \end{macrocode}
% We compose the |code-before| in math mode in order to nullify the spaces put
% by the user between instructions in the |code-before|.
@@ -5745,7 +6217,7 @@ version 2005/12/01 or later.
{ \box_ht:N \l_tmpa_box + \box_dp:N \l_tmpa_box }
{ }
}
- \right .
+ \right .
\c_math_toggle_token
}
\dim_set:Nn \l_@@_real_left_delim_dim
@@ -6106,7 +6578,7 @@ version 2005/12/01 or later.
% have to compute some dimensions of this box.
% \begin{macrocode}
\hbox_set:Nw \l_@@_cell_box
- \bool_if:NF \l_@@_NiceTabular_bool \c_math_toggle_token
+ \@@_math_toggle_token:
\bool_if:NT \l_@@_small_bool \scriptstyle
% \end{macrocode}
% We insert |\l_@@_code_for_first_col_tl|... but we don't insert it in the
@@ -6131,7 +6603,7 @@ version 2005/12/01 or later.
l
<
{
- \bool_if:NF \l_@@_NiceTabular_bool \c_math_toggle_token
+ \@@_math_toggle_token:
\hbox_set_end:
\@@_update_for_first_and_last_row:
% \end{macrocode}
@@ -6178,7 +6650,7 @@ version 2005/12/01 or later.
% have to compute some dimensions of this box.
% \begin{macrocode}
\hbox_set:Nw \l_@@_cell_box
- \bool_if:NF \l_@@_NiceTabular_bool \c_math_toggle_token
+ \@@_math_toggle_token:
\bool_if:NT \l_@@_small_bool \scriptstyle
% \end{macrocode}
% We insert |\l_@@_code_for_last_col_tl|... but we don't insert it in the
@@ -6198,7 +6670,7 @@ version 2005/12/01 or later.
l
<
{
- \bool_if:NF \l_@@_NiceTabular_bool \c_math_toggle_token
+ \@@_math_toggle_token:
\hbox_set_end:
\@@_update_for_first_and_last_row:
% \end{macrocode}
@@ -6354,6 +6826,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\NewDocumentEnvironment { NiceTabular } { O { } m ! O { } }
{
+ \str_gset:Nn \g_@@_name_env_str { NiceTabular }
\keys_set:nn { NiceMatrix / NiceTabular } { #1 , #3 }
\bool_set_true:N \l_@@_NiceTabular_bool
\NiceArray { #2 }
@@ -6537,18 +7010,26 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-%
% \bigskip
-% Now, we really draw the dotted lines.
+% Now, we actually draw the dotted lines.
% \begin{macrocode}
\@@_draw_dotted_lines:
% \end{macrocode}
%
-% We draw the vertical rules of the option |vlines| before the
-% |internal-code-after| because the option |white| of a |\Block| may have to
-% erase these vertical rules.
% \begin{macrocode}
- \bool_if:NT \l_@@_vlines_bool \@@_draw_vlines:
+ \bool_if:NTF \l_@@_hvlines_bool
+ \@@_draw_hvlines:
+ {
+ \bool_if:NT \l_@@_hlines_bool \@@_draw_hlines:
+ \bool_if:NT \l_@@_vlines_bool \@@_draw_vlines:
+ }
+% \end{macrocode}
+%
+% We have to revert to a clean version of |\ialign| because there may be
+% tabulars in the |\Block| instructions that will be composed now.
+% \begin{macrocode}
+ \cs_set_eq:NN \ialign \@@_old_ialign:
+ \seq_if_empty:NF \g_@@_blocks_seq \@@_draw_blocks:
\g_@@_internal_code_after_tl
\tl_gclear:N \g_@@_internal_code_after_tl
\bool_if:NT \c_@@_tikz_loaded_bool
@@ -6579,9 +7060,19 @@ version 2005/12/01 or later.
\group_end:
\str_gclear:N \g_@@_name_env_str
\@@_restore_iRow_jCol:
+% \end{macrocode}
+% The command |\CT@arc@| contains the instruction of color for the rules of the
+% array\footnote{e.g. |\color[rgb]{0.5,0.5,0}|)}. This command is used by
+% |\CT@arc@| but we use it also for compatibility with \pkg{colortbl}. But we
+% want also to be able to use color for the rules of the array when
+% \pkg{colortbl} is \emph{not} loaded. That's why we do the following
+% instruction which is in the patch of the end of arrays done by \pkg{colortbl}.
+% \begin{macrocode}
+ \cs_gset_eq:NN \CT@arc@ \@@_old_CT@arc@
}
% \end{macrocode}
%
+%
% \bigskip
% We recall that, when externalization is used, |\tikzpicture| and
% |\endtikzpicture| (or |\pgfpicture| and |\endpgfpicture|) must be directly
@@ -6625,7 +7116,10 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%
% \bigskip
+% \subsection*{We draw the dotted lines}
+%
% A dotted line will be said \emph{open} in one of its extremities when it stops
% on the edge of the matrix and \emph{closed} otherwise. In the following
% matrix, the dotted line is closed on its left extremity and open on its right.
@@ -6847,6 +7341,21 @@ version 2005/12/01 or later.
}
}
}
+% \end{macrocode}
+% If the key |hvlines| is used, we remind the rectangle described by all the
+% dotted lines in order to respect the corresponding virtual ``block'' when
+% drawing the horizontal and vertical rules.
+% \begin{macrocode}
+ \bool_if:NT \l_@@_hvlines_bool
+ {
+ \seq_gput_right:Nx \g_@@_pos_of_xdots_seq
+ {
+ { \int_use:N \l_@@_initial_i_int }
+ { \int_use:N \l_@@_initial_j_int }
+ { \int_use:N \l_@@_final_i_int }
+ { \int_use:N \l_@@_final_j_int }
+ }
+ }
}
% \end{macrocode}
%
@@ -7354,17 +7863,6 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% The command |\NiceMatrixLastEnv| is not used by the package \pkg{nicematrix}.
-% It's only a facility given to the final user. It gives the number of the last
-% environment (in fact the number of the current environment but it's meant to
-% be used after the environment in order to refer to that environment --- and
-% its nodes --- without having to give it a name).
-% \begin{macrocode}
-\NewExpandableDocumentCommand \NiceMatrixLastEnv { }
- { \int_use:N \g_@@_env_int }
-% \end{macrocode}
-%
-% \bigskip
% \subsection*{The actual instructions for drawing the dotted line with Tikz}
%
% The command |\@@_draw_line:| should be used in a |{pgfpicture}|. It has six
@@ -7653,23 +8151,19 @@ version 2005/12/01 or later.
% \begin{macrocode}
\AtBeginDocument
{
- \tl_set:Nn \l_@@_argspec_tl { s O { } E { _ ^ } { { } { } } }
+ \tl_set:Nn \l_@@_argspec_tl { O { } E { _ ^ } { { } { } } }
\tl_set_rescan:Nno \l_@@_argspec_tl { } \l_@@_argspec_tl
\exp_args:NNV \NewDocumentCommand \@@_Ldots \l_@@_argspec_tl
{
- \bool_if:nTF { #1 }
- { \@@_error:n { starred~commands } }
+ \int_compare:nNnTF \c@jCol = 0
+ { \@@_error:nn { in~first~col } \Ldots }
{
- \int_compare:nNnTF \c@jCol = 0
- { \@@_error:nn { in~first~col } \Ldots }
+ \int_compare:nNnTF \c@jCol = \l_@@_last_col_int
+ { \@@_error:nn { in~last~col } \Ldots }
{
- \int_compare:nNnTF \c@jCol = \l_@@_last_col_int
- { \@@_error:nn { in~last~col } \Ldots }
- {
- \@@_instruction_of_type:nn { Ldots }
- { #2 , down = #3 , up = #4 }
- }
- }
+ \@@_instruction_of_type:nn { Ldots }
+ { #1 , down = #2 , up = #3 }
+ }
}
\bool_if:NF \l_@@_nullify_dots_bool { \phantom \@@_old_ldots }
\bool_gset_true:N \g_@@_empty_cell_bool
@@ -7680,19 +8174,15 @@ version 2005/12/01 or later.
% \begin{macrocode}
\exp_args:NNV \NewDocumentCommand \@@_Cdots \l_@@_argspec_tl
{
- \bool_if:nTF { #1 }
- { \@@_error:n { starred~commands } }
+ \int_compare:nNnTF \c@jCol = 0
+ { \@@_error:nn { in~first~col } \Cdots }
{
- \int_compare:nNnTF \c@jCol = 0
- { \@@_error:nn { in~first~col } \Cdots }
+ \int_compare:nNnTF \c@jCol = \l_@@_last_col_int
+ { \@@_error:nn { in~last~col } \Cdots }
{
- \int_compare:nNnTF \c@jCol = \l_@@_last_col_int
- { \@@_error:nn { in~last~col } \Cdots }
- {
- \@@_instruction_of_type:nn { Cdots }
- { #2 , down = #3 , up = #4 }
- }
- }
+ \@@_instruction_of_type:nn { Cdots }
+ { #1 , down = #2 , up = #3 }
+ }
}
\bool_if:NF \l_@@_nullify_dots_bool { \phantom \@@_old_cdots }
\bool_gset_true:N \g_@@_empty_cell_bool
@@ -7703,18 +8193,16 @@ version 2005/12/01 or later.
% \begin{macrocode}
\exp_args:NNV \NewDocumentCommand \@@_Vdots \l_@@_argspec_tl
{
- \bool_if:nTF { #1 }
- { \@@_error:n { starred~commands } }
- \int_compare:nNnTF \c@iRow = 0
- { \@@_error:nn { in~first~row } \Vdots }
+ \int_compare:nNnTF \c@iRow = 0
+ { \@@_error:nn { in~first~row } \Vdots }
+ {
+ \int_compare:nNnTF \c@iRow = \l_@@_last_row_int
+ { \@@_error:nn { in~last~row } \Vdots }
{
- \int_compare:nNnTF \c@iRow = \l_@@_last_row_int
- { \@@_error:nn { in~last~row } \Vdots }
- {
- \@@_instruction_of_type:nn { Vdots }
- { #2 , down = #3 , up = #4 }
- }
- }
+ \@@_instruction_of_type:nn { Vdots }
+ { #1 , down = #2 , up = #3 }
+ }
+ }
\bool_if:NF \l_@@_nullify_dots_bool { \phantom \@@_old_vdots }
\bool_gset_true:N \g_@@_empty_cell_bool
}
@@ -7724,27 +8212,23 @@ version 2005/12/01 or later.
% \begin{macrocode}
\exp_args:NNV \NewDocumentCommand \@@_Ddots \l_@@_argspec_tl
{
- \bool_if:nTF { #1 }
- { \@@_error:n { starred~commands } }
+ \int_case:nnF \c@iRow
+ {
+ 0 { \@@_error:nn { in~first~row } \Ddots }
+ \l_@@_last_row_int { \@@_error:nn { in~last~row } \Ddots }
+ }
{
- \int_case:nnF \c@iRow
+ \int_case:nnF \c@jCol
{
- 0 { \@@_error:nn { in~first~row } \Ddots }
- \l_@@_last_row_int { \@@_error:nn { in~last~row } \Ddots }
+ 0 { \@@_error:nn { in~first~col } \Ddots }
+ \l_@@_last_col_int { \@@_error:nn { in~last~col } \Ddots }
}
- {
- \int_case:nnF \c@jCol
- {
- 0 { \@@_error:nn { in~first~col } \Ddots }
- \l_@@_last_col_int { \@@_error:nn { in~last~col } \Ddots }
- }
- {
- \@@_instruction_of_type:nn { Ddots }
- { #2 , down = #3 , up = #4 }
- }
+ {
+ \@@_instruction_of_type:nn { Ddots }
+ { #1 , down = #2 , up = #3 }
+ }
- }
- }
+ }
\bool_if:NF \l_@@_nullify_dots_bool { \phantom \@@_old_ddots }
\bool_gset_true:N \g_@@_empty_cell_bool
}
@@ -7754,27 +8238,23 @@ version 2005/12/01 or later.
% \begin{macrocode}
\exp_args:NNV \NewDocumentCommand \@@_Iddots \l_@@_argspec_tl
{
- \bool_if:nTF { #1 }
- { \@@_error:n { starred~commands } }
+ \int_case:nnF \c@iRow
+ {
+ 0 { \@@_error:nn { in~first~row } \Iddots }
+ \l_@@_last_row_int { \@@_error:nn { in~last~row } \Iddots }
+ }
{
- \int_case:nnF \c@iRow
+ \int_case:nnF \c@jCol
{
- 0 { \@@_error:nn { in~first~row } \Iddots }
- \l_@@_last_row_int { \@@_error:nn { in~last~row } \Iddots }
+ 0 { \@@_error:nn { in~first~col } \Iddots }
+ \l_@@_last_col_int { \@@_error:nn { in~last~col } \Iddots }
}
- {
- \int_case:nnF \c@jCol
- {
- 0 { \@@_error:nn { in~first~col } \Iddots }
- \l_@@_last_col_int { \@@_error:nn { in~last~col } \Iddots }
- }
- {
- \@@_instruction_of_type:nn { Iddots }
- { #2 , down = #3 , up = #4 }
- }
+ {
+ \@@_instruction_of_type:nn { Iddots }
+ { #1 , down = #2 , up = #3 }
+ }
- }
- }
+ }
\bool_if:NF \l_@@_nullify_dots_bool { \phantom \@@_old_iddots }
\bool_gset_true:N \g_@@_empty_cell_bool
}
@@ -7803,13 +8283,26 @@ version 2005/12/01 or later.
\cs_new:Npn \@@_multicolumn:nnn #1 #2 #3
{
\@@_old_multicolumn { #1 } { #2 } { #3 }
- \int_compare:nNnT #1 > 1
+% \end{macrocode}
+% The |\peek_remove_spaces:n| is mandatory.
+% \begin{macrocode}
+ \peek_remove_spaces:n
{
- \seq_gput_left:Nx \g_@@_multicolumn_cells_seq
- { \int_use:N \c@iRow - \int_use:N \c@jCol }
- \seq_gput_left:Nn \g_@@_multicolumn_sizes_seq { #1 }
- }
- \int_gadd:Nn \c@jCol { #1 - 1 }
+ \int_compare:nNnT #1 > 1
+ {
+ \seq_gput_left:Nx \g_@@_multicolumn_cells_seq
+ { \int_use:N \c@iRow - \int_use:N \c@jCol }
+ \seq_gput_left:Nn \g_@@_multicolumn_sizes_seq { #1 }
+ \seq_gput_right:Nx \g_@@_pos_of_blocks_seq
+ {
+ { \int_use:N \c@iRow }
+ { \int_use:N \c@jCol }
+ { \int_use:N \c@iRow }
+ { \int_eval:n { \c@jCol + #1 - 1 } }
+ }
+ }
+ \int_gadd:Nn \c@jCol { #1 - 1 }
+ }
}
% \end{macrocode}
%
@@ -8044,14 +8537,20 @@ version 2005/12/01 or later.
% The command |\@@_rotate:| will be linked to |\rotate| in
% |{NiceArrayWithDelims}|.
%
-% The command will exit three levels of groups in order
+% The command will exit three levels of groups (only two in |{NiceTabular}|
+% because there is not the group of the math mode to exit) in order
% to execute the command
%
% \qquad ``|\box_rotate:Nn \l_@@_cell_box { 90 }|''
%
% just after the construction of the box |\l_@@_cell_box|.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_rotate: { \group_insert_after:N \@@_rotate_i: }
+\cs_new_protected:Npn \@@_rotate:
+ {
+ \bool_if:NTF \l_@@_NiceTabular_bool
+ { \group_insert_after:N \@@_rotate_ii: }
+ { \group_insert_after:N \@@_rotate_i: }
+ }
\cs_new_protected:Npn \@@_rotate_i: { \group_insert_after:N \@@_rotate_ii: }
\cs_new_protected:Npn \@@_rotate_ii: { \group_insert_after:N \@@_rotate_iii: }
\cs_new_protected:Npn \@@_rotate_iii:
@@ -8196,21 +8695,25 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% Here an example : |\@@_rowcolor:nn {red!15} {1,3,5-7,10-}|
+% Here an example : |\@@_rowcolor {red!15} {1,3,5-7,10-}|
% \begin{macrocode}
-\cs_new_protected:Npn \@@_rowcolor:nn #1 #2
+\NewDocumentCommand \@@_rowcolor { O { } m m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF { #2 }
{
\pgfpicture
\pgf@relevantforpicturesizefalse
- \pgfsetfillcolor { #1 }
+ \tl_if_empty:nTF { #1 } \color { \color [ #1 ] } { #2 }
% \end{macrocode}
-% |\l_tmpa_dim| is the $x$-value of the left side of the rows.
+% |\l_tmpa_dim| is the $x$-value of the right side of the rows.
% \begin{macrocode}
+ \@@_qpoint:n { col - 1}
+ \int_compare:nNnTF \l_@@_first_col_int = 0
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x + 0.5 \arrayrulewidth } }
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x - 0.5 \arrayrulewidth } }
\@@_qpoint:n { col - \@@_succ:n \c@jCol }
- \dim_set_eq:NN \l_tmpa_dim \pgf@x
- \clist_map_inline:nn { #2 }
+ \dim_set:Nn \l_tmpa_dim { \pgf@x + 0.5 \arrayrulewidth }
+ \clist_map_inline:nn { #3 }
{
\tl_set:Nn \l_tmpa_tl { ##1 }
\tl_if_in:NnTF \l_tmpa_tl { - }
@@ -8225,9 +8728,12 @@ version 2005/12/01 or later.
% Now, the numbers of both rows are in |\l_tmpa_tl| and |\l_tmpb_tl|.
% \begin{macrocode}
\@@_qpoint:n { row - \@@_succ:n \l_tmpb_tl }
+ \dim_set:Nn \l_tmpb_dim { \pgf@y + 0.5 \arrayrulewidth }
+ \@@_qpoint:n { row - \l_tmpa_tl }
+ \dim_set:Nn \l_tmpd_dim { \pgf@y + 0.5 \arrayrulewidth }
\pgfpathrectanglecorners
- { \@@_qpoint:n { row - \l_tmpa_tl } }
- { \pgfpoint \l_tmpa_dim \pgf@y }
+ { \pgfpoint \l_tmpc_dim \l_tmpd_dim }
+ { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
}
\pgfusepathqfill
\endpgfpicture
@@ -8238,22 +8744,22 @@ version 2005/12/01 or later.
% \bigskip
% Here an example : |\@@_columncolor:nn {red!15} {1,3,5-7,10-}|
% \begin{macrocode}
-\cs_new_protected:Npn \@@_columncolor:nn #1 #2
+\NewDocumentCommand \@@_columncolor { O { } m m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF { #2 }
{
\pgfpicture
\pgf@relevantforpicturesizefalse
- \pgfsetfillcolor { #1 }
+ \tl_if_empty:nTF { #1 } \color { \color [ #1 ] } { #2 }
\@@_qpoint:n { row - 1 }
% \end{macrocode}
% |\l_tmpa_dim| is the $y$-value of the top of the columns et |\l_tmpb_dim| is
% the $y$-value of the bottom.
% \begin{macrocode}
- \dim_set_eq:NN \l_tmpa_dim \pgf@y
+ \dim_set:Nn \l_tmpa_dim {\pgf@y + 0.5 \arrayrulewidth }
\@@_qpoint:n { row - \@@_succ:n \c@iRow }
- \dim_set_eq:NN \l_tmpb_dim \pgf@y
- \clist_map_inline:nn { #2 }
+ \dim_set:Nn \l_tmpb_dim { \pgf@y + 0.5 \arrayrulewidth }
+ \clist_map_inline:nn { #3 }
{
\tl_set:Nn \l_tmpa_tl { ##1 }
\tl_if_in:NnTF \l_tmpa_tl { - }
@@ -8268,11 +8774,14 @@ version 2005/12/01 or later.
% Now, the numbers of both columns are in |\l_tmpa_tl| and |\l_tmpb_tl|.
% \begin{macrocode}
\@@_qpoint:n { col - \l_tmpa_tl }
- \dim_set_eq:NN \l_tmpc_dim \pgf@x
+ \int_compare:nNnTF \l_@@_first_col_int = \l_tmpa_tl
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x - 0.5 \arrayrulewidth } }
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x + 0.5 \arrayrulewidth } }
\@@_qpoint:n { col - \@@_succ:n \l_tmpb_tl }
+ \dim_set:Nn \l_tmpd_dim { \pgf@x + 0.5 \arrayrulewidth }
\pgfpathrectanglecorners
{ \pgfpoint \l_tmpc_dim \l_tmpa_dim }
- { \pgfpoint \pgf@x \l_tmpb_dim }
+ { \pgfpoint \l_tmpd_dim \l_tmpb_dim }
}
\pgfusepathqfill
\endpgfpicture
@@ -8281,16 +8790,16 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% Here an example : |\@@_cellcolor:nn {red!15}{2-3,3-4,4-5,5-6}|
+% Here an example : |\@@_cellcolor[rgb]{0.5,0.5,0}{2-3,3-4,4-5,5-6}|
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cellcolor:nn #1 #2
+\NewDocumentCommand \@@_cellcolor { O { } m m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF { #2 }
{
\pgfpicture
\pgf@relevantforpicturesizefalse
- \pgfsetfillcolor { #1 }
- \clist_map_inline:nn { #2 }
+ \tl_if_empty:nTF { #1 } \color { \color [ #1 ] } { #2 }
+ \clist_map_inline:nn { #3 }
{
\@@_cut_on_hyphen:w ##1 \q_stop
\@@_qpoint:n { row - \l_tmpa_tl }
@@ -8298,13 +8807,15 @@ version 2005/12/01 or later.
{ \int_compare_p:n { \l_tmpa_tl <= \c@iRow } }
{ \int_compare_p:n { \l_tmpb_tl <= \c@jCol } }
{
- \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \dim_set:Nn \l_tmpb_dim { \pgf@y + 0.5 \arrayrulewidth }
\@@_qpoint:n { row - \@@_succ:n \l_tmpa_tl }
- \dim_set_eq:NN \l_tmpa_dim \pgf@y
+ \dim_set:Nn \l_tmpa_dim { \pgf@y + 0.5 \arrayrulewidth }
\@@_qpoint:n { col - \l_tmpb_tl }
- \dim_set_eq:NN \l_tmpc_dim \pgf@x
+ \int_compare:nNnTF \l_@@_first_col_int = \l_tmpb_tl
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x - 0.5 \arrayrulewidth } }
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x + 0.5 \arrayrulewidth } }
\@@_qpoint:n { col - \@@_succ:n \l_tmpb_tl }
- \dim_set_eq:NN \l_tmpd_dim \pgf@x
+ \dim_set:Nn \l_tmpd_dim { \pgf@x + 0.5 \arrayrulewidth }
\pgfpathrectanglecorners
{ \pgfpoint \l_tmpc_dim \l_tmpb_dim }
{ \pgfpoint \l_tmpd_dim \l_tmpa_dim }
@@ -8312,38 +8823,40 @@ version 2005/12/01 or later.
}
\pgfusepathqfill
\endpgfpicture
- }
+ }
}
% \end{macrocode}
%
% \bigskip
-% Here an example : |\@@_rectanglecolor:nn {red!15}{2-3}{5-6}|
+% Here an example : |\@@_rectanglecolor{red!15}{2-3}{5-6}|
% \begin{macrocode}
-\cs_new_protected:Npn \@@_rectanglecolor:nnn #1 #2 #3
+\NewDocumentCommand \@@_rectanglecolor { O { } m m m }
{
- \tl_if_blank:nF { #1 }
+ \tl_if_blank:nF { #2 }
{
\pgfpicture
\pgf@relevantforpicturesizefalse
- \pgfsetfillcolor { #1 }
- \@@_cut_on_hyphen:w #2 \q_stop
+ \tl_if_empty:nTF { #1 } \color { \color [ #1 ] } { #2 }
+ \@@_cut_on_hyphen:w #3 \q_stop
\bool_lazy_and:nnT
{ \int_compare_p:n { \l_tmpa_tl <= \c@iRow } }
{ \int_compare_p:n { \l_tmpb_tl <= \c@jCol } }
{
\@@_qpoint:n { row - \l_tmpa_tl }
- \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \dim_set:Nn \l_tmpb_dim { \pgf@y + 0.5 \arrayrulewidth }
\@@_qpoint:n { col - \l_tmpb_tl }
- \@@_cut_on_hyphen:w #3 \q_stop
+ \int_compare:nNnTF \l_@@_first_col_int = \l_tmpb_tl
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x - 0.5 \arrayrulewidth } }
+ { \dim_set:Nn \l_tmpc_dim { \pgf@x + 0.5 \arrayrulewidth } }
+ \@@_cut_on_hyphen:w #4 \q_stop
\int_compare:nNnT \l_tmpa_tl > \c@iRow
{ \tl_set:Nx \l_tmpa_tl { \int_use:N \c@iRow } }
\int_compare:nNnT \l_tmpb_tl > \c@jCol
{ \tl_set:Nx \l_tmpb_tl { \int_use:N \c@jCol } }
- \dim_set_eq:NN \l_tmpc_dim \pgf@x
\@@_qpoint:n { row - \@@_succ:n \l_tmpa_tl }
- \dim_set_eq:NN \l_tmpa_dim \pgf@y
+ \dim_set:Nn \l_tmpa_dim { \pgf@y + 0.5 \arrayrulewidth }
\@@_qpoint:n { col - \@@_succ:n \l_tmpb_tl }
- \dim_set_eq:NN \l_tmpd_dim \pgf@x
+ \dim_set:Nn \l_tmpd_dim { \pgf@x + 0.5 \arrayrulewidth }
\pgfpathrectanglecorners
{ \pgfpoint \l_tmpc_dim \l_tmpb_dim }
{ \pgfpoint \l_tmpd_dim \l_tmpa_dim }
@@ -8361,30 +8874,32 @@ version 2005/12/01 or later.
% However, the command |\rowcolors| of \pkg{nicematrix} has \emph{not} the
% optional argument of the command |\rowcolors| of \pkg{xcolor}.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_rowcolors:nnn #1 #2 #3
+\NewDocumentCommand \@@_rowcolors { O { } m m m }
{
- \int_step_inline:nnn { #1 } { \int_use:N \c@iRow }
+ \int_step_inline:nnn { #2 } { \int_use:N \c@iRow }
{
\int_if_odd:nTF { ##1 }
- { \@@_rowcolor:nn { #2 } { ##1 } }
- { \@@_rowcolor:nn { #3 } { ##1 } }
- }
+ { \@@_rowcolor [ #1 ] { #3 } }
+ { \@@_rowcolor [ #1 ] { #4 } }
+ { ##1 }
+ }
}
% \end{macrocode}
%
% \bigskip
% \begin{macrocode}
-\cs_new_protected:Npn \@@_chessboardcolors:nn #1 #2
+\NewDocumentCommand \@@_chessboardcolors { O { } m m }
{
\int_step_inline:nn { \int_use:N \c@iRow }
{
\int_step_inline:nn { \int_use:N \c@jCol }
{
\int_if_even:nTF { ####1 + ##1 }
- { \@@_cellcolor:nn { #1 } { ####1 - ##1 } }
- { \@@_cellcolor:nn { #2 } { ####1 - ##1 } }
+ { \@@_cellcolor [ #1 ] { #2 } }
+ { \@@_cellcolor [ #1 ] { #3 } }
+ { ##1 - ####1 }
}
- }
+ }
}
% \end{macrocode}
%
@@ -8500,10 +9015,8 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_qpoint:n { row - 1 }
\dim_set_eq:NN \l_tmpa_dim \pgf@y
- \pgfusepathqfill
\@@_qpoint:n { row - \@@_succ:n \c@iRow }
\dim_sub:Nn \l_tmpa_dim \pgf@y
- \pgfusepathqfill
% \end{macrocode}
% We translate vertically to take into account the potential ``last row''.
% \begin{macrocode}
@@ -8516,7 +9029,7 @@ version 2005/12/01 or later.
% We adjust the value of |\l_tmpa_dim| by the width of the horizontal rule just
% before the ``last row''.
% \begin{macrocode}
- \@@_qpoint:n { row - \@@_succ:n\c@iRow }
+ \@@_qpoint:n { row - \@@_succ:n \c@iRow }
\dim_add:Nn \l_tmpa_dim \pgf@y
\@@_qpoint:n { row - \@@_succ:n \g_@@_row_total_int }
\dim_sub:Nn \l_tmpa_dim \pgf@y
@@ -8546,6 +9059,223 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%%
+% \subsection*{The key hvlines}
+%
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_draw_hlines:
+ {
+ \pgfpicture
+ \CT@arc@
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \pgfsetlinewidth \arrayrulewidth
+ \int_step_inline:nnn
+ { \bool_if:NTF \l_@@_NiceArray_bool 1 2 }
+ { \bool_if:NTF \l_@@_NiceArray_bool { \@@_succ:n \c@iRow } \c@iRow }
+ {
+ \@@_qpoint:n { row - ##1 }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@y
+ \pgfpathmoveto { \pgfpoint \pgf@x \pgf@y }
+ \@@_qpoint:n { col - \@@_succ:n { \c@jCol } }
+ \dim_set:Nn \l_tmpb_dim { \pgf@x + 0.5 \arrayrulewidth }
+ \pgfpathlineto { \pgfpoint \l_tmpb_dim \l_tmpa_dim }
+ }
+ \pgfusepathqstroke
+ \endpgfpicture
+ }
+% \end{macrocode}
+%
+% \bigskip
+% Since version 4.1, the key |hvlines| is no longer a mere alias for
+% the conjonction of |hlines| and |vlines|. Indeed, with |hvlines|, the vertical
+% and horizontal rules are \emph{not} drawn within the blocks (created by
+% |\Block|) nor within the ``virtual blocks'' (corresponding to the dotted lines
+% drawn by |\Cdots|, |\Vdots|, etc.).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_draw_hvlines:
+ {
+ \bool_lazy_and:nnTF
+ { \seq_if_empty_p:N \g_@@_pos_of_blocks_seq }
+ { \seq_if_empty_p:N \g_@@_pos_of_xdots_seq }
+ \@@_draw_hvlines_i:
+ \@@_draw_hvlines_ii:
+ }
+% \end{macrocode}
+%
+% \bigskip
+% This version is only for efficiency. The general case (in
+% |\@@_draw_hvlines_ii:|) does the job in all case (but slower).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_draw_hvlines_i:
+ {
+ \@@_draw_hlines:
+ \@@_draw_vlines:
+ }
+% \end{macrocode}
+%
+% \bigskip
+% Now, the general case, where there are blocks or dots in the array.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_draw_hvlines_ii:
+ {
+ \group_begin:
+ \CT@arc@
+% \end{macrocode}
+%
+% First, the exterior rectangle of the array (only in |{NiceArray}| and
+% |{NiceTabular}|).
+% \begin{macrocode}
+ \bool_if:NT \l_@@_NiceArray_bool
+ {
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \pgfsetlinewidth \arrayrulewidth
+ \pgfsetrectcap
+ \@@_qpoint:n { col - 1 }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@x
+ \@@_qpoint:n { row -1 }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \@@_qpoint:n { col - \@@_succ:n \c@jCol }
+ \dim_set_eq:NN \l_tmpc_dim \pgf@x
+ \@@_qpoint:n { row - \@@_succ:n \c@iRow }
+ \pgfpathrectanglecorners
+ { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ { \pgfpoint \l_tmpc_dim \pgf@y }
+ \pgfusepathqstroke
+ \endpgfpicture
+ }
+% \end{macrocode}
+%
+% First, the horizontal rules in the interior of the array.
+% \begin{macrocode}
+ \int_step_variable:nnNn 2 \c@iRow \l_tmpa_tl
+ {
+ \int_step_variable:nNn \c@jCol \l_tmpb_tl
+ {
+% \end{macrocode}
+% The boolean |\g_tmpa_bool| indicates whether the small horizontal rule will be
+% drawn. If we find that it is in a block (a real block, created by |\Block| or
+% a virtual block corresponding to a dotted line, created by |\Cdots|, |\Vdots|,
+% etc.), we will set |\g_tmpa_bool| to |false| and the small horizontal rule
+% won't be drawn.
+% \begin{macrocode}
+ \bool_gset_true:N \g_tmpa_bool
+ \seq_map_inline:Nn \g_@@_pos_of_blocks_seq
+ { \@@_test_if_hline_in_block:nnnn ##1 }
+ \seq_map_inline:Nn \g_@@_pos_of_xdots_seq
+ { \@@_test_if_hline_in_block:nnnn ##1 }
+ \bool_if:NT \g_tmpa_bool
+ {
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \pgfsetlinewidth \arrayrulewidth
+ \pgfsetrectcap
+ \@@_qpoint:n { row - \l_tmpa_tl }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \@@_qpoint:n { col - \l_tmpb_tl }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@x
+ \@@_qpoint:n { col - \@@_succ:n \l_tmpb_tl }
+ \dim_set_eq:NN \l_tmpc_dim \pgf@x
+ \pgfpathmoveto { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ \pgfpathlineto { \pgfpoint \l_tmpc_dim \l_tmpb_dim }
+ \pgfusepathqstroke
+ \endpgfpicture
+ }
+ }
+ }
+% \end{macrocode}
+% Now, the vertical rules in the interior of the array.
+% \begin{macrocode}
+ \int_step_variable:nNn \c@iRow \l_tmpa_tl
+ {
+ \int_step_variable:nnNn 2 \c@jCol \l_tmpb_tl
+ {
+% \end{macrocode}
+% The boolean |\g_tmpa_bool| indicates whether the small vertial rule will be
+% drawn. If we find that it is in a block (a real block, created by |\Block| or
+% a virtual block corresponding to a dotted line, created by |\Cdots|, |\Vdots|,
+% etc.), we will set |\g_tmpa_bool| to |false| and the small vertial rule won't
+% be drawn.
+% \begin{macrocode}
+ \bool_gset_true:N \g_tmpa_bool
+ \seq_map_inline:Nn \g_@@_pos_of_blocks_seq
+ { \@@_test_if_vline_in_block:nnnn ##1 }
+ \seq_map_inline:Nn \g_@@_pos_of_xdots_seq
+ { \@@_test_if_vline_in_block:nnnn ##1 }
+ \bool_if:NT \g_tmpa_bool
+ {
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
+ \pgfsetlinewidth \arrayrulewidth
+ \pgfsetrectcap
+ \@@_qpoint:n { row - \l_tmpa_tl }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \@@_qpoint:n { col - \l_tmpb_tl }
+ \dim_set_eq:NN \l_tmpa_dim \pgf@x
+ \@@_qpoint:n { row - \@@_succ:n \l_tmpa_tl }
+ \dim_set_eq:NN \l_tmpc_dim \pgf@y
+ \pgfpathmoveto { \pgfpoint \l_tmpa_dim \l_tmpb_dim }
+ \pgfpathlineto { \pgfpoint \l_tmpa_dim \l_tmpc_dim }
+ \pgfusepathqstroke
+ \endpgfpicture
+ }
+ }
+ }
+% \end{macrocode}
+% The group was for the color of the rules.
+% \begin{macrocode}
+ \group_end:
+ \seq_gclear:N \g_@@_pos_of_xdots_seq
+ }
+% \end{macrocode}
+%
+% The following command tests wether the current position in the array (given by
+% |\l_tmpa_tl| for the row and |\l_tmpb_tl| for the col) would provide an
+% horizontal rule towards the right in the block delimited by the four arguments
+% |#1|, |#2|, |#3| and |#4|. If this rule would be in the block (it must not be
+% drawn), the boolean |\l_tmpa_bool| is set to |false|.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_test_if_hline_in_block:nnnn #1 #2 #3 #4
+ {
+ \int_compare:nNnT \l_tmpa_tl > { #1 }
+ {
+ \int_compare:nNnT \l_tmpa_tl < { #3 + 1 }
+ {
+ \int_compare:nNnT \l_tmpb_tl > { #2 - 1 }
+ {
+ \int_compare:nNnT \l_tmpb_tl < { #4 + 1 }
+ { \bool_gset_false:N \g_tmpa_bool }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% The same for vertical rules.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_test_if_vline_in_block:nnnn #1 #2 #3 #4
+ {
+ \int_compare:nNnT \l_tmpa_tl > { #1 - 1 }
+ {
+ \int_compare:nNnT \l_tmpa_tl < { #3 + 1 }
+ {
+ \int_compare:nNnT \l_tmpb_tl > { #2 }
+ {
+ \int_compare:nNnT \l_tmpb_tl < { #4 + 1 }
+ { \bool_gset_false:N \g_tmpa_bool }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+%
+%
+%
%
% \bigskip
% \subsection*{The commands to draw dotted lines to separate columns and rows}
@@ -9211,54 +9941,63 @@ version 2005/12/01 or later.
\cs_new_protected:Npn \@@_Block_ii:nnnnn #1 #2 #3 #4 #5
{
% \end{macrocode}
-% We write an instruction in the |code-after|. We write the instruction in the
-% beginning of the |code-after| (the |left| in |\tl_gput_left:Nx|) because we
-% want the Tikz nodes corresponding of the block created \emph{before} potential
-% instructions written by the user in the |code-after| (these instructions may
-% use the Tikz node of the created block).
+%
+% \medskip
% \begin{macrocode}
- \tl_gput_left:Nx \g_@@_internal_code_after_tl
+ \tl_set:Nx \l_tmpa_tl
{
- \@@_Block_iii:nnnnnn
{ \int_use:N \c@iRow }
{ \int_use:N \c@jCol }
{ \int_eval:n { \c@iRow + #1 - 1 } }
{ \int_eval:n { \c@jCol + #2 - 1 } }
- { #3 }
- \exp_not:n { { #4 $ #5 $ } }
- }
+ }
% \end{macrocode}
-% It's not allowed to use the command |\Block| twice in the same cell of the
-% array. That's why, at the first use, we link the command |\Block|
-% to a special version. The scope of this link is the cell of the array.
+% Now, |\l_tmpa_tl| constains a ``object'' corresponding to the position of the
+% block whith four components surrounded by brackets:
+%
+% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}|.
+%
+% We store this information in the sequence |\g_@@_pos_of_blocks_seq|.
% \begin{macrocode}
- \cs_set_eq:NN \Block \@@_Block_error:nn
- }
+ \seq_gput_left:NV \g_@@_pos_of_blocks_seq \l_tmpa_tl
% \end{macrocode}
+% We also store a complete description of the block in the sequence
+% |\g_@@_blocks_seq|. Of course, the sequences |\g_@@_pos_of_blocks_seq| and
+% |\g_@@_blocks_seq| are redundant, but it's for efficiency. In
+% |\g_@@_blocks_seq|, each block is represented by an ``objet'' with six
+% components:
%
+% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}{|\textsl{options}|}{|\textsl{contents}|}|.
% \begin{macrocode}
-\cs_new:Npn \@@_Block_error:nn #1 #2
- {
- \@@_error:n { Second~Block }
- \cs_set_eq:NN \Block \use:nn
+ \seq_gput_left:Nx \g_@@_blocks_seq
+ {
+ \l_tmpa_tl
+ { #3 }
+ \exp_not:n { { #4 \@@_math_toggle_token: #5 \@@_math_toggle_token: } }
+ }
}
% \end{macrocode}
+%
%
-% \medskip
+% \bigskip
+% The key |tikz| is for Tikz options used when the \textsc{pgf} node of the
+% block is created.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block }
{
tikz .tl_set:N = \l_@@_tikz_tl ,
tikz .value_required:n = true ,
- white .bool_set:N = \l_@@_white_bool ,
- white .default:n = true ,
- white .value_forbidden:n = true ,
}
% \end{macrocode}
%
+% \bigskip
+% The command |\@@_draw_blocks:| will draw all the blocks. This command is used
+% after the construction of the array.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_draw_blocks:
+ { \seq_map_inline:Nn \g_@@_blocks_seq { \@@_Block_iii:nnnnnn ##1 } }
+% \end{macrocode}
%
-% \medskip
-% The following command |\@@_Block_iii:nnnnnn| will be used in the |code-after|.
% \begin{macrocode}
\cs_new_protected:Npn \@@_Block_iii:nnnnnn #1 #2 #3 #4 #5 #6
{
@@ -9270,11 +10009,9 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
- \bool_if:nTF
- {
- \int_compare_p:nNn { #3 } > \c@iRow
- || \int_compare_p:nNn { #4 } > \c@jCol
- }
+ \bool_lazy_or:nnTF
+ { \int_compare_p:nNn { #3 } > \c@iRow }
+ { \int_compare_p:nNn { #4 } > \c@jCol }
{ \msg_error:nnnn { nicematrix } { Block~too~large } { #1 } { #2 } }
{
% \end{macrocode}
@@ -9299,33 +10036,6 @@ version 2005/12/01 or later.
\@@_qpoint:n { col - \@@_succ:n { #4 } }
\dim_set_eq:NN \l_tmpd_dim \pgf@x
% \end{macrocode}
-%
-% \medskip
-% The following code doesn't work for the first vertical rule. You should allow
-% the option |white| if and only if the option |vlines| and |hlines| has been used.
-% \begin{macrocode}
- \bool_if:NT \l_@@_white_bool
- {
- \begin { pgfscope }
- \pgfsetfillcolor { white }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \pgfpathrectanglecorners
- {
- \pgfpoint
- { \l_tmpb_dim + 0.5 \arrayrulewidth }
- { \l_tmpa_dim - 0.5 \arrayrulewidth }
- }
- {
- \pgfpoint
- { \l_tmpd_dim - 0.5 \arrayrulewidth }
- { \l_tmpc_dim + 0.5 \arrayrulewidth }
- }
- \pgfusepathqfill
- \end { pgfscope }
- }
-% \end{macrocode}
%
% We construct the node for the block with the name |(#1-#2-block)|.
%
@@ -9510,7 +10220,9 @@ version 2005/12/01 or later.
% case of use of |\dotfill| ``internally'' in the cell (e.g. |\hbox to 1cm {\dotfill}|).
% \begin{macrocode}
\@@_dotfill
- \group_insert_after:N \@@_dotfill_i:
+ \bool_if:NT \l_@@_NiceTabular_bool
+ { \group_insert_after:N \@@_dotfill_ii: }
+ { \group_insert_after:N \@@_dotfill_i: }
}
\cs_new_protected:Npn \@@_dotfill_i: { \group_insert_after:N \@@_dotfill_ii: }
\cs_new_protected:Npn \@@_dotfill_ii: { \group_insert_after:N \@@_dotfill_iii: }
@@ -9518,32 +10230,32 @@ version 2005/12/01 or later.
% Now, if the box if not empty (unfornately, we can't actually test whether the
% box is empty and that's why we only consider it's width), we insert
% |\@@_dotfill| (which is the saved version of |\dotfill|) in the cell of the
-% array, and it will extends, since it's no longer in |\l_@@_cell_box|.
+% array, and it will extend, since it is no longer in |\l_@@_cell_box|.
% \begin{macrocode}
\cs_new_protected:Npn \@@_dotfill_iii:
{ \dim_compare:nNnT { \box_wd:N \l_@@_cell_box } = \c_zero_dim \@@_dotfill }
% \end{macrocode}
%
-% \subsection*{The command \textbackslash slashbox}
+% \subsection*{The command \textbackslash diagbox}
%
%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_slashbox:nn #1 #2
+\cs_new_protected:Npn \@@_diagbox:nn #1 #2
{
\tl_gput_right:Nx \g_@@_internal_code_after_tl
{
- \@@_actually_slashbox:nnnn
+ \@@_actually_diagbox:nnnn
{ \int_use:N \c@iRow } { \int_use:N \c@jCol } { #1 } { #2 }
}
}
% \end{macrocode}
%
% \medskip
-% The two arguments of |\@@_actually_slashbox:nn| are the number of row and the
+% The two arguments of |\@@_actually_diagbox:nn| are the number of row and the
% number of column of the cell to slash. The two other are the elements to draw
% below and above the diagonal line.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_actually_slashbox:nnnn #1 #2 #3 #4
+\cs_new_protected:Npn \@@_actually_diagbox:nnnn #1 #2 #3 #4
{
\pgfpicture
\pgf@relevantforpicturesizefalse
@@ -9571,10 +10283,12 @@ version 2005/12/01 or later.
\pgfset { inner~sep = 1 pt }
\pgfscope
\pgftransformshift { \pgfpoint \l_tmpb_dim \l_tmpc_dim }
- \pgfnode { rectangle } { south~west } { $ #3 $ } { } { }
+ \pgfnode { rectangle } { south~west }
+ { \@@_math_toggle_token: #3 \@@_math_toggle_token: } { } { }
\endpgfscope
\pgftransformshift { \pgfpoint \l_tmpd_dim \l_tmpa_dim }
- \pgfnode { rectangle } { north~east } { $ #4 $ } { } { }
+ \pgfnode { rectangle } { north~east }
+ { \@@_math_toggle_token: #4 \@@_math_toggle_token: } { } { }
\endpgfpicture
}
% \end{macrocode}
@@ -9621,21 +10335,12 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%
%
% \bigskip
-% \subsection*{We process the options}
+% \subsection*{We process the options at package loading}
%
%
-% \begin{macrocode}
-\@@_msg_new:nn { obsolete~environments }
- {
- The~obsolete~environments~(eg.~{pNiceArrayC})~have~been~deleted~
- from~the~package~nicematrix.\\
- However,~if~you~still~want~to~use~them,~you~will~find~the~code~for~
- those~environments~at~the~end~of~the~file~'nicematrix.sty',~after~
- a~command~'\token_to_str:N\file_input_stop:'.
- }
-% \end{macrocode}
%
% We process the options when the package is loaded (with |\usepackage|) but we
% recommend to use |\NiceMatrixOptions| instead.
@@ -9655,11 +10360,6 @@ version 2005/12/01 or later.
renew-matrix .value_forbidden:n = true ,
transparent .meta:n = { renew-dots , renew-matrix } ,
transparent .value_forbidden:n = true,
- obsolete-environments .code:n = \@@_fatal:n { obsolete~environments },
- starred-commands .code:n =
- \@@_msg_redirect_name:nn { starred~commands } { none } ,
- starred-commands .value_forbidden:n = true ,
-
}
\ProcessKeysOptions { NiceMatrix / Package }
% \end{macrocode}
@@ -9798,6 +10498,7 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%
% \begin{macrocode}
\@@_msg_new:nn { option~S~without~siunitx }
{
@@ -9841,16 +10542,14 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% \begin{macrocode}
-\@@_msg_new:nn { starred~commands }
+% \begin{macrocode}
+\@@_msg_new:nn { standard-cline~in~document }
{
- The~starred~versions~of~\token_to_str:N \Cdots,~\token_to_str:N \Ldots,~
- \token_to_str:N \Vdots,~\token_to_str:N\Ddots\ and~\token_to_str:N\Iddots\
- are~deprecated.~However,~you~can~go~on~for~this~time.~If~you~don't~want~to~
- see~this~error~we~should~load~'nicematrix'~with~the~option~
- 'starred-commands'.
+ The~key~'standard-cline'~is~available~only~in~the~preamble.\\
+ If~you~go~on~this~command~will~be~ignored.
}
% \end{macrocode}
+%
%
% \begin{macrocode}
\@@_msg_new:nn { bad~value~for~baseline }
@@ -9862,14 +10561,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-%
-% \begin{macrocode}
-\@@_msg_new:nn { Second~Block }
- {
- You~can't~use~\token_to_str:N \Block\ twice~in~the~same~cell~of~the~array.\\
- If~you~go~on,~this~command~(and~the~other)~will~be~ignored.
- }
-% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { empty~environment }
@@ -9896,6 +10587,7 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+%
% \begin{macrocode}
\@@_msg_new:nn { last-col~non~empty~for~NiceMatrixOptions }
{
@@ -9961,7 +10653,7 @@ version 2005/12/01 or later.
The~key~'\tl_use:N\l_keys_key_str'~is~unknown~for~the~command~
\token_to_str:N \NiceMatrixOptions. \\
If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys,~type~H~<return>.
+ For~a~list~of~the~*principal*~available~keys,~type~H~<return>.
}
{
The~available~options~are~(in~alphabetic~order):~
@@ -9976,7 +10668,6 @@ version 2005/12/01 or later.
create-medium-nodes,~
create-large-nodes,~
end-of-row,~
- exterior-arraycolsep,~
first-col,~
first-row,~
hlines,~
@@ -9987,7 +10678,6 @@ version 2005/12/01 or later.
letter-for-dotted-lines,~
light-syntax,~
nullify-dots,~
- parallelize-diags,~
renew-dots,~
renew-matrix,~
right-margin,~
@@ -10006,7 +10696,7 @@ version 2005/12/01 or later.
The~option~'\tl_use:N\l_keys_key_str'~is~unknown~for~the~environment~
\{NiceArray\}. \\
If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~options,~type~H~<return>.
+ For~a~list~of~the~*principal*~available~options,~type~H~<return>.
}
{
The~available~options~are~(in~alphabetic~order):~
@@ -10024,7 +10714,6 @@ version 2005/12/01 or later.
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
- end-of-row,~
extra-left-margin,~
extra-right-margin,~
first-col,~
@@ -10037,9 +10726,10 @@ version 2005/12/01 or later.
light-syntax,~
name,~
nullify-dots,~
- parallelize-diags,~
renew-dots,~
right-margin,~
+ rules/color,~
+ rules/width,~
small,~
t,~
vlines,~
@@ -10059,7 +10749,7 @@ version 2005/12/01 or later.
The~option~'\tl_use:N\l_keys_key_str'~is~unknown~for~the~
\@@_full_name_env:. \\
If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~options,~type~H~<return>.
+ For~a~list~of~the~*principal*~available~options,~type~H~<return>.
}
{
The~available~options~are~(in~alphabetic~order):~
@@ -10077,7 +10767,6 @@ version 2005/12/01 or later.
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
- end-of-row,~
extra-left-margin,~
extra-right-margin,~
first-col,~
@@ -10091,10 +10780,11 @@ version 2005/12/01 or later.
light-syntax,~
name,~
nullify-dots,~
- parallelize-diags,~
r~(=R),~
renew-dots,~
right-margin,~
+ rules/color,~
+ rules/width,~
S,~
small,~
t,~
@@ -10111,7 +10801,7 @@ version 2005/12/01 or later.
The~option~'\tl_use:N\l_keys_key_str'~is~unknown~for~the~environment~
\{NiceTabular\}. \\
If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~options,~type~H~<return>.
+ For~a~list~of~the~*principal*~available~options,~type~H~<return>.
}
{
The~available~options~are~(in~alphabetic~order):~
@@ -10129,7 +10819,6 @@ version 2005/12/01 or later.
create-extra-nodes,~
create-medium-nodes,~
create-large-nodes,~
- end-of-row,~
extra-left-margin,~
extra-right-margin,~
first-col,~
@@ -10142,9 +10831,10 @@ version 2005/12/01 or later.
light-syntax,~
name,~
nullify-dots,~
- parallelize-diags,~
renew-dots,~
right-margin,~
+ rules/color,~
+ rules/width,~
t,~
vlines,~
xdots/color,~
@@ -10187,97 +10877,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-%
-% \bigskip
-% \subsection*{Obsolete environments}
-%
-% The following environments are loaded only when the package \pkg{nicematrix}
-% has been loaded with the option |obsolete-environments|. However, they will be
-% completly deleted in a future version.
-%
-% \begin{macrocode}
-\file_input_stop:
-\NewDocumentEnvironment { pNiceArrayC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \pNiceArray
- }
- { \endpNiceArray }
- \NewDocumentEnvironment { bNiceArrayC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \bNiceArray
- }
- { \endbNiceArray }
-\NewDocumentEnvironment { BNiceArrayC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \BNiceArray
- }
- { \endBNiceArray }
-\NewDocumentEnvironment { vNiceArrayC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \vNiceArray
- }
- { \endvNiceArray }
-\NewDocumentEnvironment { VNiceArrayC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \VNiceArray
- }
- { \endVNiceArray }
-\NewDocumentEnvironment { pNiceArrayRC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \int_zero:N \l_@@_first_row_int
- \pNiceArray
- }
- { \endpNiceArray }
-\NewDocumentEnvironment { bNiceArrayRC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \int_zero:N \l_@@_first_row_int
- \bNiceArray
- }
- { \endbNiceArray }
-\NewDocumentEnvironment { BNiceArrayRC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \int_zero:N \l_@@_first_row_int
- \BNiceArray
- }
- { \endBNiceArray }
-\NewDocumentEnvironment { vNiceArrayRC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \int_zero:N \l_@@_first_row_int
- \vNiceArray
- }
- { \endvNiceArray }
-\NewDocumentEnvironment { VNiceArrayRC } { }
- {
- \int_zero:N \l_@@_last_col_int
- \int_zero:N \l_@@_first_row_int
- \VNiceArray
- }
- { \endVNiceArray }
-\NewDocumentEnvironment { NiceArrayCwithDelims } { }
- {
- \int_zero:N \l_@@_last_col_int
- \NiceArrayWithDelims
- }
- { \endNiceArrayWithDelims }
-\NewDocumentEnvironment { NiceArrayRCwithDelims } { }
- {
- \int_zero:N \l_@@_last_col_int
- \int_zero:N \l_@@_first_row_int
- \NiceArrayWithDelims
- }
- { \endNiceArrayWithDelims }
-% \end{macrocode}
-%
-%
%
% \vspace{1cm}
% \section{History}
@@ -10576,6 +11175,14 @@ version 2005/12/01 or later.
%
% Commands to color cells, row and columns with a perfect result in the \textsc{pdf}.
%
+% \subsection*{Changes between versions 4.0 and 4.1}
+%
+% New keys |cell-space-top-limit| and |cell-space-bottom-limit|
+%
+% New command |\diagbox|
+%
+% The key |hvline| don't draw rules in the blocks (commands |\Block|) and in the
+% virtual blocks corresponding to the dotted lines.
%
% \PrintIndex
%
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index 8f7fb6b647..0004ec61cd 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/poemscol/poemscol.dtx b/macros/latex/contrib/poemscol/poemscol.dtx
index 5794a2d575..0a360fbd3d 100644
--- a/macros/latex/contrib/poemscol/poemscol.dtx
+++ b/macros/latex/contrib/poemscol/poemscol.dtx
@@ -38,7 +38,7 @@
%</driver>
% \fi
%
-% \CheckSum{9964}
+% \CheckSum{10539}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -243,7 +243,7 @@
% attributions, and so on with the left margin of the verse block.}
% \changes{v3.01}{2019/08/04}{Corrections to manual}
% \changes{v3.04}{2019/08/18}{Appendix sections. New contents entries.}
-% \changes{v3.08}{2019/09/03}{Indentations of species of titles in text can be independenttly changed without changing the
+% \changes{v3.08}{2019/09/03}{Indentations of species of titles in text can be independently changed without changing the
% definition of the title. Appendix and Foreword section titles can be indented differently from notes section titles. }
% \changes{v3.081}{2019/09/05}{Fixed centertitles bug for subsections}
% \changes{v3.09}{2019/09/06}{New schemes for titles. Titles can be placed
@@ -255,7 +255,7 @@
% shortpoemattribution, JHshortepigraph, JHshortdedication. These
% commands are controlled by the same booleans that control placement
% of titles.}
-% \changes{v3.12}{2019/09/05}{Bug fix. Fix command clash with titlesec Manual revision}
+% \changes{v3.12}{2019/09/05}{Bug fix. Fix command clash with titlesec. Manual revision}
% \changes{v3.13}{2019/09/15}{Fixed subtitles in emendations and explanations, Fixed bug in sequencesectiontitlefirstline, changed sequence hierarchy of indentations, subsubsections of sequences no longer appear in contents}
% \changes{v3.14}{2019/09/27}{Bug fix: ifpagenumberinnotesfalse, Manual revision}
% \changes{v3.141}{2019/10/27}{Manual revisions. Fixed spacing of sentence and
@@ -263,6 +263,9 @@
% sections numbered by paragraph and sentence. You can suppress the appearance of the
% first sentence number, whether in the margin or in the running text. You can suppress
% the appearance of the first paragraph number, whether in the margin or in the running text.}
+% \changes{v3.14159}{2020/05/25}{Changed controlling how to place
+% marginal marks in JHpoemtitle and its siblings, and in JHtextnote
+% and its siblings. Marginal marks are now set using their own inserts, rather than using marginpar.}
% \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother}
% \DoNotIndex{\abovedisplayskip,\belowdisplayskip,\abovedisplayshortskip,\belowdisplayshortskip}
% \DoNotIndex{\newcommand, \section, \subsection, \subsubsection,
@@ -295,15 +298,15 @@
% \textsc, \unskip}
% \setcounter{IndexColumns}{2}
% \MakeShortVerb{|}
-% \def\fileversion{3.141}
-% \def\filedate{29 October 2019}
-% \def\docdate{29 October 2019}
+% \def\fileversion{3.1415}
+% \def\filedate{25 May 2020}
+% \def\docdate{25 May 2020}
% \title{Typesetting Poetry Collections with
% \textsf{poemscol}\thanks{This document corresponds to
% \textsf{poemscol}~\fileversion, dated \filedate.}}
% \author{John Burt
% \\ \texttt{burt@brandeis.edu}}
-% \date{29 October 2019}
+% \date{25 May 2020}
% \maketitle
% \begin{abstract} \textsf{poemscol} provides commands for \LaTeX\ for
% setting collections of poetry. It is especially suited for setting
@@ -556,15 +559,6 @@
% the style packages that do. I use \textsf{crop}, with the
% letter,pdftex,cam, and center options.
%
-% \subsection{~Poem titles with marginal references}
-% If
-% you are using the |\JHpoemtitle| alternate form of the |\poemtitle|
-% command, you need to add \textsf{mparhack} to your package list, to
-% make sure that the marginal references |\JHpoemtitle| adds appear on
-% the correct side of the page. You should make sure that
-% \textsf{poemscol} is the very last package you load in your
-% preamble, or at least is loaded after those packages upon which it
-% depends.
%
%
%
@@ -632,6 +626,16 @@
% the meaning of |\ifleftaligntitles| ambiguous. So I have changed that boolean to
% |\iftitlesatleftmarginofcenteredblock.|\end{sloppypar}
%
+% Up to version 3.141 the marginal marks associated with poem titles
+% set by |\JHpoemtitle| and |\margreftextnote| moved in towards the
+% verse block when the verse block is centered on the longest line.
+% These marks could be returned to their normal position in the
+% margin by setting the boolean |\margrefstomargin| to true. As of
+% version 3.141 these marks are set in the margin by default even
+% when verse block centering is in effect. The marks can be made to
+% move towards the verse block when verse block centering is in
+% effect by setting |\margrefstomargin| to false.
+%
% \section{Marking up individual poems}
% First, a word about the command names. The command names may seem
% ugly and long. And there are separate commands for many tasks that
@@ -2757,15 +2761,18 @@
% takes two arguments: first, the title of the poem, second, the label
% used by the |\label| command on the page of the notes section to
% which the title refers. So, you would issue the poem title command
-% this way: |\JHpoemtitle{Los desvelados}{EP_LosDesvelados_AC}|. Up to
+% this way: |\JHpoemtitle{Los desvelados}{EP_LosDesvelados_AC}|.
+%
+% (Up to
% version 2.49 of \textsf{poemscol} you had to be sure to define the
% label in the notes sections by issuing
% |\literaltextnote{\label{EP_LosDesvelados_AC}}|. This is no longer
% necessary, and |\JHpoemtitle| defines both the |\label| and the
-% |\pageref|. Instructions are given in section \ref{JHpoemtitle},
+% |\pageref|.)
+%
+% Instructions are given in section \ref{JHpoemtitle},
% p.~\pageref{JHpoemtitle} for how to construct similar commands for
% sequences, sequence sections, and so on.
-%
% The following related commands are defined already:
% \begin{itemize}
% \item |\JHsequencetitle| \item |\JHsequencefirstsectiontitle|
@@ -2774,20 +2781,11 @@
% \item |\JHpoemsubtitle| \item |\JHepigraph| \item |\JHprosesectiontitle|
% \item |\JHdedication| \end{itemize}
%
-% If you are using |\JHpoemtitle| and its siblings, you need to be
-% sure to add \textsf{mparhack} to your package list. You can prevent
-% the marginal reference from switching sides on alternate pages by issuing
-% |\@mparswitchfalse| (be sure to put |\makeatletter| and
-% |\makeatother| around this command). You can control the side on
-% which the marginal reference appears with |\normalmarginpar| (to
-% place them on the right) or |\reversemarginpar| (to place them on
-% the left). |\JHpoemtitle| and its siblings place the marginal
-% reference using |\marginpar|.
%
% \DescribeMacro{\setmargpoemtitle}
% |\setmargpoemtitle| is a more general version of
% |\JHpoemtitle|, with the second argument being any commands you
-% want to be issued while the title is being processed.
+% want to be issued just after the title is processed.
%
% \DescribeMacro{\margreftextnote}\label{margreftextnote}
% Another feature of Altenberg's Heredia edition is a marginal mark
@@ -2803,24 +2801,46 @@
% |\margreftextnote| generates its own label, so there is no need to
% make up one yourself.
%
-% |\margreftextnote| uses |\marginpar| rather
-% than |\pmclsidepar| to set the note, because I had to use
-% |\marginpar| for |\JHpoemtitle| and its siblings, and I wanted the
-% whole family of markers to be controlled by the same settings. You
-% use the settings that control the behavior of |\marginpar| (e.g.\
-% |\mparswitch| and |\reversemarginpar|) to control the behavior of
-% these marks.
-%
-% By default these marginal references are placed in the right margin. If you
-% are centering the verse block on the longest line, the marginal references
-% will move in closer to the line. (To center the verse block on the longest line,
-% see section \ref{centeringtextblock}.) If you would prefer to keep the marginal
-% references in the margin, set the boolean |\margrefstomargin| true.
+%\begin{sloppy}
+% |\margreftextnote| and its siblings use a
+% new kind of insert, |\JHmarginpar|, to set the marginal marks.
+% This is so that you can control the placement of these marks
+% independently of how you place the line numbers (which use
+% |\pmclsidepar|) or other marginal marks you may define using
+% |\marginpar|. Horizontal placement of the mark is controlled by the
+% length |\JHmarginparsep|, which is set by default to 0 pt. Vertical
+% placement of the marginal mark, relative to the baseline, is set by
+% the length |\JHmarginparvshift|, which is set by default to 0 pt.
+% |\JHpoemtitle|, however, uses the same commands to
+% control the placement of the mark after the title, and the two
+% kinds of mark
+% are designed so that they should always align vertically.
+% \end{sloppy}
+%
+% By default these marginal references are placed in the right
+% margin. If you wish to set them in the left margin, issue the
+% command |\JHmarksleft|. If you wish to place them back into the
+% right margin, issue the command |\JHmarksright|.
+% If you wish the
+% marks to aways be in the outer margin, issue the command
+% |\JHmarksouter|. If you wish the marks to always be in the inner
+% margin, issue |\JHmarksgutter|.
+%
+% If you are centering the verse block on the longest line, the verse
+% line numbers normally move in towards the verse block. (To center
+% the verse block on the longest line, see section
+% \ref{centeringtextblock}.) The marginal
+% marks for |\margeftextnote| do not do this, since they are designed to
+% line up with the marginal mark produced by |\JHpoemtitle|.
%
% \begin{sloppypar}
% If you define a new endnote type using |\definenewnotetype|,
% |\definenewnotetype| will also define a new |\margref| command to go
-% with it.\end{sloppypar}
+% with it. So, for example, if you define a new note type called
+% |\mynote|, you will automatically also define a ``margref'' command
+% called |\margrefmynote| which will place a mark in the margin with
+% a label showing where in the end notes sections the text of that
+% |\mynote| can be found. \end{sloppypar}
%
% \DescribeMacro{\setmargrefmarker} Altenberg's edition used a ding
% from the pifonts collection in the marginal marks made by
@@ -2829,6 +2849,11 @@
% choose another mark using |\setmargrefmarker| (e.g.\
% |\setmargrefmarker{\ding{228}}|).
%
+% \DescribeMacro{\settitlemargrefmarker} Altenberg's edition also used a
+% different marker for marginal marks for the titles of poems from that used
+% for marginal marks made by |\margreftextnote|. By default that marker
+% is |\dag|, but you can change it by using |\settitlemargrefmarker|,
+%
% \DescribeMacro{\margrefemendation} |\margrefemendation| is a
% version of |\margreftextnote| for emendations.
%
@@ -7100,6 +7125,256 @@
% |\setmargpoemtitle| with the second argument passed to |\JHlabel|,
% which actually makes the marginal mark.
% \begin{macrocode}
+\newlength{\JHtextwidth}
+\setlength{\JHtextwidth}{\textwidth}
+\newlength{\JHmarginparsep}
+\setlength{\JHmarginparsep}{0pt}
+\newlength{\JHmarginparvshift}
+\setlength{\JHmarginparvshift}{0pt}
+\newif{\ifJHmarkstoleft}
+\JHmarkstolefttrue
+\newif{\ifJHmarkstoright}
+\JHmarkstorightfalse
+\newif{\ifJHmarkstoouter}
+\JHmarkstoouterfalse
+\newif{\ifJHmarkstogutter}
+\JHmarkstogutterfalse
+\newif{\ifJHmarginparswitch}
+\JHmarginparswitchfalse
+\newif{\ifJHreversemarginpar}
+\JHreversemarginparfalse
+\newcommand{\JHmarksleft}{%
+\JHmarkstolefttrue%
+\JHmarkstorightfalse%
+\JHmarkstoouterfalse%
+\JHmarkstogutterfalse%
+\JHmarginparswitchfalse%
+\JHreversemarginparfalse%
+\reversemarginpar
+}
+\newcommand{\JHmarksright}{%
+\JHmarkstoleftfalse%
+\JHmarkstorighttrue%
+\JHmarkstoouterfalse%
+\JHmarkstogutterfalse%
+\JHmarginparswitchfalse%
+\JHreversemarginparfalse%
+\normalmarginpar
+}
+% JHmarksright is the default
+\JHmarksright
+\newcommand{\JHmarksouter}{%
+\JHmarkstoleftfalse%
+\JHmarkstorightfalse%
+\JHmarkstooutertrue%
+\JHmarkstogutterfalse%
+\JHmarginparswitchtrue%
+\JHreversemarginparfalse%
+\@mparswitchtrue
+}
+\newcommand{\JHmarksgutter}{%
+\JHmarkstoleftfalse%
+\JHmarkstorightfalse%
+\JHmarkstoouterfalse%
+\JHmarkstoguttertrue%
+\JHmarginparswitchtrue%
+\JHreversemarginpartrue%
+\@mparswitchtrue
+\reversemarginpar
+}
+% jhrightmarginpar command for notes % right side
+\newcommand{\JHrightmarginpar}[1]{%
+\pmclbsphack\strut\vadjust{%
+\rlap{\kern-\parindent%
+\kern\JHtextwidth\kern\JHmarginparsep% at right
+\setbox0=\vtop to 0pt{% added
+\begin{minipage}[t]{\marginparwidth}% added
+#1%
+\end{minipage}%
+\vss}%
+\vtop to 0pt{\kern\JHmarginparvshift% default should be 0pt
+\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}%
+% setmargref command %right side only for now
+%\newcommand{\setmargref}{
+%\JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+%}
+% jhleftmarginpar command for notes % left side
+\newcommand{\JHleftmarginpar}[1]{%
+\pmclbsphack\strut\vadjust{% changed
+\rlap{\kern-\parindent%
+\kern -\JHmarginparsep \kern -\marginparwidth% at left
+\setbox0=\vtop to 0pt{
+\begin{minipage}[t]{\marginparwidth}% added
+#1%
+\end{minipage}%
+\vss}% changed
+\vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt
+\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed
+%
+%\newcommand{\JHoutermarginpar}{%
+%%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+%\checkoddpage%
+%\ifoddpage%
+%\JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+%\else% below is for even pages
+%\JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+%\fi%
+%}
+\newcommand{\JHoutermarginpar}{%
+%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+\strictpagechecktrue%
+\checkoddpage%
+\ifoddpage%
+\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+\else% below is for even pages
+\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+\fi%
+}
+%
+%\newcommand{\JHguttermarginpar}{%
+%%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+%\checkoddpage%
+%\ifoddpage%
+% \JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+%\else% below is for even pages
+% \JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+%\fi%
+%}
+%
+\newcommand{\JHguttermarginpar}{%
+\strictpagechecktrue
+\checkoddpage%
+\ifoddpage%
+\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+\else% below is for even pages
+\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+\fi%
+}
+%
+% jhswitchmarginpar command for notes in gutter and outer
+%
+\newcommand{\JHswitchmarginpar}{\@dblarg{\@JHswitchmarginpar}}
+%\long\def\@pmclsidepar[#1]#2{\@bsphack\leavevmode\vadjust{%
+\long\def\@JHswitchmarginpar[#1]#2{\@bsphack\strut\vadjust{% added
+\checkoddpage
+ \ifJHmarginparswitch
+ \ifJHreversemarginpar
+ \ifoddpage
+ \oddpagefalse
+ \else
+ \oddpagetrue
+ \fi
+ \fi
+ \else
+ \oddpagetrue
+ \ifJHreversemarginpar
+ \oddpagefalse
+ \fi
+ \fi
+ \rlap{\kern-\parindent
+ \if@twocolumn
+ \if@firstcolumn % put at left
+ \kern -\JHmarginparsep \kern -\marginparwidth % at left
+ \else % put at right
+ \kern \columnwidth \kern \JHmarginparsep % at right
+ \fi
+ \else
+ \ifoddpage % put at right
+ \kern \textwidth \kern \JHmarginparsep % at right
+ \else % put at left
+ \kern -\JHmarginparsep \kern -\marginparwidth % at left
+ \fi
+ \fi
+% \vbox to 0pt{%
+% \kern \JHmarginparvshift% % vertical shift to align top text lines
+% \begin{minipage}{\marginparwidth}%
+ \setbox0=\vtop to 0pt{% added
+ \begin{minipage}[t]{\marginparwidth}% added
+ \ifoddpage #2\else #1\fi%
+ \end{minipage}%
+% \vss}}}\@esphack}
+\vss}% added
+ \vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt
+ \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added
+%
+% commands for placing the marginal marks for titles
+% right side
+\newcommand{\JHrighttitlemarginpar}[1]{%
+\pmclbsphack\strut\vadjust{%
+\rlap{\kern-\parindent%
+\kern\JHtextwidth\kern\JHmarginparsep% at right
+\kern-.5\JHtextwidth\kern\marginparsepmin
+\setbox0=\vtop to 0pt{% added
+\begin{minipage}[t]{\marginparwidth}% added
+#1%
+\end{minipage}%
+\vss}%
+\vtop to 0pt{\kern\JHmarginparvshift% default should be 0pt
+\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}%
+%
+% commands for placing the marginal marks for titles
+% left side
+\newcommand{\JHlefttitlemarginpar}[1]{%
+\pmclbsphack\strut\vadjust{% changed
+\rlap{\kern-\parindent%
+\kern -\JHmarginparsep \kern -\marginparwidth% at left
+\kern-.5\JHtextwidth\kern\marginparsepmin
+\setbox0=\vtop to 0pt{
+\begin{minipage}[t]{\marginparwidth}% added
+#1%
+\end{minipage}%
+\vss}% changed
+\vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt
+\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed
+%
+% command for JHmarks in title in outer margin or in gutter
+\newcommand{\JHswitchtitlemarginpar}{\@dblarg{\@JHswitchtitlemarginpar}}
+%\long\def\@pmclsidepar[#1]#2{\@bsphack\leavevmode\vadjust{%
+\long\def\@JHswitchtitlemarginpar[#1]#2{\@bsphack\strut\vadjust{% added
+\checkoddpage
+ \ifJHmarginparswitch
+ \ifJHreversemarginpar
+ \ifoddpage
+ \oddpagefalse
+ \else
+ \oddpagetrue
+ \fi
+ \fi
+ \else
+ \oddpagetrue
+ \ifJHreversemarginpar
+ \oddpagefalse
+ \fi
+ \fi
+ \rlap{\kern-\parindent
+ \if@twocolumn
+ \if@firstcolumn % put at left
+ \kern -\JHmarginparsep \kern -\marginparwidth % at left
+ \kern-.5\JHtextwidth\kern\marginparsepmin
+ \else % put at right
+ \kern \columnwidth \kern \JHmarginparsep % at right
+ \fi
+ \else
+ \ifoddpage % put at right
+ \kern \textwidth \kern \JHmarginparsep % at right
+ \kern-.5\JHtextwidth\kern\marginparsepmin
+ \else % put at left
+ \kern -\JHmarginparsep \kern -\marginparwidth % at left
+ \kern-.5\JHtextwidth\kern\marginparsepmin
+ \fi
+ \fi
+% \vbox to 0pt{%
+% \kern \pmclsideparvshift% % vertical shift to align top text lines
+% \begin{minipage}{\marginparwidth}%
+ \setbox0=\vtop to 0pt{% added
+ \begin{minipage}[t]{\marginparwidth}% added
+ \ifoddpage #2\else #1\fi%
+ \end{minipage}%
+% \vss}}}\@esphack}
+\vss}% added
+ \vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt
+ \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added
+%
\newcommand{\set@margp@emtitle}[7]{\setlength{\titleentryoverrun}{#6}%
{#2}%
{#3 \begin{titleentryenvironment}%
@@ -7144,6 +7419,7 @@
% \newcommand{\JHpoemtitle}[2]{%
% \setmargpoemtitle{#1}{\JHlabel{#2}}%
% }
+\@mparswitchfalse % so the title marker won't switch sides on alternate pages
\newcommand{\JHpoemtitle}[2]{%
\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
{\sequencetitleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}%
@@ -7162,8 +7438,23 @@
\t@xtnotesinfo{#1}%
\sources{\label{#2}}%
}
+%\newcommand{\JHlabel}[1]{%
+%\marginpar{{\scriptsize{\the\titlemargrefmarker~p.~\pageref{#1}}}}}
\newcommand{\JHlabel}[1]{%
-\marginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}}
+\ifJHmarkstoright\JHrighttitlemarginpar
+{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}
+\fi
+\ifJHmarkstoleft
+\JHlefttitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}
+\fi
+\ifJHmarkstoouter
+\JHswitchtitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}
+\fi
+\ifJHmarkstogutter
+\JHswitchtitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}
+\fi
+}
+
% \end{macrocode}
% \end{macro}
% \begin{macro}{\JHsequencetitle} Macros to set marginal page
@@ -7265,12 +7556,34 @@
\newtoks{\margrefmarker}
\margrefmarker={\dag}
\newcommand{\setmargrefmarker}[1]{\margrefmarker={#1}}
+\providecommand{\settitlemargrefmarker}[1]{\titlemargrefmarker={#1}}
+\newtoks{\titlemargrefmarker}
+\titlemargrefmarker={\dag}
\newcommand{\makemargreflabel}{\string\label\string{margref\themargrefnumber\string}}
\newif{\ifmargrefstomargin}
-\margrefstomarginfalse
-\newcommand{\setmargref}
-{\marginpar{\ifmargrefstomargin\hspace*{.5\leftmargin}\fi\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+\margrefstomargintrue
+\newcommand{\setmargref}{\nolinebreak\begin{marginenvironment}%
+\nolinebreak%
+\ifJHmarkstoright%
+ \JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+\fi%
+\ifJHmarkstoleft%
+ \JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}%
+ \fi%
+ \ifJHmarkstoouter%
+ \JHoutermarginpar%
+ \fi%
+ \ifJHmarkstogutter%
+ \JHguttermarginpar%
+ \fi%
+ \end{marginenvironment}%
+ \nolinebreak%
}
+
+%\newcommand{\setmargref}
+%{\marginpar{\ifmargrefstomargin\hspace*{.5\leftmargin}\fi%
+%\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+%}
% \newcommand{\setmargref}
% {\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
% }
@@ -7419,6 +7732,17 @@
\else\setlength{\dateindent}{\leftmargin}%
\fi%
\bigskip\begin{raggedleft}\hspace{\dateindent}#1\end{raggedleft}\bigskip}%
+%
+\newlength{\poemattributionindent}%
+\setlength{\poemattributionindent}{\leftmargin}%
+\newcommand{\variablepoemattributionindent}{%
+\setlength{\poemattributionindent}{\linewidth}%
+\addtolength{\poemattributionindent}{-\versewidth}%
+\addtolength{\poemattributionindent}{-.5\poemattributionindent}}%
+\newcommand{\poemattribution}[1]{\iflastpoemcentered\variablepoemattributionindent%
+\else\setlength{\poemattributionindent}{\leftmargin}%
+\fi%
+\bigskip\begin{raggedleft}\hspace{\poemattributionindent}#1\end{raggedleft}\bigskip}%
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/contrib/poemscol/poemscol.pdf b/macros/latex/contrib/poemscol/poemscol.pdf
index 8ed00e4557..8d97ec5b82 100644
--- a/macros/latex/contrib/poemscol/poemscol.pdf
+++ b/macros/latex/contrib/poemscol/poemscol.pdf
Binary files differ
diff --git a/macros/latex/required/amscls/README b/macros/latex/required/amscls/README
index 7273ec23ec..9c4528e516 100644
--- a/macros/latex/required/amscls/README
+++ b/macros/latex/required/amscls/README
@@ -1,6 +1,6 @@
-README file for AMS document classes amsart/book/proc 2.20.4 [2017/10/31]
+README file for AMS document classes amsart/book/proc 2.20.5 [2020/05/21]
-Copyright 2004, 2010, 2014-2017 American Mathematical Society.
+Copyright 2004, 2010, 2014-2017, 2020 American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
@@ -70,6 +70,9 @@ frozen or changes to the base class are under your control.)
========================================================================
RECENT CHANGES
+---amsclass.dtx 2.20.5 2020/05/21
+Added support for MSC 2020 and made it the default.
+
---amsclass.dtx 2.20.4 2017/10/31
Changed \emailaddrname: replaced "E-mail" by "Email"
diff --git a/macros/latex/required/amscls/amsclass.dtx b/macros/latex/required/amscls/amsclass.dtx
index eb6abaf520..b070629d7a 100644
--- a/macros/latex/required/amscls/amsclass.dtx
+++ b/macros/latex/required/amscls/amsclass.dtx
@@ -1,6 +1,6 @@
% \def\filename{amsclass.dtx}
-% \def\fileversion{2.20.4}
-% \def\filedate{2017/10/31}
+% \def\fileversion{2.20.5}
+% \def\filedate{2020/05/21}
%
% \iffalse meta-comment
%
@@ -15,20 +15,13 @@
% fax: (401) 331-3842
% email: tech-support@ams.org
%
-% Copyright 1995, 1999, 2004, 2009, 2015-2017 American Mathematical Society.
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3c
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is the American Mathematical
-% Society.
+% Copyright 1995, 1999, 2004, 2009, 2015, 2017, 2020 American
+% Mathematical Society.
+%
+% Unlimited copying and redistribution of this file are permitted as
+% long as this file is not modified. Modifications, and distribution
+% of modified versions, are permitted, but only if the resulting file
+% is renamed.
%
% \fi
%
@@ -82,13 +75,13 @@
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1995/06/01]% LaTeX date must be June 1995 or later
%<*amsart>
-\ProvidesClass{amsart}[2017/10/31 v2.20.4]
+\ProvidesClass{amsart}[2020/05/21 v2.20.5]
%</amsart>
%<*amsproc>
-\ProvidesClass{amsproc}[2017/10/31 v2.20.4]
+\ProvidesClass{amsproc}[2020/05/21 v2.20.5]
%</amsproc>
%<*amsbook>
-\ProvidesClass{amsbook}[2017/10/31 v2.20.4]
+\ProvidesClass{amsbook}[2020/05/21 v2.20.5]
%</amsbook>
% \end{macrocode}
% For \pkg{amsthm} we need to guard against redundant loading via
@@ -105,7 +98,7 @@
\csname ver@\@currname.\@currext\endcsname
%</classes>
%<*amsthm>
-\ProvidesPackage{amsthm}[2017/10/31 v2.20.4]
+\ProvidesPackage{amsthm}[2020/05/21 v2.20.5]
%</amsthm>
% \end{macrocode}
%
@@ -1496,13 +1489,13 @@
% To allow various versions of the subject classification, accept an
% optional value to identify the version, provide text for the two
% currently in use, and give a warning if the version specified is
-% unknown. Default to 1991 version. [bnb, 1999/04/30]
+% unknown. Default to 2020 version.
% \begin{macrocode}
-\newcommand*\subjclass[2][1991]{%
+\newcommand*\subjclass[2][2020]{%
\def\@subjclass{#2}%
\@ifundefined{subjclassname@#1}{%
\ClassWarning{\@classname}{Unknown edition (#1) of Mathematics
- Subject Classification; using '1991'.}%
+ Subject Classification; using '2020'.}%
}{%
\@xp\let\@xp\subjclassname\csname subjclassname@#1\endcsname
}%
@@ -2018,23 +2011,26 @@
\newcommand{\abstractname}{Abstract}
\newcommand{\keywordsname}{Key words and phrases}
% \end{macrocode}
-% For now, support just the two most recent versions; earlier versions
+% Support the most recent versions. Earlier, unsupported versions
% were:
% \begin{itemize}
% \item \textup{1980} Mathematics Subject Classification
% \item \textup{1980} Mathematics Subject Classification
% \textup{(1985} Revision\textup{)}
% \end{itemize}
-% Default to the 1991 edition, as that's what is in production at the
-% time this change is made. [bnb, 1999/04/30]
% \begin{macrocode}
-\newcommand{\subjclassname}{%
+\@namedef{subjclassname@1991}{%
\textup{1991} Mathematics Subject Classification}
-\@xp\let\csname subjclassname@1991\endcsname \subjclassname
\@namedef{subjclassname@2000}{%
\textup{2000} Mathematics Subject Classification}
\@namedef{subjclassname@2010}{%
\textup{2010} Mathematics Subject Classification}
+\@namedef{subjclassname@2020}{%
+ \textup{2020} Mathematics Subject Classification}
+% \end{macrocode}
+% Default to the 2020 edition.
+% \begin{macrocode}
+\@xp\let\@xp\subjclassname\csname subjclassname@2020\endcsname
% \end{macrocode}
% For the date we have a special little problem: We only want to add
% the `Received by the editors' text for publication-specific
diff --git a/macros/latex/required/amscls/amsclass.ins b/macros/latex/required/amscls/amsclass.ins
index 5f5aa98303..9cebbc4939 100644
--- a/macros/latex/required/amscls/amsclass.ins
+++ b/macros/latex/required/amscls/amsclass.ins
@@ -13,7 +13,7 @@
%% fax: (401) 331-3842
%% email: tech-support@ams.org
%%
-%% Copyright 1999, 2010, 2011, 2014-2017 American Mathematical Society.
+%% Copyright 1999, 2010, 2011, 2014-2020 American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -40,7 +40,8 @@
This is a generated file.
-Copyright 1995, 199, 2004, 2009, 2015, 2017 American Mathematical Society.
+Copyright 1995, 1999, 2004, 2009, 2015, 2017, 2020 American
+Mathematical Society.
American Mathematical Society
Technical Support
@@ -53,20 +54,10 @@ tel: (401) 455-4080
fax: (401) 331-3842
email: tech-support@ams.org
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3c
-of this license or (at your option) any later version.
-The latest version of this license is in
- http://www.latex-project.org/lppl.txt
-and version 1.3c or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
-
-This work has the LPPL maintenance status `maintained'.
-
-The Current Maintainer of this work is the American Mathematical
-Society.
-
-========================================================================
+Unlimited copying and redistribution of this file are permitted as
+long as this file is not modified. Modifications, and distribution
+of modified versions, are permitted, but only if the resulting file
+is renamed.
\endpreamble
diff --git a/macros/latex/required/amscls/doc/amsclass.pdf b/macros/latex/required/amscls/doc/amsclass.pdf
index 2e484a954e..cc7d0a7856 100644
--- a/macros/latex/required/amscls/doc/amsclass.pdf
+++ b/macros/latex/required/amscls/doc/amsclass.pdf
Binary files differ
diff --git a/macros/latex/required/amscls/doc/diffs-c.txt b/macros/latex/required/amscls/doc/diffs-c.txt
index 61c647df7f..2119589067 100644
--- a/macros/latex/required/amscls/doc/diffs-c.txt
+++ b/macros/latex/required/amscls/doc/diffs-c.txt
@@ -1,6 +1,6 @@
-diffs-c.txt [2017/10/31]
+diffs-c.txt [2020/05/27]
-Copyright 2004, 2010, 2017 American Mathematical Society.
+Copyright 2004, 2010, 2017, 2020 American Mathematical Society.
American Mathematical Society
Technical Support
@@ -32,6 +32,11 @@ History of changes for AMS document classes, the amsthm package, and
other packages distributed in this collection.
========================================================================
+Differences in amsart/amsbook/amsproc 2.20.5 (May 2020)
+
+---Added support for MSC 2020 and made it the default.
+
+========================================================================
Differences in amsart/amsbook/amsproc 2.20.4 (October 2017)
---Text for \emailaddrname changed from "E-mail" to "Email".
diff --git a/macros/luatex/latex/cloze/README b/macros/luatex/latex/cloze/README.md
index 1369553b81..04dc316ef3 100644
--- a/macros/luatex/latex/cloze/README
+++ b/macros/luatex/latex/cloze/README.md
@@ -8,7 +8,7 @@ Es nutzt die Möglichkeiten der modernen TeX-Engine LuaTeX.
# License
-Copyright (C) 2015 by Josef Friedrich <josef@friedrich.rocks>
+Copyright (C) 2015-2020 by Josef Friedrich <josef@friedrich.rocks>
------------------------------------------------------------------------
This work may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3 of this license
@@ -46,8 +46,56 @@ Compile:
or manually:
luatex cloze.ins
- lualatex cloze.dtx
+ lualatex --shell-escape cloze.dtx
makeindex -s gglo.ist -o cloze.gls cloze.glo
makeindex -s gind.ist -o cloze.ind cloze.idx
- lualatex cloze.dtx
+ lualatex --shell-escape cloze.dtx
+# Development
+
+First delete the stable version installed by TeX Live. Because the
+package `cloze` belongs to the collection `collection-latexextra`, the
+option `--force` must be used to delete the package.
+
+ tlmgr remove --force cloze
+
+## Deploying a new version
+
+Update the version number in the file `cloze.dtx` on this locations:
+
+### In the markup for the file `cloze.sty` (approximately at the line number 30)
+
+ %<*package>
+ [2020/05/20 v1.4 Package to typeset cloze worksheets or cloze tests]
+ %<*package>
+
+### In the markup for the package documentation (approximately at the line number 1250)
+
+Add a changes entry:
+
+```latex
+\changes{v1.4}{2020/05/20}{...}
+```
+
+### In the markup for the file `cloze.lua` (approximately at the line number 1900)
+
+```lua
+if not modules then modules = { } end modules ['cloze'] = {
+ version = '1.4'
+}
+```
+
+### Update the copyright year:
+
+```
+sed -i 's/(C) 2015-2020/(C) 2015-2021/g' cloze.ins
+sed -i 's/(C) 2015-2020/(C) 2015-2021/g' cloze.dtx
+```
+
+### Command line tasks:
+
+```
+git tag v1.4
+make
+make ctan
+```
diff --git a/macros/luatex/latex/cloze/cloze.dtx b/macros/luatex/latex/cloze/cloze.dtx
index e8d7e3ea17..f2ec1be8c5 100644
--- a/macros/luatex/latex/cloze/cloze.dtx
+++ b/macros/luatex/latex/cloze/cloze.dtx
@@ -28,7 +28,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{cloze}
%<*package>
- [2020/05/20 v1.4 Package to typeset cloze worksheets or cloze tests]
+ [2020/05/27 v1.5 Package to typeset cloze worksheets or cloze tests]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -52,6 +52,16 @@
urlcolor=red,
]{hyperref}
+\usepackage{minted}
+\usemintedstyle{colorful}
+\BeforeBeginEnvironment{minted}{\begin{mdframed}[backgroundcolor=gray!3]}
+\AfterEndEnvironment{minted}{\end{mdframed}}
+\setminted{
+ breaklines=true,
+ fontsize=\footnotesize,
+}
+
+
\MakeShortVerb{\|}
\setlength{\fboxrule}{0.2pt}
@@ -357,17 +367,17 @@ Using the option |align| you can make nice tabulars like this:
The macro name |clozenol| stands for \emph{“cloze no line”}. As the
the name suggests this macro typesets cloze texts without a line.
-\begin{verbatim}
+\begin{minted}{latex}
Lorem \clozenol{ipsum dolor} sit amet.
-\end{verbatim}
+\end{minted}
\begin{example}
Lorem \clozenol{ipsum dolor} sit amet.
\end{example}
-\begin{verbatim}
+\begin{minted}{latex}
Lorem \clozenol[textcolor=green]{ipsum dolor} sit amet.
-\end{verbatim}
+\end{minted}
\begin{example}
Lorem \clozenol[textcolor=green]{ipsum dolor} sit amet.
@@ -403,7 +413,7 @@ Ut enim \clozefil{ad minim veniam} exercitation.
The command |\clozeextend| adds some invisible placeholders to extend
some cloze texts with blank space.
-\begin{verbatim}
+\begin{minted}{latex}
\begin{itemize}
\item \clozefil{Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna
@@ -411,7 +421,7 @@ aliqua.}
\item \clozefil{Ut enim ad minim veniam \clozeextend[20]}
\item \clozefil{quis nostrud \clozeextend[20]}
\end{itemize}
-\end{verbatim}
+\end{minted}
\begin{example}
\begin{itemize}
@@ -462,12 +472,12 @@ around the box. Use the options |boxwidth| and |boxheight| to specify
the dimensions of the box. By default the width of the box is
|\linewidth|.
-\begin{verbatim}
+\begin{minted}{latex}
\begin{clozebox}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
\end{clozebox}
-\end{verbatim}
+\end{minted}
\bigskip
\noindent
@@ -499,12 +509,12 @@ tempor incididunt ut labore et dolore magna aliqua.
\label{sec:command-clozebox-boxwidth}
See the documentation about the option \secref{sec:option-boxwidth}.
-\begin{verbatim}
+\begin{minted}{latex}
\begin{clozebox}[boxwidth=5cm]
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
\end{clozebox}
-\end{verbatim}
+\end{minted}
\begin{center}
\begin{clozebox}[boxwidth=5cm]
@@ -517,12 +527,12 @@ tempor incididunt ut labore et dolore magna aliqua.
\label{sec:command-clozebox-boxheight}
See the documentation about the option \secref{sec:option-boxheight}.
-\begin{verbatim}
+\begin{minted}{latex}
\begin{clozebox}[boxwidth=5cm,boxheight=5cm]
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
\end{clozebox}
-\end{verbatim}
+\end{minted}
\begin{center}
\begin{clozebox}[boxwidth=5cm,boxheight=5cm]
@@ -534,12 +544,12 @@ tempor incididunt ut labore et dolore magna aliqua.
\paragraph{starred}
% starred
-\begin{verbatim}
+\begin{minted}{latex}
\begin{clozebox}*[boxwidth=5cm,boxheight=5cm]
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
\end{clozebox}
-\end{verbatim}
+\end{minted}
\begin{center}
\begin{clozebox}*[boxwidth=5cm,boxheight=5cm]
@@ -558,7 +568,7 @@ tempor incididunt ut labore et dolore magna aliqua.
\DescribeEnv{clozespace} |\begin{clozespace}|\oarg{options} \dots
\textit{some text} \dots |\end{clozespace}|
-\begin{verbatim}
+\begin{minted}{latex}
\begin{clozespace}[spacing=2]
\clozesetfont{\ttfamily\Huge}
Lorem \cloze{ipsum} dolor sit \cloze{amet}, consectetur adipisicing
@@ -567,7 +577,7 @@ aliqua. Ut enim ad minim veniam, quis \cloze{nostrud}
exercitation ullamco \cloze{laboris} nisi ut aliquip ex ea commodo
consequat.
\end{clozespace}
-\end{verbatim}
+\end{minted}
\begin{example}
\begin{clozespace}[spacing=2]
@@ -595,11 +605,11 @@ To create a cloze line of a certain width, use the command
\tt{\getdefaults{width}}. In combination with the other cloze commands
you can create for example an irregular alignment of the cloze text.
-\begin{verbatim}
+\begin{minted}{latex}
Ut enim ad
\clozeline[width=1cm]\cloze{minim}\clozeline[width=3cm]
minim veniam
-\end{verbatim}
+\end{minted}
\begin{example}
Ut enim ad \clozeline[width=1cm]\cloze{minim}\clozeline[width=3cm] minim
@@ -633,17 +643,17 @@ Lorem\clozelinefil
\DescribeMacro{\clozestrike}
\cmd{\clozestrike}\oarg{options}\marg{wrong text}\marg{correct text}
-\begin{verbatim}
+\begin{minted}{latex}
Lorem \clozestrike{ipsum}{dolor} sit amet.
-\end{verbatim}
+\end{minted}
\begin{example}
Lorem \clozestrike{ipsum}{dolor} sit amet.
\end{example}
-\begin{verbatim}
+\begin{minted}{latex}
Lorem \clozestrike[textcolor=red]{ipsum}{dolor} sit amet.
-\end{verbatim}
+\end{minted}
\begin{example}
Lorem \clozestrike[textcolor=red]{ipsum}{dolor} sit amet.
@@ -705,10 +715,10 @@ declaration, the cloze package offers a special command to set
\cmd{\clozeset}\marg{global options}: The command can set \emph{global}
options for each paragraph.
-\begin{verbatim}
+\begin{minted}{latex}
\clozeset{textcolor=red} Lorem \cloze{ipsum} dolor \par
\clozeset{textcolor=green} Lorem \cloze{ipsum} dolor
-\end{verbatim}
+\end{minted}
\begin{example}
\clozeset{textcolor=red} Lorem \cloze{ipsum} dolor \par
@@ -719,10 +729,10 @@ options for each paragraph.
paragraph. As you can see in the example below the last \cmd{\clozeset}
applies the color green for both gaps.
-\begin{verbatim}
+\begin{minted}{latex}
\clozeset{textcolor=red} Lorem \cloze{ipsum} dolor
\clozeset{textcolor=green} Lorem \cloze{ipsum} dolor
-\end{verbatim}
+\end{minted}
\begin{example}
\clozeset{textcolor=red} Lorem \cloze{ipsum} dolor
@@ -742,14 +752,14 @@ applies the color green for both gaps.
\cmd{\clozereset}: The command resets all \emph{global} options to the
default values. It has no effect on the \emph{local} options.
-\begin{verbatim}
+\begin{minted}{latex}
\clozeset{
thickness=3mm,
linecolor=yellow,
textcolor=magenta,
margin=-2pt
}
-\end{verbatim}
+\end{minted}
\clozeset{thickness=3mm,linecolor=yellow,textcolor=magenta,margin=-2pt}
@@ -757,9 +767,9 @@ default values. It has no effect on the \emph{local} options.
Very \cloze{silly} global \cloze{options}.
\end{example}
-\begin{verbatim}
+\begin{minted}{latex}
\clozereset
-\end{verbatim}
+\end{minted}
\clozereset
\begin{example}
@@ -778,9 +788,9 @@ Very \cloze{silly} global \cloze{options}.
\cmd{\clozeshow} and \cmd{\clozehide}: This commands are shortcuts for
\cmd{\clozeset}\marg{show} and \cmd{\clozeset}\marg{hide}.
-\begin{verbatim}
+\begin{minted}{latex}
\clozehide
-\end{verbatim}
+\end{minted}
\clozehide
\begin{example}
@@ -788,9 +798,9 @@ Lorem \cloze{ipsum dolor sit} amet, consectetur \cloze{adipisicing}
elit.
\end{example}
-\begin{verbatim}
+\begin{minted}{latex}
\clozeshow
-\end{verbatim}
+\end{minted}
\clozeshow
\begin{example}
@@ -914,10 +924,10 @@ options -- |hide| and |show| -- the last option "wins".
Values for both color options are color names used by the xcolor
package. To define your own color use the following command:
-\begin{verbatim}
+\begin{minted}{latex}
\definecolor{myclozecolor}{rgb}{0.1,0.4,0.6}
\cloze[textcolor=myclozecolor]{Lorem ipsum}
-\end{verbatim}
+\end{minted}
\definecolor{myclozecolor}{rgb}{0.1,0.4,0.6}
\newcommand{\optioncolor}[2]{%
@@ -941,6 +951,17 @@ package. To define your own color use the following command:
\optioncolor{linecolor}{green}
\end{example}
+\noindent
+And now hide the clozes:
+
+\clozehide
+\begin{example}
+\optioncolor{linecolor}{myclozecolor}
+\optioncolor{linecolor}{red}
+\optioncolor{linecolor}{green}
+\end{example}
+\clozeshow
+
%%
% margin
%%
@@ -1051,18 +1072,72 @@ option is \tt{\getdefaults{width}}.
\subsection{Special application areas}
+This section lists examples that didn’t work in older versions of
+the cloze package and required special treatment to work as expected.
+
+\subsubsection{The math mode}
+
+By default the package uses |\itshape| to format the cloze text. In
+math mode you have to reset the cloze text format by calling
+|\clozesetfont{}|. A known bug ist: You can’t show and hide
+single display math formulas. Only the last |\clozeshow| or |\clozehide|
+takes effect on the whole document. Side note: The usage of the \TeX
+primitive syntax |$$| is not recommended.
+
+\clozesetfont{}
+
+\begin{minted}{latex}
+\clozesetfont{}
+$$1 + 1 = \cloze{2}$$
+\clozesetfont{\itshape}
+\end{minted}
+
+$$1 + 1 = \cloze{2}$$
+
+\noindent
+|\[\]| should be used instead.
+
+\begin{minted}{latex}
+\[123 + 456 = \cloze{579}\]
+\end{minted}
+
+\[123 + 456 = \cloze{579}\]
+
+\begin{minted}{latex}
+\begin{displaymath}
+2^{\cloze{2}} = 4
+\end{displaymath}
+\end{minted}
+
+\begin{displaymath}
+2^{\cloze{2}} = 4
+\end{displaymath}
+
+\noindent
+The inline math mode works too:
+
+\begin{minted}{latex}
+${\sqrt[3]{\cloze{8}}} = 2$ and ${\sqrt[\cloze{3}]{\cloze{8}}} = 2$
+\end{minted}
+
+\begin{center}
+${\sqrt[3]{\cloze{8}}} = 2$ and ${\sqrt[\cloze{3}]{\cloze{8}}} = 2$
+\end{center}
+
+\clozesetfont{\itshape}
+
%%
% tabbing
%%
\subsubsection{The \tt{tabbing} environment}
-\begin{verbatim}
+\begin{minted}{latex}
\begin{tabbing}
col1 \hspace{1cm} \= col2 \hspace{1cm} \= col3 \hspace{1cm} \= col4 \\
\cloze{col1} \> \> \clozefix{col3} \\
\end{tabbing}
-\end{verbatim}
+\end{minted}
\begin{example}
\begin{tabbing}
@@ -1077,13 +1152,13 @@ col1 \hspace{1cm} \= col2 \hspace{1cm} \= col3 \hspace{1cm} \= col4 \\
\subsubsection{The \tt{picture} environment}
-\begin{verbatim}
+\begin{minted}{latex}
\begin{picture}(320,100)
\put(80,25){\cloze{Lorem}}
\put(160,50){\clozefix{ipsum}}
\put(240,75){\clozefil{dolor}}
\end{picture}
-\end{verbatim}
+\end{minted}
\begin{example}
\begin{picture}(320,100)
@@ -1099,13 +1174,13 @@ col1 \hspace{1cm} \= col2 \hspace{1cm} \= col3 \hspace{1cm} \= col4 \\
\subsubsection{The \tt{tabular} environment}
-\begin{verbatim}
+\begin{minted}{latex}
\begin{tabular}{l c}
\cloze{Lorem} & \cloze{ipsum} \\
\clozefix{amet} & \clozefix{consectetur} \\
\cloze{sed} & \cloze{do} \\
\end{tabular}
-\end{verbatim}
+\end{minted}
% No |c| inside because of short verbatim.
@@ -1118,68 +1193,32 @@ col1 \hspace{1cm} \= col2 \hspace{1cm} \= col3 \hspace{1cm} \= col4 \\
\end{tabular}
\end{example}
- \DocInput{cloze.dtx}
- \pagebreak
- \PrintChanges
- \pagebreak
- \PrintIndex
-\end{document}
-%</driver>
-%<*readme>
-# Description
-
-EN: `cloze` is a LuaLaTeX/LaTeX package to generate cloze. It uses the
-capabilities of the modern TeX engine LuaTex.
-
-DE: `cloze` ist a LuaLaTeX/LaTeX-Paket zum Erstellen von Lückentexten.
-Es nutzt die Möglichkeiten der modernen TeX-Engine LuaTeX.
+\section{Some graphics for better understanding of the node tree}
-# License
+\subsection{Paragraph}
-Copyright (C) 2015 by Josef Friedrich <josef@friedrich.rocks>
-------------------------------------------------------------------------
-This work may be distributed and/or modified under the conditions of
-the LaTeX Project Public License, either version 1.3 of this license
-or (at your option) any later version. The latest version of this
-license is in:
+\noindent\includegraphics[width=\linewidth]{graphics/par}
- http://www.latex-project.org/lppl.txt
+\subsection{Tabular environment}
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
+\noindent\includegraphics[width=\linewidth]{graphics/tabular}
-# CTAN
+\subsection{Picture environment}
-Since July 2015 the cloze package is included in the Comprehensive TeX
-Archive Network (CTAN).
+\noindent\includegraphics[width=\linewidth]{graphics/picture}
-* TeX archive: http://mirror.ctan.org/tex-archive/macros/luatex/latex/cloze
-* Package page: https://www.ctan.org/pkg/cloze
+\DocInput{cloze.dtx}
-# Repository
+\subsection{The file cloze.lua}
-https://github.com/Josef-Friedrich/cloze
+\inputminted{lua}{cloze.lua}
-# Installation
-
-Get source:
-
- git clone git@github.com:Josef-Friedrich/cloze.git
- cd cloze
-
-Compile:
-
- make
-
-or manually:
-
- luatex cloze.ins
- lualatex cloze.dtx
- makeindex -s gglo.ist -o cloze.gls cloze.glo
- makeindex -s gind.ist -o cloze.ind cloze.idx
- lualatex cloze.dtx
-
-%</readme>
+\pagebreak
+\PrintChanges
+\pagebreak
+\PrintIndex
+\end{document}
+%</driver>
% \fi
%
% \CheckSum{0}
@@ -1202,17 +1241,34 @@ or manually:
%
%
% \changes{v0.1}{2015/06/16}{Converted to DTX file}
+%
% \changes{v1.0}{2015/07/08}{Inital release}
+%
% \changes{v1.1}{2016/06/13}{Make cloze compatible to LuaTeX version
% 0.95}
+%
% \changes{v1.2}{2016/06/23}{The cloze makros are now working in
% tabular, tabbing and picture environments}
+%
% \changes{v1.3}{2017/03/13}{Add the new macros \cmd{\clozenol} and
% \cmd{\clozeextend} and the environments \texttt{clozebox} and
% \texttt{clozespace} (This version was not published on CTAN.)}
+%
% \changes{v1.4}{2020/05/20}{Add the new macro \cmd{\clozestrike} and
% improve the documentation}
%
+% \changes{v1.5}{2020/05/27}{
+% The Lua part of the package (cloze.lua) is now being developed in a
+% separate file.
+% The readme file is now a standalone mardown file and not embedded in
+% the dtx file any more.
+% \href{https://github.com/stevedonovan/LDoc}{LDoc} is being used
+% to generate
+% \href{https://josef-friedrich.github.io/cloze}{source code documentation}.
+% This version fixes two bugs (cloze in display math, line color and
+% hide).
+% }
+%
% \DoNotIndex{\newcommand,\newenvironment,\def,\directlua}
%
% \StopEventually{}
@@ -1867,967 +1923,6 @@ or manually:
%
% \iffalse
%</package>
-%<*lua>
-% \fi
-%
-% \makeatletter
-% \c@CodelineNo 0 \relax
-% \makeatother
-%
-% \subsection{The file \tt{cloze.lua}}
-%
-% \setlength{\parindent}{0pt}
-%
-% \paragraph{Initialisation of the function tables}
-%
-% It is good form to provide some background informations about this Lua
-% module.
-% \begin{macrocode}
-if not modules then modules = { } end modules ['cloze'] = {
- version = '1.4',
- comment = 'cloze',
- author = 'Josef Friedrich, R.-M. Huber',
- copyright = 'Josef Friedrich, R.-M. Huber',
- license = 'The LaTeX Project Public License Version 1.3c 2008-05-04'
-}
-% \end{macrocode}
-%
-% |nodex| is a abbreviation for \emph{node eXtended}.
-% \begin{macrocode}
-local nodex = {}
-% \end{macrocode}
-%
-% All values and functions, which are related to the option management,
-% are stored in a table called |registry|.
-%
-% \begin{macrocode}
-local registry = {}
-% \end{macrocode}
-%
-% I didn't know what value I should take as |user_id|. Therefore I took
-% my birthday and transformed it to a large number.
-% \begin{macrocode}
-registry.user_id = 3121978
-registry.storage = {}
-registry.defaults = {
- ['align'] = 'l',
- ['boxheight'] = false,
- ['boxwidth'] = '\\linewidth',
- ['distance'] = '1.5pt',
- ['hide'] = false,
- ['linecolor'] = '0 0 0 rg 0 0 0 RG', -- black
- ['linecolor_name'] = 'black',
- ['margin'] = '3pt',
- ['resetcolor'] = '0 0 0 rg 0 0 0 RG', -- black
- ['resetcolor_name'] = 'black',
- ['show_text'] = true,
- ['show'] = true,
- ['spacing'] = '1.6',
- ['textcolor'] = '0 0 1 rg 0 0 1 RG', -- blue
- ['textcolor_name'] = 'blue', -- blue
- ['thickness'] = '0.4pt',
- ['width'] = '2cm',
-}
-registry.global_options = {}
-registry.local_options = {}
-% \end{macrocode}
-%
-% All those functions are stored in the table |cloze| that are
-% registered as callbacks to the pre and post linebreak filters.
-% \begin{macrocode}
-local cloze = {}
-% \end{macrocode}
-% In the status table are stored state information, which are necessary
-% for the recursive cloze generation.
-% \begin{macrocode}
-cloze.status = {}
-% \end{macrocode}
-%
-% The |base| table contains some basic functions. |base| is the only
-% table of this Lua module that will be exported.
-% \begin{macrocode}
-local base = {}
-base.is_registered = {}
-% \end{macrocode}
-%
-% \subsubsection{Node precessing (nodex)}
-%
-% All functions in this section are stored in a table called |nodex|.
-% |nodex| is a abbreviation for \emph{node eXtended}. The |nodex| table
-% bundles all functions, which extend the built-in |node| library.
-%
-% \paragraph{Color handling (color)}
-%
-% \clozeluafunction{create_colorstack}
-% Create a whatsit node of the subtype |pdf_colorstack|. |data| is a PDF
-% colorstack string like |0 0 0 rg 0 0 0 RG|.
-% \begin{macrocode}
-function nodex.create_colorstack(data)
- if not data then
- data = '0 0 0 rg 0 0 0 RG' -- black
- end
- local whatsit = node.new('whatsit', 'pdf_colorstack')
- whatsit.stack = 0
- whatsit.data = data
- return whatsit
-end
-% \end{macrocode}
-%
-% \clozeluafunction{create_color}
-% |nodex.create_color()| is a wrapper for the function
-% |nodex.create_colorstack()|. It queries the current values of the
-% options |linecolor| and |textcolor|. The argument |option| accepts the
-% strings |line|, |text| and |reset|.
-% \begin{macrocode}
-function nodex.create_color(option)
- local data
- if option == 'line' then
- data = registry.get_value('linecolor')
- elseif option == 'text' then
- data = registry.get_value('textcolor')
- elseif option == 'reset' then
- data = nil
- else
- data = nil
- end
- return nodex.create_colorstack(data)
-end
-% \end{macrocode}
-%
-% \paragraph{Line handling (line)}
-%
-% \clozeluafunction{create_line}
-% Create a rule node, which is used as a line for the cloze texts. The
-% |depth| and the |height| of the rule are calculated form the options
-% |thickness| and |distance|. The argument |width| must have the length
-% unit \emph{scaled points}.
-% \begin{macrocode}
-function nodex.create_line(width)
- local rule = node.new(node.id('rule'))
- local thickness = tex.sp(registry.get_value('thickness'))
- local distance = tex.sp(registry.get_value('distance'))
- rule.depth = distance + thickness
- rule.height = - distance
- rule.width = width
- return rule
-end
-% \end{macrocode}
-%
-% \clozeluafunction{insert_list}
-% Insert a |list| of nodes after or before the |current|. The |head|
-% argument is optional. In some edge cases it is unfortately necessary.
-% if |head| is omitted the |current| node is used. The argument
-% |position| can take the values |'after'| or |'before'|.
-% \begin{macrocode}
-function nodex.insert_list(position, current, list, head)
- if not head then
- head = current
- end
- for i, insert in ipairs(list) do
- if position == 'after' then
- head, current = node.insert_after(head, current, insert)
- elseif position == 'before' then
- head, current = node.insert_before(head, current, insert)
- end
- end
- return current
-end
-% \end{macrocode}
-%
-% \clozeluafunction{insert_line}
-% Enclose a rule node (cloze line) with two PDF colorstack whatsits. The
-% first colorstack node dyes the line, the seccond resets the color.
-%
-% \subparagraph*{Node list:}
-%
-% \begin{nodelist}
-% |n.color_line| & |whatsit| & |pdf_colorstack| & Line color \\
-% |n.line| & |rule| & & |width| \\
-% |n.color_reset| & |whatsit| & |pdf_colorstack| & Reset color \\
-% \end{nodelist}
-%
-% \begin{macrocode}
-function nodex.insert_line(current, width)
- return nodex.insert_list(
- 'after',
- current,
- {
- nodex.create_color('line'),
- nodex.create_line(width),
- nodex.create_color('reset')
- }
- )
-end
-% \end{macrocode}
-%
-% \clozeluafunction{write_line}
-% This function enclozes a rule node with color nodes as it the function
-% |nodex.insert_line| does. In contrast to |nodex.insert_line| the three
-% nodes are appended to \TeX’s ‘current list’. They are not inserted in
-% a node list, which is accessed by a Lua callback.
-%
-% \subparagraph*{Node list:}
-%
-% \begin{nodelist}
-% - & |whatsit| & |pdf_colorstack| & Line color \\
-% - & |rule| & & |width| \\
-% - & |whatsit| & |pdf_colorstack| & Reset color \\
-% \end{nodelist}
-%
-% \begin{macrocode}
-function nodex.write_line()
- node.write(nodex.create_color('line'))
- node.write(nodex.create_line(tex.sp(registry.get_value('width'))))
- node.write(nodex.create_color('reset'))
-end
-% \end{macrocode}
-%
-% \paragraph{Handling of extendable lines (linefil)}
-%
-% \clozeluafunction{create_linefil}
-% This function creates a line which stretchs indefinitely in the
-% horizontal direction.
-% \begin{macrocode}
-function nodex.create_linefil()
- local glue = node.new('glue')
- glue.subtype = 100
- glue.stretch = 65536
- glue.stretch_order = 3
- local rule = nodex.create_line(0)
- rule.dir = 'TLT'
- glue.leader = rule
- return glue
-end
-% \end{macrocode}
-%
-% \clozeluafunction{write_linefil}
-% The function |nodex.write_linefil| surrounds a indefinitely strechable
-% line with color whatsits and puts it to \TeX’s ‘current (node) list’.
-% \begin{macrocode}
-function nodex.write_linefil()
- node.write(nodex.create_color('line'))
- node.write(nodex.create_linefil())
- node.write(nodex.create_color('reset'))
-end
-% \end{macrocode}
-%
-% \paragraph{Kern handling (kern)}
-%
-% \clozeluafunction{create_kern}
-% This function creates a kern node with a given width. The argument
-% |width| had to be specified in scaled points.
-% \begin{macrocode}
-function nodex.create_kern(width)
- local kern = node.new(node.id('kern'))
- kern.kern = width
- return kern
-end
-% \end{macrocode}
-%
-% \clozeluafunction{strut_to_hlist}
-% To make life easier: We add at the beginning of each hlist a strut.
-% Now we can add line, color etc. nodes after the first node of a hlist
-% not before - after is much more easier.
-% \begin{macrocode}
-function nodex.strut_to_hlist(hlist)
- local n = {} -- node
- n.head = hlist.head
- n.kern = nodex.create_kern(0)
- n.strut = node.insert_before(n.head, n.head, n.kern)
- hlist.head = n.head.prev
- return hlist, n.strut, n.head
-end
-% \end{macrocode}
-%
-% \clozeluafunction{write_margin}
-% Write kern nodes to the current node list. This kern nodes can be used
-% to build a margin.
-% \begin{macrocode}
-function nodex.write_margin()
- local kern = nodex.create_kern(tex.sp(registry.get_value('margin')))
- node.write(kern)
-end
-% \end{macrocode}
-%
-% \clozeluafunction{search_hlist}
-% Search for a |hlist| (subtype |line|). Return false, if no |hlist| can
-% be found.
-% \begin{macrocode}
-function nodex.search_hlist(head)
- while head do
- if head.id == node.id('hlist') and head.subtype == 1 then
- return nodex.strut_to_hlist(head)
- end
- head = head.next
- end
- return false
-end
-% \end{macrocode}
-%
-% \subsubsection{Option handling (registry)}
-%
-% The table |registry| bundels functions that deal with option handling.
-%
-% \paragraph{Marker processing (marker)}
-%
-% A marker is a whatsit node of the subtype |user_defined|. A marker has
-% two purposes:
-%
-% \begin{enumerate}
-% \item Mark the begin and the end of a gap.
-% \item Store a index number, that points to a Lua table, which holds
-% some additional data like the local options.
-% \end{enumerate}
-%
-% \clozeluafunction{create_marker}
-% We create a user defined whatsit node that can store a number (type =
-% 100). In order to distinguish this node from other user defined
-% whatsit nodes we set the |user_id| to a large number. We call this
-% whatsit node a marker. The argument |index| is a number, which is
-% associated to values in the |registry.storage| table.
-% \begin{macrocode}
-function registry.create_marker(index)
- local marker = node.new('whatsit','user_defined')
- marker.type = 100 -- number
- marker.user_id = registry.user_id
- marker.value = index
- return marker
-end
-% \end{macrocode}
-%
-% \clozeluafunction{write_marker}
-% Write a marker node to \TeX's current node list. The argument |mode|
-% accepts the string values |basic|, |fix| and |par|. The argument
-% |position|. The argument |position| is either set to |start| or to
-% |stop|.
-% \begin{macrocode}
-function registry.write_marker(mode, position)
- local index = registry.set_storage(mode, position)
- local marker = registry.create_marker(index)
- node.write(marker)
-end
-% \end{macrocode}
-%
-% \clozeluafunction{is_marker}
-% This functions checks if the given node |item| is a marker.
-% \begin{macrocode}
-function registry.is_marker(item)
- if item.id == node.id('whatsit')
- and item.subtype == node.subtype('user_defined')
- and item.user_id == registry.user_id then
- return true
- else
- return false
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{check_marker}
-% This functions tests, whether the given node |item| is a marker. The
-% argument |item| is a node. The argument |mode| accepts the string
-% values |basic|, |fix| and |par|. The argument |position| is either set
-% to |start| or to |stop|.
-% \begin{macrocode}
-function registry.check_marker(item, mode, position)
- local data = registry.get_marker_data(item)
- if data and data.mode == mode and data.position == position then
- return true
- else
- return false
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_marker}
-% |registry.get_marker| returns the given marker. The argument |item| is
-% a node. The argument |mode| accepts the string values |basic|, |fix|
-% and |par|. The argument |position| is either set to |start| or to
-% |stop|.
-% \begin{macrocode}
-function registry.get_marker(item, mode, position)
- local out
- if registry.check_marker(item, mode, position) then
- out = item
- else
- out = false
- end
- if out and position == 'start' then
- registry.get_marker_values(item)
- end
- return out
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_marker_data}
-% |registry.get_marker_data| tests whether the node |item| is a marker.
-% The argument |item| is a node of unspecified type.
-% \begin{macrocode}
-function registry.get_marker_data(item)
- if item.id == node.id('whatsit')
- and item.subtype == node.subtype('user_defined')
- and item.user_id == registry.user_id then
- return registry.get_storage(item.value)
- else
- return false
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_marker_values}
-% First this function saves the associatied values of a marker to the
-% local options table. Second it returns this values. The argument
-% |marker| is a whatsit node.
-% \begin{macrocode}
-function registry.get_marker_values(marker)
- local data = registry.get_marker_data(marker)
- registry.local_options = data.values
- return data.values
-end
-% \end{macrocode}
-%
-% \clozeluafunction{remove_marker}
-% This function removes a given whatsit marker. It only deletes a node,
-% if a marker is given.
-% \begin{macrocode}
-function registry.remove_marker(marker)
- if registry.is_marker(marker) then node.remove(marker, marker) end
-end
-% \end{macrocode}
-%
-% \paragraph{Storage functions (storage)}
-%
-% \clozeluafunction{get_index}
-% |registry.index| is a counter. The functions |registry.get_index()|
-% increases the counter by one and then returns it.
-% \begin{macrocode}
-function registry.get_index()
- if not registry.index then
- registry.index = 0
- end
- registry.index = registry.index + 1
- return registry.index
-end
-% \end{macrocode}
-%
-% \clozeluafunction{set_storage}
-% |registry.set_storage()| stores the local options in the Lua table
-% |registry.storage|. It returns a numeric index number. This index
-% number is the key, where the local options in the Lua table are
-% stored. The argument |mode| accepts the string values |basic|, |fix|
-% and |par|.
-% \begin{macrocode}
-function registry.set_storage(mode, position)
- local index = registry.get_index()
- local data = {
- ['mode'] = mode,
- ['position'] = position
- }
- data.values = registry.local_options
- registry.storage[index] = data
- return index
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_storage}
-% The function |registry.get_storage()| retrieves values which belong to
-% a whatsit marker. The argument |index| is a numeric value.
-% \begin{macrocode}
-function registry.get_storage(index)
- return registry.storage[index]
-end
-% \end{macrocode}
-%
-% \paragraph{Option processing (option)}
-%
-% \clozeluafunction{set_option}
-% This function stores a value |value| and his associated key |key|
-% either to the global (|registry.global_options|) or to the local
-% (|registry.local_options|) option table. The global boolean variable
-% |registry.local_options| controls in which table the values are
-% stored.
-% \begin{macrocode}
-function registry.set_option(key, value)
- if value == '' or value == '\\color@ ' then
- return false
- end
- if registry.is_global == true then
- registry.global_options[key] = value
- else
- registry.local_options[key] = value
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{set_is_global}
-% |registry.set_is_global()| sets the variable |registry.is_global| to
-% the value |value|. It is intended, that the variable takes boolean
-% values.
-% \begin{macrocode}
-function registry.set_is_global(value)
- registry.is_global = value
-end
-% \end{macrocode}
-%
-% \clozeluafunction{unset_local_options}
-% This function unsets the local options.
-% \begin{macrocode}
-function registry.unset_local_options()
- registry.local_options = {}
-end
-% \end{macrocode}
-%
-% \clozeluafunction{unset_global_options}
-% |registry.unset_global_options| empties the global options storage.
-% \begin{macrocode}
-function registry.unset_global_options()
- registry.global_options = {}
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_value}
-% Retrieve a value from a given key. First search for the value in the
-% local options, then in the global options. If both option storages are
-% empty, the default value will be returned.
-% \begin{macrocode}
-function registry.get_value(key)
- if registry.has_value(registry.local_options[key]) then
- return registry.local_options[key]
- end
- if registry.has_value(registry.global_options[key]) then
- return registry.global_options[key]
- end
- return registry.defaults[key]
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_value_show}
-% The function |registry.get_value_show()| returns the boolean value
-% |true| if the option |show| is true. In contrast to the function
-% |registry.get_value()| it converts the string value `true' to a
-% boolean value.
-% \begin{macrocode}
-function registry.get_value_show()
- if
- registry.get_value('show') == true
- or
- registry.get_value('show') == 'true'
- then
- return true
- else
- return false
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{has_value}
-% This function tests whether the value |value| is not empty and has a
-% value.
-% \begin{macrocode}
-function registry.has_value(value)
- if value == nil or value == '' or value == '\\color@ ' then
- return false
- else
- return true
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{get_defaults}
-% |registry.get_defaults(option)| returns a the default value of the
-% given option.
-% \begin{macrocode}
-function registry.get_defaults(option)
- return registry.defaults[option]
-end
-% \end{macrocode}
-%
-% \subsubsection{Assembly to cloze texts (cloze)}
-%
-% Some graphics for better understanding of the node tree:
-%
-% \paragraph{Paragraph}
-%
-% \noindent\includegraphics[width=\linewidth]{graphics/par}
-%
-% \paragraph{Tabular environment}
-%
-% \noindent\includegraphics[width=\linewidth]{graphics/tabular}
-%
-% \paragraph{Picture environment}
-%
-% \noindent\includegraphics[width=\linewidth]{graphics/picture}
-%
-% \clozeluafunction{basic_make}
-% The function |cloze.basic_make()| makes one gap. The argument |start|
-% is the node, where the gap begins. The argument |stop| is the node,
-% where the gap ends.
-% \begin{macrocode}
-function cloze.basic_make(start, stop)
- local n = {}
- local l = {}
- n.head = start
- if not start or not stop then
- return
- end
- n.start = start
- n.stop = stop
- l.width = node.dimensions(
- cloze.status.hlist.glue_set,
- cloze.status.hlist.glue_sign,
- cloze.status.hlist.glue_order,
- n.start,
- n.stop
- )
- n.line = nodex.insert_line(n.start, l.width)
- n.color_text = nodex.insert_list('after', n.line, {nodex.create_color('text')})
- if registry.get_value_show() then
- nodex.insert_list('after', n.color_text, {nodex.create_kern(-l.width)})
- nodex.insert_list('before', n.stop, {nodex.create_color('reset')}, n.head)
- else
- n.line.next = n.stop.next
- n.stop.prev = n.line.prev
- end
-% \end{macrocode}
-% I some edge cases the lua callbacks get fired up twice. After the
-% cloze has been created, the start and stop whatsit markers can be
-% deleted.
-% \begin{macrocode}
- registry.remove_marker(n.start)
- registry.remove_marker(n.stop)
-end
-% \end{macrocode}
-%
-% \clozeluafunction{basic_search_stop}
-% Search for a stop marker.
-% \begin{macrocode}
-function cloze.basic_search_stop(head)
- local stop
- while head do
- cloze.status.continue = true
- stop = head
- if registry.check_marker(stop, 'basic', 'stop') then
- cloze.status.continue = false
- break
- end
- head = head.next
- end
- return stop
-end
-% \end{macrocode}
-%
-% \clozeluafunction{basic_search_start}
-% Search for a start marker. Also begin a new cloze, if the boolean
-% value |cloze.status.continue| is true. The knowledge of the last
-% hlist node is a requirement to begin a cloze.
-% \begin{macrocode}
-function cloze.basic_search_start(head)
- local start
- local stop
- local n = {}
- if cloze.status.continue then
- n.hlist = nodex.search_hlist(head)
- if n.hlist then
- cloze.status.hlist = n.hlist
- start = cloze.status.hlist.head
- end
- elseif registry.check_marker(head, 'basic', 'start') then
- start = head
- end
- if start then
- stop = cloze.basic_search_stop(start)
- cloze.basic_make(start, stop)
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{basic_recursion}
-% Parse recursivley the node tree. Start and stop markers can be nested
-% deeply into the node tree.
-% \begin{macrocode}
-function cloze.basic_recursion(head)
- while head do
- if head.head then
- cloze.status.hlist = head
- cloze.basic_recursion(head.head)
- else
- cloze.basic_search_start(head)
- end
- head = head.next
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{basic}
-% The corresponding \LaTeX{} command to this lua function is \cmd{\cloze}
-% \secref{sec:command-cloze}. The argument |head| is the head node of a
-% node list.
-% \begin{macrocode}
-function cloze.basic(head)
- cloze.status.continue = false
- cloze.basic_recursion(head)
- return head
-end
-% \end{macrocode}
-%
-% \clozeluafunction{fix_length}
-% Calculate the length of the whitespace before (|l.kern_start|) and
-% after (|l.kern_stopt|) the text.
-% \begin{macrocode}
-function cloze.fix_length(start, stop)
- local l = {}
- l.width = tex.sp(registry.get_value('width'))
- l.text_width = node.dimensions(start, stop)
- l.align = registry.get_value('align')
- if l.align == 'right' then
- l.kern_start = - l.text_width
- l.kern_stop = 0
- elseif l.align == 'center' then
- l.half = (l.width - l.text_width) / 2
- l.kern_start = - l.half - l.text_width
- l.kern_stop = l.half
- else
- l.kern_start = - l.width
- l.kern_stop = l.width - l.text_width
- end
- return l.width, l.kern_start, l.kern_stop
-end
-% \end{macrocode}
-%
-% \clozeluafunction{fix_make}
-% The function |cloze.fix_make| generates a gap of fixed width.
-%
-% \subparagraph*{Node lists}
-%
-% \subparagraph*{Show text:}
-%
-% \begin{nodelist}
-% |n.start| & |whatsit| & |user_definded| & |index| \\
-% |n.line| & |rule| & & |l.width| \\
-% |n.kern_start| & |kern| & & Depends on |align| \\
-% |n.color_text| & |whatsit| & |pdf_colorstack| & Text color \\
-% & |glyphs| & & Text to show \\
-% |n.color_reset| & |whatsit| & |pdf_colorstack| & Reset color \\
-% |n.kern_stop| & |kern| & & Depends on |align| \\
-% |n.stop| & |whatsit| & |user_definded| & |index| \\
-% \end{nodelist}
-%
-% \subparagraph*{Hide text:}
-%
-% \begin{nodelist}
-% |n.start| & |whatsit| & |user_definded| & |index| \\
-% |n.line| & |rule| & & |l.width| \\
-% |n.stop| & |whatsit| & |user_definded| & |index| \\
-% \end{nodelist}
-%
-% The argument |start| is the node, where the gap begins. The argument
-% |stop| is the node, where the gap ends.
-% \begin{macrocode}
-function cloze.fix_make(start, stop)
- local l = {} -- length
- local n = {} -- node
- l.width, l.kern_start, l.kern_stop = cloze.fix_length(start, stop)
- n.line = nodex.insert_line(start, l.width)
- if registry.get_value_show() then
- nodex.insert_list(
- 'after',
- n.line,
- {
- nodex.create_kern(l.kern_start),
- nodex.create_color('text')
- }
- )
- nodex.insert_list(
- 'before',
- stop,
- {
- nodex.create_color('reset'),
- nodex.create_kern(l.kern_stop)
- },
- start
- )
- else
- n.line.next = stop.next
- end
- registry.remove_marker(start)
- registry.remove_marker(stop)
-end
-% \end{macrocode}
-%
-% \clozeluafunction{fix_recursion}
-% Function to recurse the node list and search after marker. |head| is
-% the head node of a node list.
-% \begin{macrocode}
-function cloze.fix_recursion(head)
- local n = {} -- node
- n.start, n.stop = false
- while head do
- if head.head then
- cloze.fix_recursion(head.head)
- else
- if not n.start then
- n.start = registry.get_marker(head, 'fix', 'start')
- end
- if not n.stop then
- n.stop = registry.get_marker(head, 'fix', 'stop')
- end
- if n.start and n.stop then
- cloze.fix_make(n.start, n.stop)
- n.start, n.stop = false
- end
- end
- head = head.next
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{fix}
-% The corresponding \LaTeX{} command to this Lua function is
-% \cmd{\clozefix} \secref{sec:command-clozefix}. The argument |head| is
-% the head node of a node list.
-% \begin{macrocode}
-function cloze.fix(head)
- cloze.fix_recursion(head)
- return head
-end
-% \end{macrocode}
-%
-% \clozeluafunction{par}
-% The corresponding \LaTeX{} environment to this lua function is
-% |clozepar| \secref{sec:command-clozepar}.
-%
-% \subparagraph*{Node lists}
-%
-% \subparagraph*{Show text:}
-%
-% \begin{nodelist}
-% |n.strut| & |kern| & & width = 0 \\
-% |n.line| & |rule| & & |l.width| (Width from hlist) \\
-% |n.kern| & |kern| & & |-l.width| \\
-% |n.color_text| & |whatsit| & |pdf_colorstack| & Text color \\
-% & |glyphs| & & Text to show \\
-% |n.tail| & |glyph| & & Last glyph in hlist \\
-% |n.color_reset| & |whatsit| & |pdf_colorstack| & Reset color \\
-% \end{nodelist}
-%
-% \subparagraph*{Hide text:}
-%
-% \begin{nodelist}
-% |n.strut| & |kern| & & width = 0 \\
-% |n.line| & |rule| & & |l.width| (Width from hlist) \\
-% \end{nodelist}
-%
-% The argument |head| is the head node of a node list.
-% \begin{macrocode}
-function cloze.par(head)
- local l = {} -- length
- local n = {} -- node
- for hlist in node.traverse_id(node.id('hlist'), head) do
- for whatsit in node.traverse_id(node.id('whatsit'), hlist.head) do
- registry.get_marker(whatsit, 'par', 'start')
- end
- l.width = hlist.width
- hlist, n.strut, n.head = nodex.strut_to_hlist(hlist)
- n.line = nodex.insert_line(n.strut, l.width)
- if registry.get_value_show() then
- nodex.insert_list(
- 'after',
- n.line,
- {
- nodex.create_kern(-l.width),
- nodex.create_color('text')
- }
- )
- nodex.insert_list(
- 'after',
- node.tail(head),
- {nodex.create_color('reset')}
- )
- else
- n.line.next = nil
- end
- end
- return head
-end
-% \end{macrocode}
-%
-% \subsubsection{Basic module functions (base)}
-%
-% The |base| table contains functions which are published to the
-% |cloze.sty| file.
-%
-% \clozeluafunction{register}
-% This function registers the functions |cloze.par|, |cloze.basic| and
-% |cloze.fix| the Lua callbacks. |cloze.par| and |cloze.basic| are
-% registered to the callback |post_linebreak_filter| and |cloze.fix| to
-% the callback |pre_linebreak_filter|. The argument |mode| accepts the
-% string values |basic|, |fix| and |par|.
-% \begin{macrocode}
-function base.register(mode)
- local basic
- if mode == 'par' then
- luatexbase.add_to_callback(
- 'post_linebreak_filter',
- cloze.par,
- mode
- )
- return true
- end
- if not base.is_registered[mode] then
- if mode == 'basic' then
- luatexbase.add_to_callback(
- 'post_linebreak_filter',
- cloze.basic,
- mode
- )
- elseif mode == 'fix' then
- luatexbase.add_to_callback(
- 'pre_linebreak_filter',
- cloze.fix,
- mode
- )
- else
- return false
- end
- base.is_registered[mode] = true
- end
-end
-% \end{macrocode}
-%
-% \clozeluafunction{unregister}
-% |base.unregister(mode)| deletes the registered functions from the Lua
-% callbacks. The argument |mode| accepts the string values |basic|,
-% |fix| and |par|.
-% \begin{macrocode}
-function base.unregister(mode)
- if mode == 'basic' then
- luatexbase.remove_from_callback('post_linebreak_filter', mode)
- elseif mode == 'fix' then
- luatexbase.remove_from_callback('pre_linebreak_filter', mode)
- else
- luatexbase.remove_from_callback('post_linebreak_filter', mode)
- end
-end
-% \end{macrocode}
-%
-% Publish some functions to the |cloze.sty| file.
-% \begin{macrocode}
-base.linefil = nodex.write_linefil
-base.line = nodex.write_line
-base.margin = nodex.write_margin
-base.set_option = registry.set_option
-base.set_is_global = registry.set_is_global
-base.unset_local_options = registry.unset_local_options
-base.reset = registry.unset_global_options
-base.get_defaults = registry.get_defaults
-base.get_value = registry.get_value
-base.marker = registry.write_marker
-% \end{macrocode}
-%
-% \begin{macrocode}
-return base
-% \end{macrocode}
-% \iffalse
-%</lua>
% \fi
%
% \Finale
diff --git a/macros/luatex/latex/cloze/cloze.ins b/macros/luatex/latex/cloze/cloze.ins
index 87a4e09d25..75f4839276 100644
--- a/macros/luatex/latex/cloze/cloze.ins
+++ b/macros/luatex/latex/cloze/cloze.ins
@@ -1,4 +1,4 @@
-% Copyright (C) 2015-2016 by Josef Friedrich <josef@friedrich.rocks>
+% Copyright (C) 2015-2020 by Josef Friedrich <josef@friedrich.rocks>
% ----------------------------------------------------------------------
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3c of this license
@@ -22,7 +22,7 @@
This is a generated file.
-Copyright (C) 2015-2016 by Josef Friedrich <josef@friedrich.rocks>
+Copyright (C) 2015-2020 by Josef Friedrich <josef@friedrich.rocks>
----------------------------------------------------------------------
This work may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
@@ -38,11 +38,6 @@ version 2008/05/05 or later.
\generate{\file{cloze.sty}{\from{cloze.dtx}{package}}}
-\nopreamble
-\nopostamble
-\generate{\file{cloze.lua}{\from{cloze.dtx}{lua}}}
-\generate{\file{README.md}{\from{cloze.dtx}{readme}}}
-
\obeyspaces
\Msg{*************************************************************}
\Msg{* *}
diff --git a/macros/luatex/latex/cloze/cloze.lua b/macros/luatex/latex/cloze/cloze.lua
new file mode 100644
index 0000000000..b9490354a5
--- /dev/null
+++ b/macros/luatex/latex/cloze/cloze.lua
@@ -0,0 +1,1002 @@
+--- Cloze uses [LDoc](https://github.com/stevedonovan/ldoc) for the
+-- source code documentation. The supported tags are described on in
+-- the [wiki](https://github.com/stevedonovan/LDoc/wiki).
+--
+-- <h3>Naming conventions</h3>
+--
+-- * _Variable_ names for _nodes_ are suffixed with `_node`, for example
+-- `head_node`.
+-- * _Variable_ names for _lengths_ (dimensions) are suffixed with
+-- `_length`, for example `width_length`.
+--
+-- @module cloze
+
+-- __cloze.lua}__
+
+-- __Initialisation of the function tables__
+
+-- It is good form to provide some background informations about this Lua
+-- module.
+if not modules then modules = { } end modules ['cloze'] = {
+ version = '1.5',
+ comment = 'cloze',
+ author = 'Josef Friedrich, R.-M. Huber',
+ copyright = 'Josef Friedrich, R.-M. Huber',
+ license = 'The LaTeX Project Public License Version 1.3c 2008-05-04'
+}
+
+--- `nodex` is a abbreviation for __node eXtended__.
+local nodex = {}
+
+--- All values and functions, which are related to the option management,
+-- are stored in a table called `registry`.
+local registry = {}
+
+--- I didn't know what value I should take as `user_id`. Therefore I
+-- took my birthday and transformed it to a large number.
+registry.user_id = 3121978
+registry.storage = {}
+registry.defaults = {
+ ['align'] = 'l',
+ ['boxheight'] = false,
+ ['boxwidth'] = '\\linewidth',
+ ['distance'] = '1.5pt',
+ ['hide'] = false,
+ ['linecolor'] = '0 0 0 rg 0 0 0 RG', -- black
+ ['linecolor_name'] = 'black',
+ ['margin'] = '3pt',
+ ['resetcolor'] = '0 0 0 rg 0 0 0 RG', -- black
+ ['resetcolor_name'] = 'black',
+ ['show_text'] = true,
+ ['show'] = true,
+ ['spacing'] = '1.6',
+ ['textcolor'] = '0 0 1 rg 0 0 1 RG', -- blue
+ ['textcolor_name'] = 'blue', -- blue
+ ['thickness'] = '0.4pt',
+ ['width'] = '2cm',
+}
+registry.global_options = {}
+registry.local_options = {}
+
+-- All those functions are stored in the table `cloze` that are
+-- registered as callbacks to the pre and post linebreak filters.
+local cloze = {}
+-- In the status table are stored state information, which are necessary
+-- for the recursive cloze generation.
+cloze.status = {}
+
+-- The `base` table contains some basic functions. `base` is the only
+-- table of this Lua module that will be exported.
+local base = {}
+base.is_registered = {}
+
+--- Node precessing (nodex)
+-- @section nodex
+
+-- All functions in this section are stored in a table called `nodex`.
+-- `nodex` is a abbreviation for __node eXtended__. The `nodex` table
+-- bundles all functions, which extend the built-in `node` library.
+
+-- __Color handling (color)__
+
+-- __create_colorstack__
+-- Create a whatsit node of the subtype `pdf_colorstack`. `data` is a PDF
+-- colorstack string like `0 0 0 rg 0 0 0 RG`.
+function nodex.create_colorstack(data)
+ if not data then
+ data = '0 0 0 rg 0 0 0 RG' -- black
+ end
+ local whatsit = node.new('whatsit', 'pdf_colorstack')
+ whatsit.stack = 0
+ whatsit.data = data
+ return whatsit
+end
+
+---
+-- `nodex.create_color()` is a wrapper for the function
+-- `nodex.create_colorstack()`. It queries the current values of the
+-- options `linecolor` and `textcolor`. The argument `option` accepts the
+-- strings `line`, `text` and `reset`.
+function nodex.create_color(option)
+ local data
+ if option == 'line' then
+ data = registry.get_value('linecolor')
+ elseif option == 'text' then
+ data = registry.get_value('textcolor')
+ elseif option == 'reset' then
+ data = nil
+ else
+ data = nil
+ end
+ return nodex.create_colorstack(data)
+end
+
+-- __Line handling (line)__
+
+--- Create a rule node, which is used as a line for the cloze texts. The
+-- `depth` and the `height` of the rule are calculated form the options
+-- `thickness` and `distance`. The argument `width` must have the length
+-- unit __scaled points__.
+function nodex.create_line(width)
+ local rule = node.new(node.id('rule'))
+ local thickness = tex.sp(registry.get_value('thickness'))
+ local distance = tex.sp(registry.get_value('distance'))
+ rule.depth = distance + thickness
+ rule.height = - distance
+ rule.width = width
+ return rule
+end
+
+--- Insert a `list` of nodes after or before the `current`. The `head`
+-- argument is optional. In some edge cases it is unfortately necessary.
+-- if `head` is omitted the `current` node is used. The argument
+-- `position` can take the values `'after'` or `'before'`.
+function nodex.insert_list(position, current, list, head_node)
+ if not head_node then
+ head_node = current
+ end
+ for i, insert in ipairs(list) do
+ if position == 'after' then
+ head_node, current = node.insert_after(head_node, current, insert)
+ elseif position == 'before' then
+ head_node, current = node.insert_before(head_node, current, insert)
+ end
+ end
+ return current
+end
+
+--- Enclose a rule node (cloze line) with two PDF colorstack whatsits.
+-- The first colorstack node dyes the line, the seccond resets the
+-- color.
+--
+-- __Node list__
+--
+-- <table>
+-- <thead>
+-- <tr>
+-- <th>`n.color_line`</th>
+-- <th>`whatsit`</th>
+-- <th>`pdf_colorstack`</th>
+-- <th>Line color</th>
+-- </tr>
+-- </thead>
+-- <tbody>
+-- <tr>
+-- <td>`n.line`</td>
+-- <td>`rule`</td>
+-- <td></td>
+-- <td>`width`</td>
+-- </tr>
+-- <tr>
+-- <td>`n.color_reset`</td>
+-- <td>`whatsit`</td>
+-- <td>`pdf_colorstack`</td>
+-- <td>Reset color</td>
+-- </tr>
+-- </tbody>
+-- </table>
+function nodex.insert_line(current, width)
+ return nodex.insert_list(
+ 'after',
+ current,
+ {
+ nodex.create_color('line'),
+ nodex.create_line(width),
+ nodex.create_color('reset')
+ }
+ )
+end
+
+--- This function enclozes a rule node with color nodes as it the function
+-- `nodex.insert_line` does. In contrast to `nodex.insert_line` the three
+-- nodes are appended to \TeX’s ‘current list’. They are not inserted in
+-- a node list, which is accessed by a Lua callback.
+--
+-- __Node list__
+--
+-- <table>
+-- <thead>
+-- <tr>
+-- <th>-</th>
+-- <th>`whatsit`</th>
+-- <th>`pdf_colorstack`</th>
+-- <th>Line color</th>
+-- </tr>
+-- </thead>
+-- <tbody>
+-- <tr>
+-- <td>-</td>
+-- <td>`rule`</td>
+-- <td></td>
+-- <td>`width`</td>
+-- </tr>
+-- <tr>
+-- <td>-</td>
+-- <td>`whatsit`</td>
+-- <td>`pdf_colorstack`</td>
+-- <td>Reset color</td>
+-- </tr>
+-- </tbody>
+-- </table>
+function nodex.write_line()
+ node.write(nodex.create_color('line'))
+ node.write(nodex.create_line(tex.sp(registry.get_value('width'))))
+ node.write(nodex.create_color('reset'))
+end
+
+-- __Handling of extendable lines (linefil)__
+
+--- This function creates a line which stretchs indefinitely in the
+-- horizontal direction.
+function nodex.create_linefil()
+ local glue = node.new('glue')
+ glue.subtype = 100
+ glue.stretch = 65536
+ glue.stretch_order = 3
+ local rule = nodex.create_line(0)
+ rule.dir = 'TLT'
+ glue.leader = rule
+ return glue
+end
+
+--- The function `nodex.write_linefil` surrounds a indefinitely strechable
+-- line with color whatsits and puts it to \TeX’s ‘current (node) list’.
+function nodex.write_linefil()
+ node.write(nodex.create_color('line'))
+ node.write(nodex.create_linefil())
+ node.write(nodex.create_color('reset'))
+end
+
+-- __Kern handling (kern)__
+
+--- This function creates a kern node with a given width. The argument
+-- `width` had to be specified in scaled points.
+local function create_kern_node(width)
+ local kern_node = node.new(node.id('kern'))
+ kern_node.kern = width
+ return kern_node
+end
+
+--- Add at the beginning of each `hlist` node list a strut (a invisible
+-- character).
+--
+-- Now we can add line, color etc. nodes after the first node of a hlist
+-- not before - after is much more easier.
+--
+-- @tparam node hlist_node
+--
+-- @treturn node hlist_node
+-- @treturn node strut_node
+-- @treturn node head_node
+local function insert_strut_into_hlist(hlist_node)
+ local head_node = hlist_node.head
+ local kern_node = create_kern_node(0)
+ local strut_node = node.insert_before(hlist_node.head, head_node, kern_node)
+ hlist_node.head = head_node.prev
+ return hlist_node, strut_node, head_node
+end
+
+--- Write kern nodes to the current node list. This kern nodes can be used
+-- to build a margin.
+function nodex.write_margin()
+ local kern = create_kern_node(tex.sp(registry.get_value('margin')))
+ node.write(kern)
+end
+
+--- Search for a `hlist` (subtype `line`).
+--
+-- Insert a strut node into the list if a hlist is found.
+--
+-- @tparam node head_node The head of a node list.
+--
+-- @treturn node|false Return false, if no `hlist` can
+-- be found.
+local function search_hlist(head_node)
+ while head_node do
+ if head_node.id == node.id('hlist') and head_node.subtype == 1 then
+ return insert_strut_into_hlist(head_node)
+ end
+ head_node = head_node.next
+ end
+ return false
+end
+
+--- Option handling.
+--
+-- The table `registry` bundels functions that deal with option handling.
+--
+-- <h2>Marker processing (marker)</h2>
+--
+-- A marker is a whatsit node of the subtype `user_defined`. A marker has
+-- two purposes:
+--
+-- * Mark the begin and the end of a gap.
+-- * Store a index number, that points to a Lua table, which holds
+-- some additional data like the local options.
+-- @section registry
+
+--- We create a user defined whatsit node that can store a number (type
+-- = 100).
+--
+-- In order to distinguish this node from other user defined whatsit
+-- nodes we set the `user_id` to a large number. We call this whatsit
+-- node a marker. The argument `index` is a number, which is associated
+-- to values in the `registry.storage` table.
+function registry.create_marker(index)
+ local marker = node.new('whatsit','user_defined')
+ marker.type = 100 -- number
+ marker.user_id = registry.user_id
+ marker.value = index
+ return marker
+end
+
+--- Write a marker node to \TeX's current node list.
+--
+-- The argument `mode` accepts the string values `basic`, `fix` and
+-- `par`. The argument `position`. The argument `position` is either set
+-- to `start` or to `stop`.
+function registry.write_marker(mode, position)
+ local index = registry.set_storage(mode, position)
+ local marker = registry.create_marker(index)
+ node.write(marker)
+end
+
+--- This functions checks if the given node `item` is a marker.
+function registry.is_marker(item)
+ if item.id == node.id('whatsit')
+ and item.subtype == node.subtype('user_defined')
+ and item.user_id == registry.user_id then
+ return true
+ else
+ return false
+ end
+end
+
+--- This functions tests, whether the given node `item` is a marker.
+--
+-- The argument `item` is a node. The argument `mode` accepts the string
+-- values `basic`, `fix` and `par`. The argument `position` is either
+-- set to `start` or to `stop`.
+function registry.check_marker(item, mode, position)
+ local data = registry.get_marker_data(item)
+ if data and data.mode == mode and data.position == position then
+ return true
+ else
+ return false
+ end
+end
+
+--- `registry.get_marker` returns the given marker.
+--
+-- The argument `item` is a node. The argument `mode` accepts the string
+-- values `basic`, `fix` and `par`. The argument `position` is either
+-- set to `start` or to `stop`.
+function registry.get_marker(item, mode, position)
+ local out
+ if registry.check_marker(item, mode, position) then
+ out = item
+ else
+ out = false
+ end
+ if out and position == 'start' then
+ registry.get_marker_values(item)
+ end
+ return out
+end
+
+--- `registry.get_marker_data` tests whether the node `item` is a
+-- marker.
+--
+-- The argument `item` is a node of unspecified type.
+function registry.get_marker_data(item)
+ if item.id == node.id('whatsit')
+ and item.subtype == node.subtype('user_defined')
+ and item.user_id == registry.user_id then
+ return registry.get_storage(item.value)
+ else
+ return false
+ end
+end
+
+--- First this function saves the associatied values of a marker to the
+-- local options table. Second it returns this values. The argument
+-- `marker` is a whatsit node.
+function registry.get_marker_values(marker)
+ local data = registry.get_marker_data(marker)
+ registry.local_options = data.values
+ return data.values
+end
+
+--- This function removes a given whatsit marker.
+--
+-- It only deletes a node, if a marker is given.
+function registry.remove_marker(marker)
+ if registry.is_marker(marker) then node.remove(marker, marker) end
+end
+
+-- __Storage functions (storage)__
+
+--- `registry.index` is a counter. The functions `registry.get_index()`
+-- increases the counter by one and then returns it.
+function registry.get_index()
+ if not registry.index then
+ registry.index = 0
+ end
+ registry.index = registry.index + 1
+ return registry.index
+end
+
+--- `registry.set_storage()` stores the local options in the Lua table
+-- `registry.storage`.
+--
+-- It returns a numeric index number. This index number is the key,
+-- where the local options in the Lua table are stored. The argument
+-- `mode` accepts the string values `basic`, `fix` and `par`.
+function registry.set_storage(mode, position)
+ local index = registry.get_index()
+ local data = {
+ ['mode'] = mode,
+ ['position'] = position
+ }
+ data.values = registry.local_options
+ registry.storage[index] = data
+ return index
+end
+
+--- The function `registry.get_storage()` retrieves values which belong
+-- to a whatsit marker.
+--
+-- The argument `index` is a numeric value.
+function registry.get_storage(index)
+ return registry.storage[index]
+end
+
+-- __Option processing (option)__
+
+--- This function stores a value `value` and his associated key `key`
+-- either to the global (`registry.global_options`) or to the local
+-- (`registry.local_options`) option table.
+--
+-- The global boolean variable `registry.local_options` controls in
+-- which table the values are stored.
+function registry.set_option(key, value)
+ if value == '' or value == '\\color@ ' then
+ return false
+ end
+ if registry.is_global == true then
+ registry.global_options[key] = value
+ else
+ registry.local_options[key] = value
+ end
+end
+
+--- `registry.set_is_global()` sets the variable `registry.is_global` to
+-- the value `value`. It is intended, that the variable takes boolean
+-- values.
+function registry.set_is_global(value)
+ registry.is_global = value
+end
+
+--- This function unsets the local options.
+function registry.unset_local_options()
+ registry.local_options = {}
+end
+
+--- `registry.unset_global_options` empties the global options storage.
+function registry.unset_global_options()
+ registry.global_options = {}
+end
+
+--- Retrieve a value from a given key. First search for the value in the
+-- local options, then in the global options. If both option storages are
+-- empty, the default value will be returned.
+function registry.get_value(key)
+ if registry.has_value(registry.local_options[key]) then
+ return registry.local_options[key]
+ end
+ if registry.has_value(registry.global_options[key]) then
+ return registry.global_options[key]
+ end
+ return registry.defaults[key]
+end
+
+
+--- The function `registry.get_value_show()` returns the boolean value
+-- `true` if the option `show` is true. In contrast to the function
+-- `registry.get_value()` it converts the string value `true' to a
+-- boolean value.
+function registry.get_value_show()
+ if
+ registry.get_value('show') == true
+ or
+ registry.get_value('show') == 'true'
+ then
+ return true
+ else
+ return false
+ end
+end
+
+--- This function tests whether the value `value` is not empty and has a
+-- value.
+function registry.has_value(value)
+ if value == nil or value == '' or value == '\\color@ ' then
+ return false
+ else
+ return true
+ end
+end
+
+--- `registry.get_defaults(option)` returns a the default value of the
+-- given option.
+function registry.get_defaults(option)
+ return registry.defaults[option]
+end
+
+--- Assembly to cloze texts.
+-- @section cloze_functions
+
+--- The function `cloze.basic_make()` makes one gap. The argument `start`
+-- is the node, where the gap begins. The argument `stop` is the node,
+-- where the gap ends.
+function cloze.basic_make(start_node, end_node)
+ local node_head = start_node
+ if not start_node or not end_node then
+ return
+ end
+ local line_width = node.dimensions(
+ cloze.status.hlist.glue_set,
+ cloze.status.hlist.glue_sign,
+ cloze.status.hlist.glue_order,
+ start_node,
+ end_node
+ )
+ local line_node = nodex.insert_line(start_node, line_width)
+ local color_text_node = nodex.insert_list('after', line_node, {nodex.create_color('text')})
+ if registry.get_value_show() then
+ nodex.insert_list('after', color_text_node, {create_kern_node(-line_width)})
+ nodex.insert_list('before', end_node, {nodex.create_color('reset')}, node_head)
+ else
+ line_node.next = end_node.next
+ end_node.prev = line_node -- not line_node.prev -> line color leaks out
+ end
+ -- In some edge cases the lua callbacks get fired up twice. After the
+ -- cloze has been created, the start and stop whatsit markers can be
+ -- deleted.
+ registry.remove_marker(start_node)
+ registry.remove_marker(end_node)
+end
+
+--- Search for a stop marker.
+--
+-- @tparam node head_node The head of a node list.
+--
+-- @treturn node The end node.
+function cloze.basic_search_stop(head_node)
+ local end_node
+ while head_node do
+ cloze.status.continue = true
+ end_node = head_node
+ if registry.check_marker(end_node, 'basic', 'stop') then
+ cloze.status.continue = false
+ break
+ end
+ head_node = head_node.next
+ end
+ return end_node
+end
+
+--- Search for a start marker or begin a new cloze if the value
+-- `cloze.status.continue` is true.
+--
+-- We have to find a hlist node and use its on the field `head`
+-- attached node list to search for a start marker.
+--
+-- @tparam node head_node The head of a node list.
+function cloze.basic_search_start(head_node)
+ local start_node, end_node, hlist_node
+ if cloze.status.continue then
+ hlist_node = search_hlist(head_node)
+ if hlist_node then
+ cloze.status.hlist = hlist_node
+ start_node = hlist_node.head
+ end
+ elseif registry.check_marker(head_node, 'basic', 'start') then
+ start_node = head_node
+ end
+ if start_node then
+ end_node = cloze.basic_search_stop(start_node)
+ cloze.basic_make(start_node, end_node)
+ end
+end
+
+--- Parse the node tree recursivley.
+--
+-- Start and end markers could be nested deeply in the node tree.
+--
+-- @tparam node head_node The head of a node list.
+function cloze.basic_recursion(head_node)
+ while head_node do
+ if head_node.head then
+ cloze.status.hlist = head_node
+ cloze.basic_recursion(head_node.head)
+ else
+ cloze.basic_search_start(head_node)
+ end
+ head_node = head_node.next
+ end
+end
+
+--- The corresponding LaTeX command to this lua function is `\cloze`.
+--
+-- @tparam node head_node The head of a node list.
+--
+-- @treturn node The head of the node list.
+function cloze.basic(head_node)
+ cloze.status.continue = false
+ cloze.basic_recursion(head_node)
+ return head_node
+end
+
+--- Calculate the length of the whitespace before (`l.kern_start`) and
+-- after (`l.kern_stop`) the text.
+function cloze.fix_length(start, stop)
+ local l = {}
+ l.width = tex.sp(registry.get_value('width'))
+ l.text_width = node.dimensions(start, stop)
+ l.align = registry.get_value('align')
+ if l.align == 'right' then
+ l.kern_start = - l.text_width
+ l.kern_stop = 0
+ elseif l.align == 'center' then
+ l.half = (l.width - l.text_width) / 2
+ l.kern_start = - l.half - l.text_width
+ l.kern_stop = l.half
+ else
+ l.kern_start = - l.width
+ l.kern_stop = l.width - l.text_width
+ end
+ return l.width, l.kern_start, l.kern_stop
+end
+
+--- The function `cloze.fix_make` generates a gap of fixed width.
+--
+-- __Node lists__
+--
+-- __Show text:__
+--
+-- <table>
+-- <tbody>
+-- <tr>
+-- <td>`n.start`</td>
+-- <td>`whatsit`</td>
+-- <td>`user_definded`</td>
+-- <td>`index`</td>
+-- </tr>
+-- <tr>
+-- <td>`n.line`</td>
+-- <td>`rule`</td>
+-- <td></td>
+-- <td>`l.width`</td>
+-- </tr>
+-- <tr>
+-- <td>`n.kern_start`</td>
+-- <td>`kern`</td>
+-- <td>&amp; Depends on `align`</td>
+-- <td></td>
+-- </tr>
+-- <tr>
+-- <td>`n.color_text`</td>
+-- <td>`whatsit`</td>
+-- <td>`pdf_colorstack`</td>
+-- <td>Text color</td>
+-- </tr>
+-- <tr>
+-- <td></td>
+-- <td>`glyphs`</td>
+-- <td>&amp; Text to show</td>
+-- <td></td>
+-- </tr>
+-- <tr>
+-- <td>`n.color_reset`</td>
+-- <td>`whatsit`</td>
+-- <td>`pdf_colorstack`</td>
+-- <td>Reset color</td>
+-- </tr>
+-- <tr>
+-- <td>`n.kern_stop`</td>
+-- <td>`kern`</td>
+-- <td>&amp; Depends on `align`</td>
+-- <td></td>
+-- </tr>
+-- <tr>
+-- <td>`n.stop`</td>
+-- <td>`whatsit`</td>
+-- <td>`user_definded`</td>
+-- <td>`index`</td>
+-- </tr>
+-- </tbody>
+-- </table>
+--
+-- __Hide text:__
+--
+-- <table>
+-- <thead>
+-- <tr>
+-- <th>`n.start`</th>
+-- <th>`whatsit`</th>
+-- <th>`user_definded`</th>
+-- <th>`index`</th>
+-- </tr>
+-- </thead>
+-- <tbody>
+-- <tr>
+-- <td>`n.line`</td>
+-- <td>`rule`</td>
+-- <td></td>
+-- <td>`l.width`</td>
+-- </tr>
+-- <tr>
+-- <td>`n.stop`</td>
+-- <td>`whatsit`</td>
+-- <td>`user_definded`</td>
+-- <td>`index`</td>
+-- </tr>
+-- </tbody>
+-- </table>
+--
+-- Make fixed size cloze.
+--
+-- @param start The node, where the gap begins
+-- @param stop The node, where the gap ends
+function cloze.fix_make(start, stop)
+ local l = {} -- length
+ local n = {} -- node
+ l.width, l.kern_start, l.kern_stop = cloze.fix_length(start, stop)
+ n.line = nodex.insert_line(start, l.width)
+ if registry.get_value_show() then
+ nodex.insert_list(
+ 'after',
+ n.line,
+ {
+ create_kern_node(l.kern_start),
+ nodex.create_color('text')
+ }
+ )
+ nodex.insert_list(
+ 'before',
+ stop,
+ {
+ nodex.create_color('reset'),
+ create_kern_node(l.kern_stop)
+ },
+ start
+ )
+ else
+ n.line.next = stop.next
+ end
+ registry.remove_marker(start)
+ registry.remove_marker(stop)
+end
+
+--- Function to recurse the node list and search after marker.
+--
+-- @tparam node head_node The head of a node list.
+function cloze.fix_recursion(head_node)
+ local n = {} -- node
+ n.start, n.stop = false
+ while head_node do
+ if head_node.head then
+ cloze.fix_recursion(head_node.head)
+ else
+ if not n.start then
+ n.start = registry.get_marker(head_node, 'fix', 'start')
+ end
+ if not n.stop then
+ n.stop = registry.get_marker(head_node, 'fix', 'stop')
+ end
+ if n.start and n.stop then
+ cloze.fix_make(n.start, n.stop)
+ n.start, n.stop = false
+ end
+ end
+ head_node = head_node.next
+ end
+end
+
+--- The corresponding LaTeX command to this Lua function is `\clozefix`.
+--
+-- @tparam node head_node The head of a node list.
+function cloze.fix(head_node)
+ cloze.fix_recursion(head_node)
+ return head_node
+end
+
+--- The corresponding LaTeX environment to this lua function is
+-- `clozepar`.
+--
+-- __Node lists__
+--
+-- __Show text:__
+--
+-- <table>
+-- <thead>
+-- <tr>
+-- <th>`n.strut`</th>
+-- <th>`kern`</th>
+-- <th></th>
+-- <th>width = 0</th>
+-- </tr>
+-- </thead>
+-- <tbody>
+-- <tr>
+-- <td>`n.line`</td>
+-- <td>`rule`</td>
+-- <td></td>
+-- <td>`l.width` (Width from hlist)</td>
+-- </tr>
+-- <tr>
+-- <td>`n.kern`</td>
+-- <td>`kern`</td>
+-- <td></td>
+-- <td>`-l.width`</td>
+-- </tr>
+-- <tr>
+-- <td>`n.color_text`</td>
+-- <td>`whatsit`</td>
+-- <td>`pdf_colorstack`</td>
+-- <td>Text color</td>
+-- </tr>
+-- <tr>
+-- <td></td>
+-- <td>`glyphs`</td>
+-- <td></td>
+-- <td>Text to show</td>
+-- </tr>
+-- <tr>
+-- <td>`n.tail`</td>
+-- <td>`glyph`</td>
+-- <td></td>
+-- <td>Last glyph in hlist</td>
+-- </tr>
+-- <tr>
+-- <td>`n.color_reset`</td>
+-- <td>`whatsit`</td>
+-- <td>`pdf_colorstack`</td>
+-- <td>Reset color</td>
+-- </tr>
+-- </tbody>
+-- </table>
+--
+-- __Hide text:__
+--
+-- <table>
+-- <thead>
+-- <tr>
+-- <th>`n.strut`</th>
+-- <th>`kern`</th>
+-- <th></th>
+-- <th>width = 0</th>
+-- </tr>
+-- </thead>
+-- <tbody>
+-- <tr>
+-- <td>`n.line`</td>
+-- <td>`rule`</td>
+-- <td></td>
+-- <td>`l.width` (Width from hlist)</td>
+-- </tr>
+-- </tbody>
+-- </table>
+--
+-- @tparam node head_node The head of a node list.
+function cloze.par(head_node)
+ local l = {} -- length
+ local n = {} -- node
+ for hlist in node.traverse_id(node.id('hlist'), head_node) do
+ for whatsit in node.traverse_id(node.id('whatsit'), hlist.head) do
+ registry.get_marker(whatsit, 'par', 'start')
+ end
+ l.width = hlist.width
+ hlist, n.strut, n.head = insert_strut_into_hlist(hlist)
+ n.line = nodex.insert_line(n.strut, l.width)
+ if registry.get_value_show() then
+ nodex.insert_list(
+ 'after',
+ n.line,
+ {
+ create_kern_node(-l.width),
+ nodex.create_color('text')
+ }
+ )
+ nodex.insert_list(
+ 'after',
+ node.tail(head_node),
+ {nodex.create_color('reset')}
+ )
+ else
+ n.line.next = nil
+ end
+ end
+ return head_node
+end
+
+--- Basic module functions.
+-- The `base` table contains functions which are published to the
+-- `cloze.sty` file.
+-- @section base
+
+--- This function registers the functions `cloze.par`, `cloze.basic` and
+-- `cloze.fix` the Lua callbacks.
+--
+-- `cloze.par` and `cloze.basic` are registered to the callback
+-- `post_linebreak_filter` and `cloze.fix` to the callback
+-- `pre_linebreak_filter`. The argument `mode` accepts the string values
+-- `basic`, `fix` and `par`. A special treatment is needed for clozes in
+-- display math mode. The `post_linebreak_filter` is not called on
+-- display math formulas. I’m not sure if the `pre_output_filter` is the
+-- right choice to capture the display math formulas.
+function base.register(mode)
+ local basic
+ if mode == 'par' then
+ luatexbase.add_to_callback(
+ 'post_linebreak_filter',
+ cloze.par,
+ mode
+ )
+ return true
+ end
+ if not base.is_registered[mode] then
+ if mode == 'basic' then
+ luatexbase.add_to_callback(
+ 'post_linebreak_filter',
+ cloze.basic,
+ mode
+ )
+ luatexbase.add_to_callback(
+ 'pre_output_filter',
+ cloze.basic,
+ mode
+ )
+ elseif mode == 'fix' then
+ luatexbase.add_to_callback(
+ 'pre_linebreak_filter',
+ cloze.fix,
+ mode
+ )
+ else
+ return false
+ end
+ base.is_registered[mode] = true
+ end
+end
+
+--- `base.unregister(mode)` deletes the registered functions from the
+-- Lua callbacks.
+--
+-- @tparam string mode The argument `mode` accepts the string values
+-- `basic`, `fix` and `par`.
+function base.unregister(mode)
+ if mode == 'basic' then
+ luatexbase.remove_from_callback('post_linebreak_filter', mode)
+ luatexbase.remove_from_callback('pre_output_filter', mode)
+ elseif mode == 'fix' then
+ luatexbase.remove_from_callback('pre_linebreak_filter', mode)
+ else
+ luatexbase.remove_from_callback('post_linebreak_filter', mode)
+ end
+end
+
+-- Publish some functions to the `cloze.sty` file.
+base.linefil = nodex.write_linefil
+base.line = nodex.write_line
+base.margin = nodex.write_margin
+base.set_option = registry.set_option
+base.set_is_global = registry.set_is_global
+base.unset_local_options = registry.unset_local_options
+base.reset = registry.unset_global_options
+base.get_defaults = registry.get_defaults
+base.get_value = registry.get_value
+base.marker = registry.write_marker
+
+return base
diff --git a/macros/luatex/latex/cloze/cloze.pdf b/macros/luatex/latex/cloze/cloze.pdf
index 7afedd6a8c..8f9b26bf23 100644
--- a/macros/luatex/latex/cloze/cloze.pdf
+++ b/macros/luatex/latex/cloze/cloze.pdf
Binary files differ